You are on page 1of 19

Shopping cart Project

M30CDE Assignment 2010-2011 Development of a Java EE e-Commerce Application

For the project files please contact me Saud_gl@msn.com

Name

: Saud Abdullah Aljaloud

Document Information
Module code and Title Submitted by Document Description M30CDE Open System Application Development Saud Lecturer

Dr. Nazaraf Shah

Name Saud

Version 1.0

Contents
Document Information ................................................................................................................................. 2 Introduction .................................................................................................................................................. 4 Purpose ..................................................................................................................................................... 4 System Overview .......................................................................................................................................... 5 description of the application associated use case scenarios .................................................................. 5 Description: ........................................................................................................................................... 5 Use case diagram ...................................................................................................................................... 6 Overview Design of the application .............................................................................................................. 7 ER diagram ................................................................................................................................................ 7 Design class diagram. ................................................................................................................................ 8

Introduction
Purpose
This software design document describes the architecture and system design of the hospital security system done as part of M27CDE Software Design 2011.

System Overview
Description of the application associated use case scenarios
Description:
This is an e-commerce application that will enable customers to shop online and also provide an administrative interface which will allow members of staff to keep track of customers orders. The application must have following minimum functionalities. Display Items for customers. Allows customers to add items to a shopping cart. Allow removal of items from the shopping cart. Update item quantities in the shopping cart as customer add item in cart. Customers can view a summary of all items and quantities in the shopping cart. Enable a customer to place an order and make payment providing credit card details. Administrative interface is required to allow staff to view and tracks customers order.

There are two main actors in the system; User and staff. Staffs are the super user of the system. He is responsible for administrative activities of the system. Updating the product lists and processing the user orders are the main responsibility of the staff. In addition he can add different categories to the system. Users are normal users of the system they can view the products lists by category, add items to their shopping cart, remove some/all of the items in the shopping cart, view the summery of the items selected, place order and make payment through the payment gateway.

Use case diagram


This diagram explains about the various actions performed by the two actors.

display Customer Orders

add Category

add Product

Staff view Customer Orders

login

logOut

user list Products add Items

manage shopping cart removeItems

make payment view summery

Overview Design of the application


ER diagram

Design class diagram.


ShowAddCatregoryServlet

ShowAddProductServlet

AddCategoryServlet

CategoryBean

CategoryDataAccess

AddProductServlet

PopulateProdutsServlet

AddToCartServlet

ProductDetailsBean

ProductDataAccess

PopulateSubcategoryServlet

RemoveCartItemServlet

ShowOnlineShopeServlet

ShowPaymentFormServlet

CloseOrderServlet

OrderBean

ShowOrderDetailsServlet OrderDetaisBean OrderDataAccess DataBaseConnector

MakePaymentServlet

PaymentBean

UserRegistrationServlet

UserDataAccess LogoutServlet

LoginServlet

UserBean

AdminLoginServlet

This e-shopping software is designed in client server model. The sever side of this software uses JSP, Servlets and java bean class [ J2EE frame work]; the database used is mySql. The clients /staff can access through web browser which is java enabled. JSP is used for the user interface creation for the dynamic pages, but this will be converted to plain html and sent to the client machine. Model-view-Controller pattern is used for the design. This gives modularity and low coupling to the design. The changes in one layer will not affect the other layers in the system. I.e., Changes in user will affect only userBean of model layer. All the servlets belongs to Controller layer of this design. This will perform request parsing first; in the second step it will create corresponding model class /classes to perform the business logic; and at the last it will forward the control to view class with the result. JSP [java Server Page] files forms the view layer of this design. These files will generate dynamic html with the result values forwarded by the controller Servlets. View layer is the presentation Layer in the design. This will have the user interface to interact with the End Users of the system. JSP tags will be embedded in html pages and while execution these tags will be converted to servlets. Model layer does the business logic of this software. A number of Java bean classes build this layer. In this design model layer is again split into tree sub layers for more modularity. The first layer consist of entity classes , the second layer consists of DB access classes and the third layer id the Database Connector class. All the database connection related information is isolated to the third Layer, this kind of a design makes it easy to change from one software vendor to other. And only one class need to be modified for this. Access lasses will have sql queries for the data manipulation from the database. This layer will help in realizing the entity classes. Entity calluses will perform the core business logic through its methods with the help of Data Access Layer.

Task Description 1.TASK


New User Registration SUBTASK Get details from user as follows UserId Password First Name Last Name Email Country Zip State City Address Phone Fax TESTCASE

UserId should not be left blank and should be less than or equal to 30 characters Password should not be left blank and should be less than or equal to 30 characters First Name should not be left blank and should be less than or equal to 30 characters Last Name should not be left blank and should be less than or equal to 30 characters Email should not be left blank and should be less than or equal to 30 characters Country should not be left blank and should be less than or equal to 30 characters Zip should not be left blank and should be less than or equal to 30 characters State should not be left blank and should be less than or equal to 30 characters City should not be left blank and should be less than or equal to 30 characters Address should not be left blank and should be less than or equal to 30 characters Phone should not be left blank and should be less than or equal to 30 characters Fax should be less than or equal to 11 characters

10

EXPECTED RESULT The UsedId and Password should be saved in the database along with all the Personal information entered during registration. REMARK New User Registration Successful TEST RESULT The UserId, Password and the personal information of the new user is saved in the database successfully.

2.TASK
User Login TESTCASE

UserId : Use UserId registered during New User Registration. Password as per user registration.

EXPECTED RESULT Log in to Shopping Cart Welcome Page REMARK Login Successful for Registered user TEST RESULT Log in using the registered UserId and Password is successful.

3.TASK
Add items to Cart (Online Shopping) SUBTASK Select a Category o Select a Sub Category o Add items to Cart Add more than one item
11

Remove item from cart

TESTCASE Item Category has to be selected before going for sub-category. EXPECTED RESULT The desired item has to be listed in cart properly when added to cart and when more than one item is added to cart, the total price has to be the sum of prices of the items in the cart. When an item is removed from cart, the price of the item should be reduced from the total price. REMARK The items selected are successfully added to cart. The item is removed successfully as required. TEST RESULT Sub Categories are listed properly under corresponding Categories. Items added are displayed in cart and total price is displayed as sum of prices of the items in cart. When an item is removed from cart, the total price is getting reduced to the total price of items present in cart.

4.TASK
Checkout the items in cart and Place order SUBTASK Select credit Card Type Enter Credit Card Number Enter Credit Card Expiry Date Enter Card Holder Name Enter CVV number Enter customer Notes, if any TESTCASE
12

A valid Credit Card Type has to be selected Credit Card number has to be entered in less than or equal to 20 characters Credit Card Expiry Date has to be entered in date format (YYYY MM) Credit Card Holder Name has to be entered in less than or equal to 30 characters CVV number has to be entered in less than or equal to 11 numbers Customer note can be entered in less than or equal to 255 characters

EXPECTED RESULT The items added to cart has to be shown in the cart shown in the page and the order should be placed after successful validation of the credit card details. REMARK Order Placed Successfully. TEST RESULT The selected items were shown in the check out window and the order is placed successfully after the validation of Credit card Details.

5.TASK
Administrative Login SUBTASK Login to admin account View orders placed by customers View detailed information regarding orders placed by customers TESTCASE The admin user name has to be entered in the Login ID field and respective password has to be entered. EXPECTED RESULT Should enable you to view the orders placed by customers Should get detailed information regarding the orders placed REMARK Login in to administrative account successful. TEST RESULT
13

Successfully logged into administrative account after providing valid login ID and password. The orders placed by customers are displayed accurately and detailed information regarding the orders is successfully displayed.

6.TASK
Checkout the orders placed by customers. TESTCASE There should be at least one order placed by a customer. EXPECTED RESULT The order should be checked out and the pending order list has to be cleared. REMARK Successfully checked out. TEST RESULT The order placed by customer is successfully checked out.

Evidence of implementation
Screen shots
USER LOGIN PAGE (INDEX)

NEW USER REGISTRATION 14

REGISTRATION SUCCESSFUL

USER LOGGED IN

ONLINE SHOPPING WINDOW

15

CHECK OUT WINDOW

ORDER PLACED SUCCESSFULY

16

ADMIN LOGIN PAGE

ADMIN PAGE

ADMIN PAGE DETAILED VIEW

17

PRODUCT CHECKED OUT

ADD CATEGORY WINDOW

18

ADD PRODUCTS WINDOW

19

You might also like