Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ language Were going to create an abstract base class with a couple of derived classes to boot. These classes will have dynamic memory, so

C++ language

Were going to create an abstract base class with a couple of derived classes to boot. These classes will have dynamic memory, so be sure to define the members of the rule of 3.

Base.h/cpp

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

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

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.

Dont forget to use the console lock/unlock if you dont 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 isnt 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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

demonstrate the importance of induction training.

Answered: 1 week ago