Write a C++ code that uses pure virtual functions in the base class 'universitypersonnel'. The 'universitypersonnel' class is an abstract class and no objects can be created for it. Your base class...


Write a
C++

code that uses pure virtual functions in the base class 'universitypersonnel'. The 'universitypersonnel' class is an abstract class and no objects can be created for it.


Your base class has two pure virtual functions getData() and outstanding(), which should be overridden in child classes. Your parent class should also include two member functions to input() and display() the name of personnel.


Your code includes two derived classes, 'student' and 'instructor' respectively. The derived classes each contain a function called get() and outstanding(). The get() function of the Student class should input the name of personnel and asks the user to input GPA whereas the outstanding() function determines either the GPA>3 or not.


Similarly, the get() function of the instructor class should input the name of personnel and asks the user to input the no. of publications whereas the Outstanding() function determines either the no. of publications >50 or not.


Student and instructor objects are casted into the person class type through an array of pointers. Ask the user first either he is a student/instructor, then get his data using get() function and your program continues to ask to enter the data until the last personnel enters the data. Once the data is entered, print the names of all personnel along with their outstanding.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here