Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program Overview In this program, you will create a database of Employees. Each Employee has a name & and ID. Managers must also be part
Program Overview In this program, you will create a database of Employees. Each Employee has a name & and ID. Managers must also be part of this database. A manager is an employee as well. However, in addition to managers having all the characteristics of employees, managers also manage employees as subordinates. Therefore, a Manager has a list of Employees he/she manages as well as a count of how many subordinates he/she has. Your application should ask the user for details to maintain the list of employees. For each employee, the program should ask the user for the name and whether or not the employee is a manager. If the user specifies that the employee is a Manager, the program should ask the user how many subordinates they manage as well as their names. It should create a Manager object, and within the Manager object, create the subordinate Employees. The program should ask the user for the name of the subordinate employees and store their names in the subordinate Employee objects. If the user specifies the employee is not a Manager, the program should create an Employee object. All employees (including Managers), should be added to the database of Employees. Finally, the program should print out a list of all employees. However, if an Employee is a Manager, it should also print out a list his/her subordinates Employees
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started