Question: Write a C++ program that includes the following . Define the class Student in the header file Student.h #1fndef STUDENTH #define STUDENTH #include #include using

 Write a C++ program that includes the following . Define the

class Student in the header file Student.h #1fndef STUDENTH #define STUDENTH #include

Write a C++ program that includes the following . Define the class Student in the header file Student.h #1fndef STUDENTH #define STUDENTH #include #include using namespace std; - - class Student public: // Default constructor Student(); // Creates a student with the specified id and name Student(int id, const string& name); // Returns the student name string get_name() const; // Returns the student id. int get_student_id () const; // Sets the student name void set_name(const string& name); // Sets the student id. void set_student_id(int id); // Prints the student id and name. void print_student () const; private: / student name string name; // student id int id; d; #end if Compile This lab exercise should be put under cse330/1abe1 subdirectory Sg++ -c Student.cpp $.g++ -c label.cpp $g++ Student.o lab01.o -o labe1 $ls lab01.cpp lab01.o lab01 Student.cpp $./lab01 Student.h Student.o Capture the result in a script file lab@1result. $script lab01result $./lab01 exit $ls lab01.cpp lab01.o lab01 labelresult Student.cpp Student.h Student.o Handin Student.h: the header file containing attributes and member function prototypes with comments * Student.cpp: the implementation file containing the implementation of all member functions. lab01.cpp: the client test file containing main() funcion. lab01result: the script file which captures the result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!