Arthur Dick
Stephen Cartwright
Vijay Patadia
November 16, 2004
Assignment Specifications
The Problem:An electronics rental company wants to develop a system to track their rentals, returns, and reserve items. Rental items could be televisions, dvd players, cd players, other various electronics, or packages containing multiple items. You will be required to interface to multiple existing databases, and the company is unwilling to use any other storage strategy. |
UML Solution:
|
Description:We are using the composite pattern to represent both the base rental items as well as packages. Packages can then be combined to create even larger packages. To create a unified access point for the multiple databases, the facade design pattern can be used. This way the facade class is responsible for modifying the data in the databases. This way the classes using the data don't need to know how to access the individual databases on their own. Also, if the company does decide to change the way they store their data in the future, only the facade class will need to be updated to allow for this change. The rentals will be handled as transactions. Each time there is a rental, return, or a reserved item, a transaction will be created and passed to a transaction controller, which would be responsible for executing the actual transaction. The transaction could then use the facade class rather than needing to know how to access each individual database on it's own. |