OO Programming in Java

Class 7 Material


Finish Video Pricer and GUI

Implementing Video Rental Store Price Calculator

Design an object model, appropriate scenario diagrams and code the business model for a program to handle the price calculation for a video rental store. The system must automatically compute the correct rental fees at checkout time.

The store has an inventory of tapes available for rent. Valid customers are allowed to borrow these tapes by paying a fee at the time of rental.

Fees and rental periods vary depending on the tape, and promotions. Examples of promotional fees are:

Any promotional pricing conflicts will be resolved in favor of the consumer (the cheapest price).

The important facet of this problem is the object model which must be easily extensible to handle any conceivable promotional deal.. Solutions with myriads of if statements will be incenerated received poorly.

Here's an example. You don't need to follow this exactly.

The Customer ID is entered.

Tapes are selected from the multiple select box at left. Clicking on a tape selects it to be rented. Clicking again on the same tape de-selects it.

Clicking on the 'Promotions in Effect' multiple select list box at right selects which promotions are currently active.

The Charge to customer is updated real time.