OOPortal OOPortal


Problem Analysis  «Prev  Next»

Modeling Object Oriented Generalization - Exercise

Course project: modeling generalization

Objective: Model generalization based on excerpts from the course project problem statement.

Exercise scoring


Background/overview


Download files

No downloadable files are required to complete this exercise.

Instructions

Given the course project problem statement excerpts below, diagram the generalization.
  1. Identify the properties of discount from the problem statement.
  2. Place all the properties into a class definition.
  3. Select a discriminator that describes the distinguishing characteristic(s) or classification criteria for the different types.
  4. Create a subclass for each value of the discriminator.
  5. Connect the subclasses to the superclass with a generalization association.
  6. 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.
  7. Create a subclass for each value of the discriminator.
  8. Connect the subclasses to the superclass with a generalization association.
  9. Identify the properties that are not common to all types of discounts. Move the unique properties down to the subclasses that they describe.

Problem statement

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.