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.
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 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.
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.
Assign multiplicity to each end of each association.
Add constraints where needed to account for all the rules documented in the problem statement.
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.
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 the associations between the classes.
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.
Assign multiplicity to each end of each association.
Add constraints where needed to account for all the rules documented in the problem statement.