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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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.

Expert Solution
steps

Step by step

Solved in 3 steps with 7 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY