This lab will explore how to define a new C++ data type and also how to combine multiple C++ files into a single executable program. The lab has the following requirements: • Please make sure all your function must have function header documentation, please see PrintMeFirst function as example. student.h file: Write a struct Student and save it in student.h file with the following: o struct Student must have the following data field: • name of data type string • idNum of data type int • creditHours of data type int gpa of data type double student.cpp file: o write a function Student getData () that will do the following: • define a local variable Student studentInfo • this function will ask user to enter "Student name" and save the user input to the data member name of local variable studentInfo • this function will ask user to enter “Student ID" and save the user input to the data member idNum of local variable studentInfo this function will ask user to enter “Student name" and save the user input to the data member creditHours of local variable studentInfo • this function will ask user to enter "Student name" and save the user input to the data member gpa of local variable studentInfo return studentInfo o write a function void printStudentīnfo(Student studentInfo) that will do the following: • print out the all the data member of studentInfo printMeFirst.h file: I have provided this file printMeFirst.cpp file: I have provided this file Makefile file: I have provide this file studentMain.cpp file: This is a test driver program. I have provided this file, but you need to change the parameters for printMeFirst function to your own name and the name of this lab. • After your compile all these programs, it will link into an executable program studentMain Run studentMain program, and it should have a similar output below:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 5PP: (Data processing) Write a C++ program that reads the file created in Exercise 4, permits the user to...
icon
Related questions
Question

The programming language is C++.

I need full source code.

Lab9: Structure & Makefile
CS-102
2020 Fall Semester
This lab will explore how to define a new C++ data type and also how to combine multiple C++
files into a single executable program.
The lab has the following requirements:
Please make sure all your function must have function header documentation, please
see PrintMeFirst function as example.
student.h file: Write a struct Student and save it in student.h file with the following:
struct Student must have the following data field:
name of data type string
idNum of data type int
creditHours of data type int
gpa of data type double
student.cpp file:
o write a function Student getData ( ) that will do the following:
define a local variable Student studentInfo
this function will ask user to enter "Student name" and save the user input
to the data member name of local variable studentInfo
this function will ask user to enter "Student ID" and save the user input to
the data member idNum of local variable studentInfo
this function will ask user to enter "Student name" and save the user input
to the data member creditHours of local variable studentInfo
this function will ask user to enter "Student name" and save the user input
to the data member gpa of local variable studentInfo
return studentInfo
o write a function void printStudentInfo(Student studentInfo) that will do the
following:
print out the all the data member of studentInfo
printMeFirst.h file: I have provided this file
printMeFirst.cpp file: I have provided this file
Makefile file: I have provide this file
studentMain.cpp file: This is a test driver program. I have provided this file, but you
need to change the parameters for printMeFirst function to your own name and the name
of this lab.
• After your compile all these programs, it will link into an executable program
studentMain
Run studentMain program, and it should have a similar output below:
Transcribed Image Text:Lab9: Structure & Makefile CS-102 2020 Fall Semester This lab will explore how to define a new C++ data type and also how to combine multiple C++ files into a single executable program. The lab has the following requirements: Please make sure all your function must have function header documentation, please see PrintMeFirst function as example. student.h file: Write a struct Student and save it in student.h file with the following: struct Student must have the following data field: name of data type string idNum of data type int creditHours of data type int gpa of data type double student.cpp file: o write a function Student getData ( ) that will do the following: define a local variable Student studentInfo this function will ask user to enter "Student name" and save the user input to the data member name of local variable studentInfo this function will ask user to enter "Student ID" and save the user input to the data member idNum of local variable studentInfo this function will ask user to enter "Student name" and save the user input to the data member creditHours of local variable studentInfo this function will ask user to enter "Student name" and save the user input to the data member gpa of local variable studentInfo return studentInfo o write a function void printStudentInfo(Student studentInfo) that will do the following: print out the all the data member of studentInfo printMeFirst.h file: I have provided this file printMeFirst.cpp file: I have provided this file Makefile file: I have provide this file studentMain.cpp file: This is a test driver program. I have provided this file, but you need to change the parameters for printMeFirst function to your own name and the name of this lab. • After your compile all these programs, it will link into an executable program studentMain Run studentMain program, and it should have a similar output below:
Program written by: Ron Sha
Course Info: cS-102 structure example
Date: Fri Dec 04 22:15:17 2020
Enter the following student data:
Student name: Ron Sha
Student ID Number: 8080
Credit Hours Enrolled: 20
Current GPA: 3.89
Here is the student data you entered:
Name: Ron Sha
ID Number: 8080
Credit Hours: 20
GPA: 3.89
Transcribed Image Text:Program written by: Ron Sha Course Info: cS-102 structure example Date: Fri Dec 04 22:15:17 2020 Enter the following student data: Student name: Ron Sha Student ID Number: 8080 Credit Hours Enrolled: 20 Current GPA: 3.89 Here is the student data you entered: Name: Ron Sha ID Number: 8080 Credit Hours: 20 GPA: 3.89
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr