Professional Documents
Culture Documents
Assignment Class, Object and Use Case Diagrams: Task 01: Aggregation Vs Composition (10 Scores)
Assignment Class, Object and Use Case Diagrams: Task 01: Aggregation Vs Composition (10 Scores)
Answer:
Two examples of aggregation:
(1)city and tree
(2)sea and fish
Two examples of composition:
(3)bank and account
(4)building and room
Aggregation:A special form of association that models a whole-part
relationship between an aggregate (the whole) and its parts.And the
part can belong to many whole.
Composition:It is a stronger form of AGGREGATION. The “part(s)” may
belong to only ONE whole.The part(s) are usua
lly expected to “live” and “die” with the whole (“cascading delete”).
Arguing:
(1)A tree can belong to many whole,such as park 、school and street.So it is
aggregation.
(2)A fish can belong to many whole, for example a river.So it is aggregation.
(3)The account just belong to a special bank.It can’t belong to other object. So
it is composition.
(4)The room just belong to a building. It can’t belong to a river or other
things.So it is composition.
2. Draw Class diagram for library system with following classes: Member,
Librarian, Teacher, student, copy, and book.
Task 03: Create Class and Object diagram (10 Scores)
3. a) Draw the class diagram. Model the relationship of a role, president with
his country.
Please do the following:
Create the class diagrams with attributes, methods and add multiplicities
to all association ends.( add for each of the classes minimum three
meaningful attribute and at least one method)
5. Develop the Use Cases for East China University of Technology (ECUT)
Registration System.
– Professors indicate which courses they will teach on-line.
– When the registration is completed, the system sends information to the billing
system.
– Tour Group customers are those who have made reservations through a tour
operator in advance, while Individual customers make their reservations directly
with the hotel
– Both types of customers can book, cancel, check-in and check-out of a room by
phone or via the Internet