Beruflich Dokumente
Kultur Dokumente
A.Venkat
INDEX
S.NO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
TOPICS
PAGE NO 2 4 5 6 9 11 13 15 19 19 22 22 22 24 25
Problem Statement Identification of Actors and Justification Use Case Model Use Case Documentation Diagram Sequence Diagram Identification of Classes Initial Class Diagram Identifying Attributes Identifying Methods Refining of Class Diagram Refining of Attributes Refining of Methods Detailed Class Diagram Code snippets and Snapshots
Shop Owner:
o o o Any person wishing to setup shop in the mall can send a proposal to the mall owner. The mall owner approves the proposal and confirms the deal. Shop owners can then setup and maintain their own shop(s) in the Mall.
Customers: o Customers when enter the mall have to authenticate themselves on a central server. o After authentication, the customer is allocated a shopping cart and can enter a particular shop of his/her choice for shopping.
o After entering a shop, customer can brows through the products available in the shop, can select some of them and put into the shopping cart. o Customer can anytime change the items in the cart either by adding new items or by removing existing items. Customer proceeds towards the payment counter. Finalize product list of items he finally wish to buy and make the final payment. o He/She then leaves the shop and can either enter another shop or leave the mall.
information such as product price, description, brand, title or number. He has to deliver or ship the ordered products to the
2.4 DATABASE
Database stores the details about the product information such as product price, description, brand, title or number and user details. It also contains the details about the shopping cart and the list of shops in the mall. The database can be updated, deleted and also can be used to retrieved data.
3.USECASEDIAGRAM
<<include>> login <<include>> <<include>> manage guestbook shop creation request add/remove categories System
Mall Admin
send notification
<<include>>
Shop owner
setup shop
<<include>>
add/remove items
Customer
make payment
add/view guestbook
4.USECASE DOCUMENTATION:
4.1 LOGIN
Description: The customer can login the online mall system by providing his/her username and password. Primary Actor: Mall Admin Secondary Actor: Customer Main flow: Customer provides the login details. Database activates the user account after verifying whether the details are correct and identified by an unique id. And the database will be updated whenever required. Pre-condition: Customer details must be available. Post-condition: Customer id becomes a key for future identification of customer.
5.ACTIVITY DIAGRAM
5.1 Shop proposal Activity:
Unregistered
Proposal Draft
Partial changes
Completed
submit Disapproved
Approved
Setup Shop
10
Enter Mall
Login
Enter a Shop
Exit shop
6.SEQUENCE DIAGRAM
11
7. IDENTIFICATION OF CLASS
Analysing the problem statement by looking for nouns and noun phrases, the following classes have been identified as follows: Customer Customer name Customer address Email address Phone number Sales clerk Shopping cart Quantity Catalogue Customer info Product info Username Password Product Quantity Product Price Product Brand Product description Product title Central server Mode of payment 14
Amount Personal details Customer ID no. Order form Order number Order date Reviewing the redundant classes and building common vocabulary, different words describing the same idea are grouped. Customer name, Customer address, Email address, Phone number= Customer Order form, Order number, Order date= Order Product Quantity, Product Price, Product Brand, Product Description, Product title= Product Reviewing possible attributes: Customer name, Customer address, Email address, Phone number: Attributes of Customer Shop id, password: Attributes outs of Shop Owner Customer, date, comment: Attributes of Guestbook Password: Attributes of Mall Owner Name, Shops, Guest Book: Attributes of Mall Name, items, customers, Shop id, owner: Attributes of Shop Item name, item id, shop id, price: Attributes of Item Name, address, phone, email: Attributes of Person Item name: Attribute of Shopping Cart
Reviewing the class purpose: Customer: An individual who purchases the product. Shopping cart: A class that contains complete details of all the purchased products. Item: A class that contains the product details lake product price, type, brand, description, title. Mall Owner: An individual or group of persons who approves the proposal and confirms the deal and also maintains guest books Shop: A Class that contains list of item available in the shop Mall: A Class that is maintained by Mall owner Shop Owner: An individual who has shop id, password and maintains the Shop. Person: An individual who purchases the product.
15
Person
Mall owner
Customer
Mall Shop
Shopping Cart
Item
CLASS Customer Item Shopping cart Mall Shop Owner Guest Book
RELATED CLASS Customer, Shopping cart Shopping cart Item, Customer Shop, Guest Book Customer, Guest Book Customer, Shop Owner
ASSOCIATION NAME Owns, keeps Stores Stores, keeps Has, has Have, Contains Writes , views
CARDINALITY One, One Zero or More Zero or more, One One or more, One Zero or more. One Zero or more, one
Class: ShopOwner Super Class : Person Attributes: shop_id, password. Responsibilities: Maintain Shop: Add/remove/sell items. Discontinue shop. Collaborations: Shop, Item: Add/Remove/Sell items. MallOwner: Discontinue shop.
Class: MallOwner Super Class: Person Attributes: password. Responsibilities: Maintain Mall:
17
Approve/Disapprove shop proposals, send notification to shop owners. Maintain Guestbook: View/Delete guestbook entries. Collaborations: Mall: Add/Delete Shops. ShopOwner: Send Notification about approve/disapprove proposals Guestbook: View/Delete guestbook entries . Class: Customer Super Class: Person Attributes: Responsibilities: Take comments about products and shopping experience. Get list of shops in the mall. Get list of items in the shop. Add, delete items to/from shopping cart Collaborations: ShoppingCart, Item: Add, Delete items from/to shopping ca Mall: Ask list of shops, take cart from mall. Shop: Ask list of items. Guestbook:Comments about shopping experience.
Class: Mall Attributes: name, shops, customers, guestbook, owner. Responsibilities: Set Owner after authentication. Create Shops. Display list of existing shops. Allocate shopping cart to each customer entering the shop. Take User Comment and add to guestbook. Welcome new Customer. Maintain Customer record in mall. Collaborations: Shop: Maintain record of shops, Create new shop. Owner: Authentication. 18
Guestbook: Add new Comments by Customers. Customer: Add new Customer when he/she enters. ShoppingCart: Allocate to new user.
Class: Shop Attributes: name, items, customers, owner, shop_id. Responsibilities: Set Owner after authentication. Maintain Customer record in shop. Maintain Item record in shop. Add new items to shop. Reject defected items. Do billing of customer selected items. Display items in the shop. Collaborations: Owner: Authentication. Customer: Add new Customer when he/she enters. Item, ShoppingCart: Maintain items, bill items selected from this shop.
Class: Item Attributes: name, item_id, shop_id, price. Responsibilities: Display price. Collaborations:
Class: ShoppingCart Attributes: items Responsibilities: Add item. Delete item. Collaborations: Item: Add, delete item.
Class: Guestbook
19
Attributes: customer, date, comment. Responsibilities: Enlist Comments. Add /Delete Comments. Collaborations:
name - the name of the store storeId - unique ID for the store items - items available for sale in the store customers - the customers currently in the store owner the owner of the shop Possible Methods: abstract void enter(Customer c) - customer c enters the store abstract void exit(Customer c) - customer c exits the store Enumeration customers() - returns an enumeration of the customers in the store Enumeration items() - returns an enumeration of the items available for sale in the store abstract void addToCart(shopingCart, item) - add an item to the shopping cart abstract void removeFromCart(shopingCart, item) - remove an item from the shopping cart BookStore: A possible subclass of Store ShoeStore: A possible subclass of Store GameStore: A possible subclass of Store
Item: An item for sale in a store Notable Attributes: itemName - the name of the item itemId - unique ID for the item storeId - the ID of the store from which the item came price - the price of the item Customer: A customer visiting the mall. This class extends the general person class. Notable Attributes: shoppingCart - the shopping cart being used by the customer store - the store the customer is currently in.
Possible Methods: addItemToCart() - adds a given item to shopping cart writeGuestBook() - adds his/her comments to guest book 21
removeItemFromCart() removes the added item from cart. ShoppingCart : A shopping cart for the customer. Notable Attributes: items - items currently in the shopping cart Possible Methods: Enumeration items() - returns an enumeration of the items currently in the cart addItem()- adds a given item to collection removeItem() removes the given item from the collection. calcSubTotal() calculates the incremental total of all the items in the cart. GuestBook: Customers visiting the mall can send there comments about the shopping experience at the mall to mall admin via guestbook. Each cutomer will have comment as an attribute field and the guestbook is the collection of such comments and is an attribute of the Mall class. Notable Attributes: comments customer date Possible functions: Add comment() View comments() Delete comments()
MallOwner: The owner of the mall or mall admin as referred in the class diagram above. This class also extends the person class. Notable Atttributes: password Possible functions: Notify() notifies the request for shop viewGuestBook() views the comments in the guest book ShopOwner: The owner of a shop. Each shop has a owner. This class also extends the person class. 22
Notable Atttributes: password shop_id Possible functions: Discontinue_shop() Person: Notable Atttributes: name email phone address
11.
23
# removeFromCart() : void
24
26
27
28
29
30
31