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
Get step-by-step solutions from verified subject matter experts
