Question: Given a CH program named program1.cpp that contains two classes, Name and Employee. In the main function of the program, three objects are created to

Given a CH program named program1.cpp that contains two classes, Name and Employee. In the main function of the program, three objects are created to test of the class Employee. When the program runs, it prints out the output as shown in Figure l without the information of the employee's name which is INCORRECT.

. Modify the program1.cpp, result will be displayed using inheritance concept to print out the similar output as showed below (Figure 1.a

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 Programming Questions!