report shopping mall management system.unlocked

Upload: krishna-paprunia

Post on 04-Apr-2018

232 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    1/31

    1

    SHOPPING MALL

    MANAGEMENT SYSTEM

    -

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    2/31

    2

    INDEX

    S.NO TOPICS PAGE NO

    1 Problem Statement 2

    2 Identification of Actors and Justification 4

    3 Use Case Model 5

    4 Use Case Documentation 6

    5 Diagram 9

    6 Sequence Diagram 11

    7 Identification of Classes 13

    8 Initial Class Diagram 15

    9 Identifying Attributes 19

    10 Identifying Methods 19

    11 Refining of Class Diagram 22

    12 Refining of Attributes 22

    13 Refining of Methods 22

    14 Detailed Class Diagram 24

    15 Code snippets and Snapshots 25

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    3/31

    3

    1.PROBLEM STATEMENT:

    Managing a simple shopping mall :

    The mall will provide a soothing shopping experience for customers, Also the system will allow more

    than one shop owner to set up different shops, to sell various products under one roof i.e. mall. The concept, at

    its very basic, provides for an environment that allows the following:

    Shop Owner:

    o Any person wishing to setup shop in the mall can send a proposal to the mall owner.

    o The mall owner approves the proposal and confirms the deal.

    o 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.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    4/31

    4

    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.

    2.IDENTIFICATION OF ACTORS AND JUSTIFICATION:

    2.1 CUSTOMER

    Actors who use the shopping mall management system by authenticating themselves on a central server, provided

    by a shopping cart in order to purchase product by browsing the available products and the purchased product is

    added to the shopping cart. They can also view their shopping cart. They can even update their personal

    information.

    2.2 MALL ADMIN

    Actor who approves the proposal and confirms the deal. He will also update list of shops information in the

    database.

    2.3 SHOP OWNER

    Shop owners can then setup and maintain their own shop(s) in the Mall. Actor who request to update product

    information such as product price, description, brand, title or number. He has to deliver or ship the ordered products to the

    customer.

    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.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    5/31

    5

    3.USECASEDIAGRAM

    System

    Mall Admin

    Shop owner

    Customer

    login

    manage guestbook

    add/remove categories

    shop creation request

    send notification

    discontinue shop

    setup shop

    add/remove items

    send notifications to admin

    check order details

    add/remove items to chart

    modify order

    make payment add/view guestbook

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    6/31

    6

    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.

    4.2 ADD OR REMOVE CATEGORY:

    Description: The customer identifies his/her products and adds them to the shopping cart.

    The products in shopping cart can be viewed, updated and deleted.

    Primary Actor: Customer

    Secondary Actor: Shop owner

    Main flow: Customer purchases the available product and those purchased product is added in the shopping cart. The

    database will store and keeps track the information of the product that is added in the shopping cart.

    Pre-condition: Product must be available in the catalog to be purchased.

    Post-condition: The purchased product is registered and the customers credit card number is received.

    4.3 MANAGE GUESTBOOK

    Description: The Mall admin maintains a guest book for customers to enter their reviews.

    Primary Actor: Customer

    Secondary Actor: Mall AdminMain flow: The Mall admin maintains a guestbook in order to obtain review from customer.The customer can enter their

    opinions and feedback in the guestbook.

    Pre-condition: The customer visiting the mall can use the guestbook.

    Post-condition: The mall admin reads through the guestbook and sends notification to the particular customer depending

    on the feedback.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    7/31

    7

    4.4 SHOP CREATION REQUEST

    Description: Any new person who wants to open a new shop within the mall sends a request to the mall admin.

    Primary Actor: Shop owner

    Secondary Actor: Mall Admin

    Main flow: A new shop owner seeks a request to open a new shop in the mall.

    Pre-condition: The person should send the request to the mall admin

    Post-condition: The mall admin views through the request and decides whether to provide permission or not.

    4.5 SETUP SHOP

    Description: The Shop owner sets up his shop after obtaining permission from the Mall Admin.

    Primary Actor: Shop owner

    Secondary Actor: Mall admin

    Main flow: The Mall admin decides whether to give permission for a Shop owner to open a new shop.After

    obtaining permission from Mall admin , shop owner opens his new shop.

    Pre-condition: Mall admin should have granted request for shop owner for his new shop request.

    Post-condition: The shop owner sets up his new shop .

    4.6 ADD/REMOVE ITEMS

    Description: The shop owner manages the shop by adding necessary items and removing unnecessary items.

    Primary Actor: Shop owner

    Secondary Actor: Mall admin

    Main flow: The Shop owner makes an entire stock analysis of the mall and based on customers needs , decides to

    add and remove items in the shop.

    Pre-condition: The Shop owner makes a list of items to be added and removed..

    Post-condition: After adding and removing , the mall admin will be notified with the stock details.

    4.7 CHECK ORDER DETAILS

    Description: The customer makes a list of items to be purchased from the shop.

    Primary Actor: Customer

    Secondary Actor: Shop owner

    Main flow: The customer makes a list of items to be purchased from the shop.Then the customer as well as the shop

    owner makes an order and both of them check it.

    Pre-condition: The customer decides a list of items to be purchased and makes a list.

    Post-condition: The shop owner confirms whether the requested stock is available in the shop.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    8/31

    8

    4.8 ADD/REMOVE ITEMS TO CART

    Description: The customer decides whether to make a modification in the order list.

    Primary Actor: Customer

    Secondary Actor: Shop owner

    Main flow: The customer after making an order, confirms the purchase by adding only necessary items to the cart andremoving the rejected items.

    Pre-condition: The customer makes the order and reviews his order based on the availability of items.

    Post-condition: The checked items are added to the cart and the purchase is confirmed .

    4.9 MAKE PAYMENT

    Description: At the end of the purchase , the total amount is calculated by the shop owner.

    Primary Actor: Customer

    Secondary Actor: Shipping clerk

    Main flow: The shop owner calculates the total amount to be paid and the customer makes the requested to finish the

    purchase.

    Pre-condition: The shop owner calculates the total amount of the items purchased by the customer.

    Post-condition: The total amount will be paid by customer to the shop owner and the items will be delivered.

    4.10 ADD/VIEW GUESTBOOK

    Description: The Mall admin maintains a guestbook to maintain a correlation between the customers and shop owners of

    the mall.

    Primary Actor: Customer

    Secondary Actor: Mall admin

    Main flow: The customer can provide his/her feedback about the mall through a guestbook and can also view other

    custoomers feedback .The mall admin later views through the guestbook and makes appropriate changes in the

    mall

    Pre-condition: The customer enters his/her feedback in the guestbook .

    Post-condition: The mall admin then reviews through the guestbook and makes appropriate changes in the mall as and

    when needed.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    9/31

    9

    5.ACTIVITY DIAGRAM

    5.1 Shop proposal Activity:

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    10/31

    10

    5.2 CUSTOMER ACTIVITY:

    Unregistered

    Proposal Draft

    Completed

    Approved

    Setup Shop

    Partial changes

    Disapproved

    submit

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    11/31

    11

    Enter Mall

    Login

    Enter a Shop

    Browse List of items

    Add item to Cart

    Modify items in cart

    Buy items in cart

    view/add comments in GuestBook

    Exit shop

    Exit Mall

    6.SEQUENCE DIAGRAM

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    12/31

    12

    6.1 Customer Authentication

    6.2 ADD TO SHOPPING CART & VIEW SHOPPING CART

    6.3 Customer buying product

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    13/31

    13

    6.4 Shop Proposal

    6.5 Guest Book

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    14/31

    14

    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

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    15/31

    15

    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

    booksShop: 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.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    16/31

    16

    8. INITIAL CLASS DIAGRAM

    RELATIONSHIP ANALYSIS

    8.1 DEVELOPING INITIAL CLASS DIAGRAM

    Person

    Shop owner

    Customer

    Mall owner

    Shop

    Guest book

    Shopping Cart

    Mall

    Item

    8.2 DEFINING ASSOCIATION RELATIONSHIPS

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    17/31

    17

    CLASS RELATED CLASS ASSOCIATION NAME CARDINALITY

    Customer Customer, Shopping cart Owns, keeps One, One

    Item Shopping cart Stores Zero or More

    Shopping cart Item, Customer Stores, keeps Zero or more, One

    Mall Shop, Guest Book Has, has One or more, One

    Shop Owner Customer, Guest Book Have, Contains Zero or more. One

    Guest Book Customer, Shop Owner Writes , views Zero or more, one

    8.3 Class Responsibility Collaborations (CRC):

    Class: Person

    Attributes: name, address, phone, email.

    Responsibilities:

    Collaborations:

    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:

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    18/31

    18

    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.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    19/31

    19

    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

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    20/31

    20

    Attributes: customer, date, comment.

    Responsibilities:

    Enlist Comments.

    Add /Delete Comments.

    Collaborations:

    10. IDENTIFYING METHODS & ATTRIBUTES:

    Here's a brief description of the objects and methods, we identified with respect to our project.

    Mall

    Mall will provide a single roof for various shops. The mall performs the creation of a set of different shops, such as

    a book store, a shoe store, etc. The mall greets an arriving customer, performs authentication for him/her and

    allocates him/her the shopping cart. Mall presents the customer with a list of different stores availble and allows the

    customer to shop at any of stores in the mall.

    Some of the things a customer can do at the mall are:

    Get a list of available stores

    Get a shopping cart

    Enter a store /shop

    Notable Attributes:

    name - the name of the mall

    shops - a collection of stores of different types

    customers - the customers currently in the mall

    owner the owner of the mall.

    guestbook a collection of comments by different customers

    Possible Methods:

    void enter(Customer c) - customer c enters the mall

    void exit(Customer c) - customer c exits the mall

    ShoppingCart getShoppingCart - returns an empty shopping cart

    Enumeration customers() - returns an enumeration of the customers in the mall

    void checkout(shoppingCart cart) - checkout and purchase the items in the shopping cart

    Shop: The Abstract superclass for a shop

    Notable Attributes:

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    21/31

    21

    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 customerstore - 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

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    22/31

    22

    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.

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    23/31

    23

    Notable Atttributes:

    password

    shop_id

    Possible functions:

    Discontinue_shop()

    Person:

    Notable Atttributes:

    name

    email

    phone

    address

    11. REFINING INITIAL CLASS DIAGRAM

    12. REFINING METHODS & ATTRIBUTES

    Refining attributes ofMall class:

    After refining, the method of mall class is:

    #enter: void

    #exit: void

    #getShoppingCart: Shopping Cart

    #customers: enumeration

    #checkOut: void

    Refining methods of Shop class:

    After refining, the attributes of Shop class is:

    #enter(): void

    # exit(): void

    #customers(): enumeration

    #items(): enumeration

    #addToCart(): void

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    24/31

    24

    # removeFromCart() : void

    Refining methods of Customer class:

    After refining, the attributes of Customer class is:

    #addItemToCart(): void

    #writeGuestBook(): void

    #removeItemFromCart(): void

    Refining methods of Shopping Cart class:

    After refining, the attributes of shopping Cart class is:

    # items(): enumeration

    #addItem(): void

    #removeItem(): void

    #calcSubTotal(): void

    Refining methods of Guest Book class:

    After refining, the attributes of Guest Book is:

    #Add_comment(): void

    #View_comments(): void

    #Delete_comments(): void

    Refining methods of Mall Owner class:After refining, the Mall Owner class is:

    #Notify(): void

    #viewGuestBook(): void

    Refining methods of Shop Owner class:

    After refining, the Shop Owner class is:

    #Discontinue_shop(): void

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    25/31

    25

    14. DETAILED CLASS DIAGRAM

    15. CODE SNIPPETS AND SNAPSHOTS

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    26/31

    26

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    27/31

    27

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    28/31

    28

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    29/31

    29

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    30/31

    30

  • 7/31/2019 Report Shopping Mall Management System.unlocked

    31/31