Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

Students also viewed these Programming questions

Question

Interpret goodwill arising from business combinations.

Answered: 1 week ago

Question

Interpret consolidated financial statements.

Answered: 1 week ago