(solution) 1. Which of the following is true of a composition? a) It

(solution) 1. Which of the following is true of a composition? a) It

1. Which of the following is true of a composition?

a) It represents a part-whole relationship

b) The part(s) must be destroyed when the whole is destroyed

c) The whole must be destroyed when the part(s) are destroyed

d) All of the above

e) Two of the above

2. Which aspect of quality would be most improved by the decision to create a framework whendeveloping a software system?

a) Usability

b) Efficiency

c) Reliability

d) Maintainability

e) Reusability

3. In SimpleChat, what is the purpose of ChatIF?

a) It allows flexibility to communicate with a different server without changing the ChatClient code

b) It is where the code for the user interface can be found

c) It is abstract class allowing you to have several concrete UI classes

d) It allows flexibility to change the UI class without changing the ChatClient code

e) None of the above

4. Which of the following is not a special kind of association that may appear in a class diagram?

a) Aggregation

b) Composition

c) Unidirectional

d) Generalization

e) Reflexive

5. Which statement better describes extensions among uses cases?

a) They allow you to capture commonality between several different uses cases

b) They describe aspects of what the system must do

c) They are constraints that must hold for the related used cases

d) They are used to make optional interactions explicit or to handle exceptional cases

e) None of the above

6. Which of these requirement categories better describe the following requirement statement:

‘The java.util.Date class should be used to handle dates’

a) Functional

b) Platform

c) Quality

d) Process

e) Not a requirement

7. Which of these requirement categories better describe the following requirement statement:

‘The system shall be able to process 20 registrations per hour in peak load’

a) Functional

b) Platform

c) Quality

d) Process

e) Not a requirement

8. Which of the following is true about asymmetric reflexive associations?

a) They have to be unidirectional

b) They have to be labeled using different role names

c) They have to be labeled using association names

d) They connect a class to its super class

e) They represent a mutually exclusive relationship between classes

8. Which of the following statements is false in the context of object (instance) diagrams?

a) Generalizations describe a relationship between instances at run-time

b) An object diagram can only contain links generated by associations

c) The number of links among instances are consistent with the multiplicity of the class diagram

d) A class diagram can generate an infinite number of object diagrams

e) An object diagram shows a configuration of objects and links that exist at run-time

9. Which of the following is true of a composition?

a) It represents a part-whole relationship

b) The part(s) must be destroyed when the whole is destroyed

c) The whole must be destroyed when the part(s) are destroyed

d) All of the above

e) Two of the above

10. Domain analysis should be started:

a) Prior to starting to develop requirements

b) After developing requirements, but before completing the design

c) After doing the design, but before coding

d) After testing

e) After releasing the finished system to the domain expert

11. Imagine you have a system with a class diagram corresponding to the following Umple code:

class User {name;}

class Book {title; author;}

class Copy {barcode; * — 1 Book;}

class Loan {Date dueDate; * — 1 User borrower; * — 1 Copy borrowedItem;}

Class Loan is a:

a) An symmetric reflexive association

b) An association class

c) A reflexive association

d) An abstract class

e) None of the above

12. Create a UML class diagram for system described below with appropriate classes, their attributes (including types), and associations (with directions,multiplicities, compositions, and role names).

Problem description: a Soccer League Management System

You must model the domain of a soccer league management system where we want to represent at least the following concepts:

    – There are many types of people involved: players, coaches, and referees.

    – Players and coaches belong to only one team.

    – Each team in the league has at least 18 players (including two goalkeepers), and 1 to 3 coaches.

    – Each game between two teams is refereed by 3 referees.

    – All people have a name, a date of birth, a city of origin, and a unique identifier. Players also have a jersey number.

    – A season includes 24 games per team. The dates and locations of each game are determined in advance.

    – As we would like to calculate some statistics during the season (including the ranking!), we must be able to determine for each game: the final score, who scored the       goals, and which goal keepers have been scored goals.

    – Players can also get, during a game, yellow and red cards. After a red card or two yellow cards in a game, a player must skip the next game.

    – Assumption: players and coaches will not change during the season. During a game however, the players on the field (including goalkeepers) can obviously change!

13. Write the following OCL constraints (specify the context of the constraint) for your model.

    (a) The Jersey number of a Player must be greater than 0.

    (b) No teams named ‘Barcelona’ can be created in the system. 

    (c) Write 1 (one) functional requirements and 1 (one) non-functional requirement for the Soccer League Management System. 

    (d) Specify one possible use case for the Player and Administrator actors in the Soccer League Management System. Assume that this system will be used by a                     soccer league organizer(Footy Sevens for instance) to manage their soccer leagues. You only need to provide the name of the use case.

          Example. The Referee actor participates in the use case: “Enter results of a game”.