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 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:
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 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:
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
I really need help writing this code it's not compiling because of the student.h file
C++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 6 steps with 6 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY