70 likes | 161 Views
Exercise Due Monday, December 2 The slides that follow are the following: Slide 2: the general events for the World Class Video system. Slides 3-5: the structured English and two versions of the Dynamnic Object model for checking out a movie Slide 6: The DFD for checking in a movie
E N D
Exercise Due Monday, December 2 The slides that follow are the following: Slide 2: the general events for the World Class Video system. Slides 3-5: the structured English and two versions of the Dynamnic Object model for checking out a movie Slide 6: The DFD for checking in a movie Slide 7: The static Object model for checking in a movie. Your task: draw the messages needed and write the structured English for checking in a movie in an OO environment. Make sure you encapsulate some process in the Historical Rental Class. This will happen automatically if, when you want to create a new Historical Rental instance, you only pass MovieID, CustID and Date to the Historical Rental Class
Events for World Class Video Add a new Movie (or modify existing) Add a new Customer (or modify existing) Remove a Customer Remove a Movie Check Out a Movie Check In a Movie Add a Price Category (or modify existing) Add a Content Category (or modify existing)
Check out a movie. Create a current rental object, adding DateOut, DateDue. Get custID and movieID from “Flesh and Blood” customer 1. From customer class, get name, lateFees for this custID. Link to Customer. 2. From Movie class, request “Get Price” (giving MovieID, CustID). [3. Movie must get M-price, N-price from PriceCat class, for this price cat.] [4. Movie must get MemStat from Customer class, (CustID)] Movie will pass back the price. 5. From Movie class, get title (MovieID). Link to Movie. Add latefees and price; ask customer for this payment. From customer, get payment. 6. Send message to Customer object, updating latefees Print receipt.
Historical Rental Date Customer Content Cat Cust ID Name Mem Stat Late Fees Category code Description 4.Ask for MemStat (CustID) 1.Ask for Name, Late Fees (CustID). 6.Update LateFees (CustID) 2.Do “Get Price” (CustID, MovieID) 3.Ask for M-Price, N-Price (PriceCode) Current Rental Movie Price Cat Price code Description M-Price N-Price Date Out Due Date Movie ID Title 5. Ask for Title (MovieID) Check Out Movie Check In Movie Get Price
Customer Current Rental Movie Price Cat Historical Rental Content Cat Ask for Name, Late fees (CustID) Ask for Price (MovieID, CustID) Ask for M-Price, N-Price (PriceCode) Ask for MemStat (CustID) Ask for Title (MovieID) Ask for Zeroing of Latefees (CustID) Note shown: all interactions with external Customer
Customer Content Cat Historical Rental Cust ID Name Mem Stat Late Fees Category code Description Date Method 1 Method 2 Method 1 Method 2 Create HistRentals Method 2 Current Rental Movie Price Cat Price code Description M-Price N-Price Date Out Due Date Movie ID Title Check Out Movie Check In Movie Get Price Method 1 Method 2