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 : Create a UML diagram for the part question below.
Part : 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
