Question: Write a C++ code that uses pure virtual functions in the baseclass universityperonnel. The universityperonnel class is anabstract class and no objects can be created

Write a C++ code that uses pure virtual functions in the baseclass universityperonnel. The universityperonnel class is anabstract class and no objects can be created for it. Your baseclass has two pure virtual functions getData() and isoutstanding().Your parent class should also include two member functionstoinput() and display() the name of personnel. Your code includes twoderived classes, student and instructor respectively. The derivedclasses each contain a function called get () and outstanding().get () function of Student class should input name of personnel andasks user to input GPA whereas outstanding function determineseither the GPA>3 or not. Similarly, get () function ofinstructor class should input name of personnel and asks user toinput no. of publications whereas Outstanding function determineseither the no. of publications >50 or not. Student andinstructor objects are casted into the person class type througharray of pointers. Ask user first either he is student/instructor,then get his data using get () and your program continues to ask toenter the data until the last personnel enters the data. Once thedata is entered, print names of all personnel along with theiroutstanding

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!