Class diagram Version 1:

  Class diagram Version 2:

 - In Class Diagram version 1 above, the updateCatalog() method for Administrator was mentioned as

    a combined method against the explicit methods mentioned for Administrator class in class diagram version 2.

 - The search() method is added to Customer class to match the UseCase diagram.

 - Also, association between the Customer class and the ShoppingCart class should be Shared and not aggregation.

  Class diagram Version 3:



  Class diagram Version 4:

Class Descriptions

1) User

This class handles all user actions. The User class is the super class of Customer and Administrator. It includes the private methods to verify the login of the user. The verifyLogin() method is called when the user clicks the "Sign In" button on the Login.aspx Web form. It returns true if the login is successful, false if it is not.

2) SessionManager

The SessionManager class supports the Userís required operations like getUser() and getdepartment(). The getUser method is called when the user information needs to be displayed. The getdepartment() method is used to get the exisiting departments in the catalog. When the user needs to get a product, the system has to start from the Session Manager and navigate down to the Product class.

3) Administrator

This class handles the Administrator actions. It inherits all the User class responsibilities and its functions. It has a functions createDepartment(), createCatogory(), createProduct() are called when the administrator has to create/add a new department or category or product respectively to the catalog. Similarly, operations like deleteDepartment(), deleteCategory() and deleteProduct() are called when deleting a department/category/product respectively from catalog. For these delete operations to be valid there should be atleast one department, category and product already existing in the Catalog. Also, the editCatalogDetails() method enables administrator to edit and update the product details.

Conditions for createProduct Operation

4) Customer

This class handles the customer actions. It inherits all the User class responsibilities and its functions. The updateProfile() method is called when customer wants to edit, update and save his/her personal information on the website for future use. But to update profile, customer must register and login through the Register.aspx and Login.aspx Webpage which uses the register() and login() methods. Also, the search() function is called when customer searches for some product and enters some Key-Words in the text-box on Search.aspx page.

Conditions for Login Operation

5) Department

This class has all different departments line Jazz, Pop etc. This class has a private method called getCategoryInDepartment which is used get all the categories in a particular department. A department may contain zero or more categories and the corresponding products.

6) Category

This class has all different categories for the corresponding departments. This class has a private method called getProductsInCategory which is used get all the products bellonging to a particular category and department. A category can belong to one or more departments. Also, a category can contain zero or more products.

7) Product

This class represents collection of products of a particular category and/or department. The displayProduct() and getProductDetails() method are called when the user clicks on a product or on the "Search" button on the Search.aspx Web form. The displayProduct() method is used to retrive image of the product and getProductDetails() method retrives its details as a data set whenever a customer clicks on the product. A product can belong to one or more departments and/or categories.

8) ShoppingCart

ShoppingCart class has all the products that are added by a customer to buy. The addCartItem() and deleteCartItem() methods are called when customer performs actions like "Add to Cart" and "Delete" of products on the ShoppingCart.aspx Webpage. The updatequantity() method is called when Customer clicks "Update" button on ShoppingCart.aspx Webpage to increase or decrease the number of products in the cart. Also, viewCartDetails() method is called when customer clicks on the "View Details" button to see a summary of the cart. It will display the summary only when cart is not empty, else it will display "Your Cart is empty."

Conditions for addCartItem Operation

Conditions for Checkout Operation

9) Orders

This class will store all information regarding the orders made by each customer. The placeOrder() method is called when customer clicks on the "Place Order" button on the Order.aspx Web form. It returns true if the order is placed successfully, false if it is not. The "Place Order" button will be enabled only when customer has a valid shopping cart and has entered valid personal, billing and shipping details.

Conditions for placeOrder Operation

10) ShippingInfo

This class handles the shipping information regarding every customer and their orders. The updateShippingInfo() method is called when customer edits his/her shipping Information and clicks the "Update" button on Profile.aspx Webpage.

11) OrderDetail

This Class handles details regarding every order that the customer makes. The calcPrice() method is called to calculate the total amount of the order placed. The method also calculates the total amount of the order including the shipping charges once the customer has selected the shipping region.

12) CartItem

A CartItem object indicates the quantity, unitcost, subtotal amount of the product selected by a customer. When a customer performs a product selection and clicks "Add to Cart" button, a new cartItem object is created and added to the cart. The calcPrice() method is called to calculate the total amount of the items added to cart.