Examine the Use Case in Figure 4 and explain the MVC architecture of the online bookstore needed to Lookup Books and Add to Shopping Cart.
Figure 4: Use case diagram for a customer using a shopping cart at an online bookstore.
Lookup Books
Model: Online bookstore database, which contains all of the required information about the book as well as information on the current inventory status.
Views: Book search form, Book Search Result Page
Controllers: BookSearch() - method containing algorithm that utilizes information entered on the form to search the database for hits and returns them if any.
Add to shopping Cart
Models: Customer & Orders Table in the database. Customers table will hold all of the relevant information about the customer, whereas the Orders will contain Information about the orders in relation with a particular customer.
Views: Shooping cart List
Controllers: CartManager() - method containing functions to add/edit remove entries to the shopping cart.
0 comments:
Post a Comment