Question: In Python, Part 1 : Create a UML diagram for the part 2 question below. Part 2 : Do the following Programming Exercise You must

In Python,
Part 1: Create a UML diagram for the part 2 question below.
Part 2: Do the following Programming Exercise
You must have multiple files (one for each class) along with a file that has a main().
Implement a superclass Person. Then make two new classes, Student and Instructor, that inherit from Person. A Person has a name and a year of birth. A student has a major, and an instructor has a salary. Write the classes with constructors (__init__()), and the __repr__() method. Supply a program with a main() that will test the instructor and student classes by calling both the constructors and the __repr__() methods.
Implement a class Person, Student, and Instructor.
Create a file with a main() that will printout the instructors and students information using the __repr__ method.
Do a UML diagram for all of these classes.
Make a class Employee with a name and salary. Make a class Manager that inherit from Employee and have the Manager class use super() to supply information on Employee. Add an instance variable, named _department, that stores a string for the manager's department. Supply a method __repr__ that prints the managers name, department, and salary. Supply appropriate __repr__ methods for both the classes. Supply a test program that tests both an Employee and Manager and uses the __repr__() method. That means create an object for both the Employee and the Manager.

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 Accounting Questions!