677ba4bf281299ecdf53f270 Review PythonOOP
677ba4bf281299ecdf53f270 Review PythonOOP
Specifically:
1. Build the class Teacher: abstract class
- Property: code, name.
- Method:
+ Constructor: 2 types (no parameter and full parameters)
+ Get/set methods for all properties.
+ show() method.
+ Get salary – abstract method (only declare without body)
2. Build the class FulltimeTeacher: inherite from class Teacher
- Property: salary coefficient
- Method:
+ Constructor: 2 types (no parameter and full parameters)
+ Get/set methods for all properties.
+ Get salary = salary coefficient * 2000000
3. Build the class ParttimeTeacher: inherite from class Teacher
- Property: slot
- Method:
+ Constructor: 2 types (no parameter and full parameters)
+ Get/set methods for all properties.
+ Get salary = slot * 50000
4. Build an interface, named IManager, design the functions:
- Import and display a list of Teachers (including Fulltime teacher and PartTime
teacher).
- Show list of teachers with the highest salary.
- How many parttime teachers have the slot > 10.
- Calculate the total number of parttime teacher's slots.
- Sort the list of teachers increased by salary.
- Is there a teacher whose name starts with ‘T’? If so, show that person's name
and salary.
- Displays a list of fulltime teachers with the salary coefficient < 3, in which the
full name will separate First and Last Names into 2 columns.
Build the class Manager implement the above interface.
5. Build the main class to excute the above functions. (Show menu and check input).