Given the course project problem statement excerpts below, diagram the generalization.
- Identify the properties of discount from the problem statement.
- Place all the properties into a class definition.
- Select a discriminator that describes the distinguishing characteristic(s) or classification criteria for the different types.
- Create a subclass for each value of the discriminator.
- Connect the subclasses to the superclass with a generalization association.
- Repeat the process until every distinguishing criteria has been documented. Select a discriminator that describes the distinguishing characteristic(s) or classification criteria for the different types.
- Create a subclass for each value of the discriminator.
- Connect the subclasses to the superclass with a generalization association.
- Identify the properties that are not common to all types of discounts. Move the unique properties down to the subclasses that they describe.
We want the system to support different types of discounts. Volume discounts may be based on either the number of tickets purchased or the amount of money spent on the purchase.
Group discounts are based on membership in a particular group, for example, a company or charity organization.
All the discounts are stated as a percentage credit against the total purchase price for a group of tickets.