Problem Analysis  «Prev  Next»

Modeling Composition - Exercise Result

Course project: Modeling Aggregation and Composition

You entered:

Excerpt 1: The auditorium is made up of a number of seats arranged in a floor plan. There is only one floor plan for the auditorium. All possible seat locations are accounted for on this plan.
  1. Identify the classes involved (in bold). The auditorium is made up of a number of seats arranged in a floor plan. There is only one floor plan for the auditorium. All possible seat locations are accounted for on this plan.
    Identify classes
    1) Identify the classes
  1. Identify the associations between the classes (in bold).
    The auditorium is made up of a number of seats arranged in a floor plan. There is only one floor plan for the auditorium. All possible seat locations are accounted for on this plan.
    These key phrases, "made up of," "arranged in," and "are accounted for on," all point to the facts that the seats are part of the floor plan, and the floor plan is part of the auditorium.
    Identify associations
    2) Identify the associations
  1. Draw the associations and apply the proper icon to represent either aggregation or composition.
    In this case, composition is appropriate because the seats have meaning to our system only as part of the auditorium. We do not sell the seats for use in other auditoriums. Also, as far as we are concerned, if the seat does not appear on the auditorium floor plan, it does not exist.
    Draw associations
    3) Draw associations

Unified Software Development Process
  1. Assign multiplicity to each end of each association.
    Assign multiplicity
    4) Assign multiplicity
  1. Add constraints where needed to account for all the rules documented in the problem statement.
    Add constraints
    5) Add constraints
Excerpt 2
Pricing is done using a pricing plan. A pricing plan consists of a set of price tiers. Each price tier defines prices for one or more price types: adult, senior, student, and child. The event planner may also add one or more discounts to the pricing plan to try to improve sales.
  1. Identify the classes involved (in bold).
    Pricing is done using a pricing plan. A pricing plan consists of a set of price tiers. Each price tier defines prices for one or more price types: adult, senior, student, and child. The event planner may also add one or more discounts to the pricing plan to try to improve sales.
    Identify classes
    1) Identify classes
  1. Identify the associations between the classes.
    Identify associations
    2) Identify associations
  1. Draw the associations and apply the proper icon to represent either aggregation or composition.
    In this case, Discounts and PriceTiers are reused in a number of different PricingPlans. A PricingPlan may be deleted or archived, and Discounts and PriceTiers are still available for use in other PricingPlans. Hence, model the association as aggregation, not composition.
    Draw the associations
    Draw the associations
  1. Assign multiplicity to each end of each association.
    Assign multiplicity
    3) Assign multiplicity
  1. Add constraints where needed to account for all the rules documented in the problem statement.
    Add constraints
    4) Add constraints