Question: Using the binary tree provided in the textbook. Create a class called Date. The class will have the following data members day as integer month

Using the binary tree provided in the textbook.

Create a class called Date. The class will have the following data members

  • day as integer
  • month as integer
  • year as integer

Methods needed

  • Accessors and mutators
  • Able to print date in the format January 1, 2018

Create a class called Person. This class will have the following data members (protected)

  • name as string
  • address as string
  • city as string
  • state as string
  • phone as string

It will have accessor and mutators for the data members.

Create a class called EmployeeInfo which inherits from the Person class. This class will have the following data members (private).

  • id as integer
  • hireDate as Date (first class listed)
  • empInfo as Person

It will have accessor and mutators for the data members

Main should show that all the methods in the binary tree work with the EmployeeInfo class. Show that all methods work. Allow the program to prompt the user for an ID to search for. If the ID is found then all the information about the employee should be displayed (All data in EmployeeInfo, Person and Date). If employee is not found display a message telling the user that the person does not exist.

Program should continue until the user indicates they are done.

All classes should be in their own files (both h and cpp). Not all implementation in the header file.

Add at least 10 employees to the tree. You do not need to ask the user for the information.

Add all needed operators to allow the program to work. The binary tree should not be changed so that it directly knows about the employee info class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!