Question: C++ Implement a main program that prompts the user and prints the classes you are taking this quarter. Use a dynamic array and functions with

C++

Implement a main program that prompts the user and prints the classes you are taking this quarter. Use a dynamic array and functions with arguments of class Course. b. Modify the Course, Instructor, and TextBook classes by adding attributes and member functions, discussed in class

#ifndef COURSE_H #define COURSE_H #include #include #include "Instructor.h" #include "TextBook.h" using namespace std; class Course { private: string courseName; // Course name string courseCode; string courseTerm; Instructor instructor; // Instructor TextBook textbook; // Textbook public: // Constructor

Course(); Course(string aCourseName, string aCourseCode, , string aCourseTerm, string instrLastName, string instrFirstName, string instrOffice, string textTitle, string author, string publisher); Course(string aCourseName, string aCourseCode, , string aCourseTerm, Instructor anIstructor, TextBook aTextBook); Course(const Course &obj); void set(string aCourseName, string aCourseCode, string aCourseTerm ,string instrLastName, string instrFirstName, string instrOffice, string textTitle, string author, string publisher); void set(string aCourseName, string aCourseCode, string aCourseTerm, Instructor anIstructor, TextBook aTextBook); void setCourseName(string aCourseName); void setCourseCode(string aCourseCode); void setCourseTerm(string aCourseTerm); void setInstructor(Instructor anIstructor); void setInstructor(string instrLastName, string instrFirstName, string instrOffice); void setTextBook(TextBook aTextBook); void setTextBook(string textTitle, string author,string publisher); string getCourseName() const; string getCourseCode() const; string getCourseTerm() const; Instructor getInstructor() const; TextBook getTextBook() const; friend ostream &operator << (ostream &strm, const Course &obj); friend istream &operator >> (istream &trm, Course &obj); }; #endif +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #ifndef INSTRUCTOR_H #define INSTRUCTOR_H #include #include using namespace std; // Instructor class class Instructor { private: string lastName; // Last name string firstName; // First name string officeNumber; // Office number public: // The default constructor stores empty strings // in the string objects. Instructor(); // Constructor Instructor(string lname, string fname, string office); Instructor(const Instructor &obj); // set function void set(string lname, string fname, string office); void setLastName(string lname); void setFirstName(string fname); void setOfficeNumber(string office);string getLastName() const; string getFirstName() const; string getOfficeNumber() const; friend ostream &operator << (ostream &strm, const Instructor &obj); friend istream &operator >> (istream &trm, Instructor &obj); }; #endif

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!