In Class Activity 9-1 - In Class Activity Week9-1 1 Read the following description \u201cCustomers of the garage can buy cars Customers with a bad

In Class Activity 9-1 - In Class Activity Week9-1 1...

This preview shows page 1 - 3 out of 3 pages.

In Class Activity: Week9-1 1) Read the following description. “Customers of the garage can buy cars. Customers with a bad credit should pay an extra down payment”. Which of the following diagrams represent this description? a) b) c) d)
2) Answer the following questions: a) How do you model the following situation with a UML2 class diagram: Each talk is done by a professor or by an assistant. 1 2 3 4 5
b) You are given the following clipping of a UML2 class diagram. Which of the following statements are true? One object of D may be associated with multiple objects of C. Two objects of D are associated with * objects of A. There are no direct instances of A. One object of B must be associated with exactly two objects of D. c) Draw UML class for the following code: private string taxCode; public string status; public void join() { } public void leave() { } public void retire() { } public void changeInformation() { } } Note: Visibility: public(+) visibility means that the feature is available to any class associated with the class that owns the class protected(#) visibility means that the feature is available within the class that owns that feature and any subtype of that class package() visibility means that the feature is available only to other classes in the same package as the declaring class (and the declaring class itself) private(-) visibility means that the feature is available only within the class that owns that feature Employee+ name: string - address: string + employeeNumber: int - socialSecurityNumber: int - department: string - salary: int - taxCode: string + status: string+ join() + leave() + retire() + changeInformation()

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture