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:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education