shopping cart project in java 2ee web based
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.for the project files contact me [email protected]TRANSCRIPT
Shopping cart Project
M30CDE Assignment 2010-2011
Development of a Java EE e-Commerce Application
For the project files please contact me
Name : Saud Abdullah Aljaloud
1
Document InformationModule code and Title M30CDE Open System Application Development
Submitted by Saud Lecturer Dr. Nazaraf Shah
Document Description
Name Version
Saud 1.0
2
ContentsDocument Information................................................................................................................................2
Introduction.................................................................................................................................................3
Purpose...................................................................................................................................................3
System Overview.........................................................................................................................................4
description of the application associated use case scenarios..................................................................4
Description:.........................................................................................................................................4
Use case diagram.....................................................................................................................................5
Overview Design of the application.............................................................................................................6
ER diagram...............................................................................................................................................6
Design class diagram...............................................................................................................................8
3
Introduction
PurposeThis software design document describes the architecture and system design of the hospital security system done as part of M27CDE – Software Design 2011.
4
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.
5
Use case diagramThis diagram explains about the various actions performed by the two actors.
login
logOut
view Customer Orders
add Product
add Category
Staff
display Customer Orders
list Products
user
make payment
add Items
removeItems
manage shopping cart
view summery
6
Overview Design of the application
ER diagram
7
Design class diagram.
CategoryDataAccess
OrderDataAccess
ProductDataAccess
UserDataAccess
DataBaseConnector
AddCategoryServlet
AddProductServlet
AddToCartServlet
AdminLoginServlet
CloseOrderServlet
LoginServlet
LogoutServlet
OrderBean
MakePaymentServlet
PaymentBean
PopulateProdutsServlet
PopulateSubcategoryServlet
RemoveCartItemServlet
ShowAddCatregoryServlet
ShowAddProductServlet
ShowOnlineShopeServlet
CategoryBean
ShowOrderDetailsServlet
OrderDetaisBean
ShowPaymentFormServlet
ProductDetailsBean
UserRegistrationServlet
UserBean
8
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.
9
Task Description1.TASK
New User Registration
SUBTASKGet 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
EXPECTED RESULT
10
The UsedId and Password should be saved in the database along with all the Personal information entered during registration.
REMARKNew User Registration Successful
TEST RESULTThe UserId, Password and the personal information of the new user is saved in the
database successfully.
2.TASKUser Login
TESTCASE UserId : Use UserId registered during New User Registration. Password as per user registration.
EXPECTED RESULTLog in to Shopping Cart Welcome Page
REMARKLogin Successful for Registered user
TEST RESULTLog in using the registered UserId and Password is successful.
3.TASKAdd items to Cart (Online Shopping)
SUBTASK Select a Category
o Select a Sub Category
o Add items to Cart
Add more than one item Remove item from cart
11
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.
REMARKThe items selected are successfully added to cart.The item is removed successfully as required.
TEST RESULTSub 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.TASKCheckout 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 A valid Credit Card Type has to be selected Credit Card number has to be entered in less than or equal to 20 characters
12
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 RESULTThe 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.
REMARKOrder Placed Successfully.
TEST RESULTThe selected items were shown in the check out window and the order is placed
successfully after the validation of Credit card Details.
5.TASKAdministrative Login
SUBTASK Login to admin account View orders placed by customers View detailed information regarding orders placed by customers
TESTCASEThe 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
REMARKLogin in to administrative account successful.
TEST RESULTSuccessfully logged into administrative account after providing valid login ID and
password.
13
The orders placed by customers are displayed accurately and detailed information regarding the orders is successfully displayed.
6.TASKCheckout the orders placed by customers.
TESTCASEThere should be at least one order placed by a customer.
EXPECTED RESULTThe order should be checked out and the pending order list has to be cleared.
REMARKSuccessfully checked out.
TEST RESULTThe 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