Question: Part 1 Class Diagram (40 points) Below is a Class Diagram Example, Read and answer the following questions: interface Person firstName String lastName String Professor

 Part 1 Class Diagram (40 points) Below is a Class Diagram

Part 1 Class Diagram (40 points) Below is a Class Diagram Example, Read and answer the following questions: interface Person firstName String lastName String Professor Student salary: Dollars major : String (1) Now we extend the given diagram. The Professor class aggregates a Salary class, which has fields named salaryPerHour (Dollars), baseSalary (Dollars), extraWorkingHours (int) and a method called calculateSalary (return Dollars). A class PartTimeStudent inherits the class Student with new fields workplace (String), availability (int) and a method scheduleExam (return String). Revise the class Professor based on the Salary class (hint: change related fields) and give the complete new class diagram including the class Dollars (no need to specify the fields and methods of Dollars). (15 pts) (2) Consider to build a management system for a startup software company. There is a base class Person (which has name, birthday, address, sex and a method printlnformation()). Then 2 classes inherit Person. First is FullTime Worker, which has a new field called salary and a new method called printMonthlySalary(). The other class is ParttimeWorker, which contains new fields workingHours, hourlySalary with a new method calculateMonthlySalary(). Design the type of each class member (i.e. field or method). Then draw the complete class diagram (25 pts)

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