Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ language C++ language Objective We're going to create an abstract base class with a couple of derived classes to boot. These classes wil have

image text in transcribedC++ language

image text in transcribedC++ language

Objective We're going to create an abstract base class with a couple of derived classes to boot. These classes wil have dynamic memory, so be sure to define the members of the rule of 3. Base.h/cpp- 10 points Create a Base class. This will be our ABC that will serve as our blueprint/contract for our derived classes. Give the class the DisplayRecord function, and make it be pure virtual. Employee.h/cpp - 20 points This will be the derived class that deals with employees. Add the data members for name, salary, and department. The name and department should both be char pointers (NOT strings!), meaning dynamic memory. Make sure that this class has the appropriate members of the rule of 3 created, so that we can safely do deep copies Student.h/cpp - 20 points The student should have a name, degree program, GPA, and likeability rating. The name and degree program should again be char pointers and not strings. As with the employee, make sure you set up the rule of 3 for a deep copy. Main.cpp-20 pointsE Main will need a couple of data members, most importantly a vector of Base pointers. It will also need a run bool, and a run loop (just like the play loop, so a loop that runs as long as a run is true). Display a menu to the user, asking if they would like to add a record, or display all records/record management. Allow the user to quit out by hitting escape. es.do Open with Google Docs AddRecord() 15 points Ask the user which type of record they want to add, an employee or a student. Once they have made their selection, have themfill out the record, then push it on to the vector. After this you should be back to the main loop and menu. ManageRecords() - 15 points In this function, display all the records to the user. Ask them if they would like to copy any records over Allow them to choose a record, then a second to replace the info that was in the first. You will need to make sure that you can only copy an employee to an employee, and a student to a student. If the user selects no, or is finished with the copy, return to the menu. Extra Don't forget to use the console lock/unlock if you don't like flicker. Clearing the buffer is a good idea (we talked about a couple of ways to do that), just to make sure any information remaining in the cin input buffer isn't accidentally pushed elsewhere. Make sure you have your paranoia check in your assignment operator

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

There are corporate goals other than to improve profit. Name three.

Answered: 1 week ago

Question

=+a. Consumer-Focused show benefits.

Answered: 1 week ago