Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program needs to be in C++ Please use the code below and make edits to it 2 /*** Given below are 3 classes that have

Program needs to be in C++

Please use the code below and make edits to it

image text in transcribed

image text in transcribed

2 /*** Given below are 3 classes that have functions missing. Both elecCourse_c and hssCourse_c are derived from course_c. 3 5 6 Make an array of at least 4 pointers (a mix of the types). Each pointer should be printed and use new to make them. 7 8 #include class course_c{ 9 10 11 12 13 14 protected: int numCredits; std::string courseTitle; std::string lectureTime; std::string instructor; public: // get function for numCredits 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 // constructor // destructor // print }; class elecCourse_c{ protected: std::string labTime; bool graduation Requirement; 31 32 33 34 35 36 37 public: // print and constructor }; class hssCourse_c{ 38 39 40 41 42 43 protected: std::string subField; bool finalPaper; 44 public: // print and constructor 45 46 47 Pint main() { // array of four pointers to objects (a mix of the three classes) int totalCredits = 0; for(int i = 0; i getNumCredits(); 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 std::cout print(); } return 0; } 2 /*** Given below are 3 classes that have functions missing. Both elecCourse_c and hssCourse_c are derived from course_c. 3 5 6 Make an array of at least 4 pointers (a mix of the types). Each pointer should be printed and use new to make them. 7 8 #include class course_c{ 9 10 11 12 13 14 protected: int numCredits; std::string courseTitle; std::string lectureTime; std::string instructor; public: // get function for numCredits 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 // constructor // destructor // print }; class elecCourse_c{ protected: std::string labTime; bool graduation Requirement; 31 32 33 34 35 36 37 public: // print and constructor }; class hssCourse_c{ 38 39 40 41 42 43 protected: std::string subField; bool finalPaper; 44 public: // print and constructor 45 46 47 Pint main() { // array of four pointers to objects (a mix of the three classes) int totalCredits = 0; for(int i = 0; i getNumCredits(); 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 std::cout print(); } return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Can anyone answer this tutorial question as follows?

Answered: 1 week ago