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:
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
Related questions
Question
so every time I ask this question and the code that is provided does not compile it gives a "student.h" header file error
can u please fix that and give me the right code that will compile.
I also provided the code that I get from the tutor it's not compiling.
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 2 steps
Knowledge Booster
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
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education