Component Design: Online E-Commerce Music Store
Component Design: Online E-Commerce Music Store
Reshma Sawant
CIS 895 – MSE Project
Kansas State University
1
TABLE OF CONTENTS
1. Introduction…………………………...…………………………………………………...….3
2. Class Diagram……………………………………………………………............………...….3
2.1. Class Descriptions………………………………………………………………………..3
2.1.1. User…………………………………………………………………………….….3
2.1.2. Customer……………………………………………………………………….….4
2.1.3. Administrator……………………………………………………………………...5
2.1.4. SessionManager…………………………………………………………………...6
2.1.5. Genre………………………………………………………………………………6
2.1.6. Product…………………………………………………………………………….7
2.1.7. ShoppingCart……………………………………………………………………...7
2.1.8. CartItem…………………………………………………………………….……..8
2.1.9. Order………………………………………………………………………………9
2.1.10. OrderDetail………………………………………………………………………..9
2.1.11. ShippingInfo……………………………………………………………………..10
2.1.12. Keyword……………………………………………………………………...….10
2.1.13. searchFacade……………………………………………………………………..11
2.1.14. RecommendationSet……………………………………………………………..11
2.1.15. ProductSet………………………………………………………………………..12
2
1. Introduction
The purpose of this document is to provide a component design for the Online
MusicCD Store. The design will outline the internal design of each component.
2. Class Diagram
2.1.1. User
3
This class will handle all user actions. The User class is the super class of
Customer and Administrator.
2.1.2. Customer
This class will handle the customer actions. It inherits all the User class
responsibilities and its functions.
4
• phoneno: The user’s contact number
• creditcardInfo: The user’s credit card information for
payment
• shippingInfo: The user’s shipping information
• register(): Responsible for user registration
• login(): Responsible for user login
• updateProfile(): Responsible for updating user’s profile
information
• search(): Responsible for searching an available MusicCD
2.1.3. Administrator
This class will handle the administrator actions. It inherits all the User
class responsibilities and its functions.
5
• editCatalogDetails(): Responsible for editing the Catalog
details
• viewOrderHistory(): Responsible for viewing user’s order
history
2.1.5. Genre
This class represents a Genre
6
2.1.6. Product
This class represents collection of products of a particular genre.
2.1.7. ShoppingCart
This class represents a shopping cart that has all the products that are
added by a customer to buy.
7
• cartId: The shopping carts’ id
• productId: The id of a product contained by the shopping cart
• quantity: The quantity of cart items in the shopping cart
• dateAdded: The date when a new item is added to the cart
• item: The shopping cart item
• addCartItem(): Responsible for adding an item to the
shopping cart
• deleteCartItem(): Responsible for deleting an item from the
shopping cart
• updatequantity(): Responsible for updating the quantity of
items in the shopping cart
• viewCartDetails(): Responsible for viewing the shopping cart
details
• checkout(): Responsible for checking out
• calcUnitPrice(): Responsible for calculating the price of each
cart item based on its quantity
• calcTotalPrice(): Responsible for calculating the total price of
the cart items
2.1.8. CartItem
This class represents a cart item object.
8
• name: The name of the user
• productId: The id of the product in the shopping cart
• quantity: The quantity of cart items in the shopping cart
• unitCost: The cost of the cart item
• subtotal: The cost of the cart item based on its quantity
2.1.9. Order
This class will store all information regarding the orders made by each
customer.
2.1.10. OrderDetail
This class represents the detail of each order
9
Attributes and Methods:
2.1.11. ShippingInfo
This class represents the shipping information of each order.
10
2.1.12. Keyword
This class represents a collection of all the keywords used for the
searching.
2.1.13. searchFacade
This class has methods to get the search results according to the options
chosen by the user.
2.1.14. RecommendationSet
This class represents a collection of products recommended for the
product selected by the user.
11
Attributes and Methods:
2.1.15. ProductSet
This class represents a collection of all the products that were searched by
the user.
12