首页 新闻 会员 周边 捐助

策略模式问题

0
[已关闭问题] 关闭于 2014-06-25 22:09

The video rental system tracks the videos checked out by clients.
The system contains a catalog of the videos owned by the video rental company. Now there are three
kinds of catalog items: VCDs, SVCDs and DVDs. Maybe there are more kinds of catalog items in the
future and each one use different read disk techniques. All catalog items are identified by a unique code.
(If the company owns several copies of the same item, each copy has a unique code.) The information
for each item includes title, year, and availability. An item is available if it is not checked out. In
addition, the system contains a database of the clients. Each client has a unique identification code in
addition to a name. The system maintains a rental list, for each client, of the catalog items checked out.
In the video rental system, the user should be able to:
Display the catalog by listing the code, title, and availability of each item.
Display a catalog item.
Display the clients by listing the identification code and name of each client.
Display the catalog items checked out by a client.
Check out a catalog item by adding the item to client's list of rented items.
Check in a catalog item by removing the item from client's list of rented items.
1) Please check the system UML class diagram in figure 2 and perfect the system design using
strategy pattern according to the system requirements. You can modify the design on the figure 2.
2) Give Java implementation for class Catalog, Client and DVD based on your modified system
design.

 

Albery的主页 Albery | 菜鸟二级 | 园豆:207
提问于:2014-06-25 10:47
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册