- Manager and DepartmentManager Classes
Write a Manager class that keeps data attributes for the following pieces of information:
- Manager name
- Manager ID
Next, write a class named DepartmentManager that is a subclass of the Manager class. The DepartmentManager class should keep data attributes for the following information:
- Department name
- Number of employees in the department
Write the appropriate accessor and mutator methods for each class. Once you have written the classes, write a program that creates an object of the DepartmentManager class and prompts the user to enter data for each of the object’s data attributes. Store the data in the object, then use the object’s accessor methods to retrieve it and display it on the screen.
- Vehicle and Truck Classes
Write a Vehicle class that keeps data attributes for the following pieces of information:
- Vehicle make
- Vehicle model
Next, write a class named Truck that is a subclass of the Vehicle class. The Truck class should keep data attributes for the following information:
- Cargo capacity (in tons)
- Number of axles
Write the appropriate accessor and mutator methods for each class. Once you have written the classes, write a program that creates an object of the Truck class and prompts the user to enter data for each of the object’s data attributes. Store the data in the object, then use the object’s accessor methods to retrieve it and display it on the screen.