Your cart is currently empty!
# Question 1: (25 points) Now extend the given diagram. The `Professor` class aggregates a `Bonus` class, which has fields named `bonusPerYear (Dollars)`, `baseSalary (Dollars)`, `extraWorkingHours (int)` and a method called `calculateBonus (return Dollars)`. A class `ForeignExchangeStudent` inherits the class `Student` with new fields `country (String)`, `availabilityHours (int)` and a method `scheduleFinal(return String)`. Revise the…
# Question 1: (25 points)
Now extend the given diagram. The `Professor` class aggregates a `Bonus` class,
which has fields named `bonusPerYear (Dollars)`, `baseSalary (Dollars)`,
`extraWorkingHours (int)` and a method called `calculateBonus (return Dollars)`.
A class `ForeignExchangeStudent` inherits the class `Student` with new fields
`country (String)`, `availabilityHours (int)` and a method
`scheduleFinal(return String)`. Revise the class `Professor` based on the
`Bonus` class (hint: change related fields) and draw the complete new class
diagram including the class `Dollars` (no need to specify the fields and methods
of `Dollars` class).
Question 2: (25 points)
Consider to build a management system for a startup software company.
– There is a base class `Employee` (which has `name`, `birthday`, `address`,
`gender`, and a method `printContactDetails()`).
– Then 2 classes inherit the `Employee` class:
1. First is `FullTimeEmployee`, which has a new fields called `salary`,
`bonus`, and new methods called `printMonthlySalary()` and
`printEmployeeDetails()`.
2. The other class is `PartTimeEmployee`, which contains new fields
`workingHours`, `hourlySalary`, and `partialBonus`, with new methods
`calculateMonthlySalary()` and `calculatePartialBonus()`.
Design and develop appropriate classes or interfaces, and each class member’s
data type (i.e. field or method) i.e., provide each field’s data type and each
method’s return type. Then draw the complete class diagram of this design.
Task 3: (50 Points)
Draw an activity diagram to describe a student registering a class at a
university using the “search for class” function. The diagram should have at
least two swim lanes (student and university system) and describe the following
process:
1. A student opens a browser and visits the university.edu website.
2. Then student chooses the “my classes” option in the website.
3. Then the student searches the desired classes by entering the desired subject
code or by clicking the “select subject” button to choose from a list.
4. In the returned list from the search or from the list, the student finds the
class to add and click the select class button.
– If the list does not contain the required class, the student revises the
search option.
– If the correct class is found, the student reviews the information and
then submits the selected class.
5. The student considers the class is added to the schedule ONLY when a GREEN
CHECK in the “Status” column is shown. If the student sees a RED X, then the
student makes appropriate adjustments and resubmits for success addition of
the class to the student’s schedule.