Sie sind auf Seite 1von 4

COMP5028 Object Oriented Analysis and Design Semester 2, 2004

Assignment Two
-- Online Shopping System --
Due on: Wednesday October 20, 2004

School of Information Technologies


The University of Sydney

Objective
In this assignment you will do an initial design and implementation of an online-shopping
system for Nemean Electronics based on initial use case analysis done by a system
analyst.

Basic functional requirements


The system should allow customers to display catalogue based on brand name or price. It
will create a shopping cart for each customer and can manage multiple shopping carts
identified by cartID at the same time. Customers can select items from the catalogue and
add it to a shopping cart. They can also delete items from the cart. Each time a customer
adds or delete an item in the shopping cart, the system will display the updated cart
content to the customer with the current total price. After customers finish shopping, they
can check out the content of the shopping cart. An order will be created and presented to
the customer. Customer might simply discard a shopping cart by never checking it out.
The Company needs to run a daily statistic report to show all completed orders and
discarded carts.

Use cases that client wants to be realized in the initial design


1. Create a new shopping cart
2. Add an item in shopping cart
3. Delete an item in shopping cart
4. Check out shopping cart content
5. Add a customer
6. Update inventory level
7. Check inventory level of an item
8. Display catalog to the customer
9. Run daily statistic report

Elaborated use cases (actors are not shown as they are irrelevant in
this initial design)
Use case 1
Name: Create a new shopping cart
Basic flow of events:
1. System creates an empty shopping cart by assigning a cartID to it.
2. System places it in a shopping cart bay.
Alternative flow of events
1a. cartID in use: prompt an error message

1
COMP5028 Object Oriented Analysis and Design Semester 2, 2004

Use case 2
Name: Add an item in shopping cart
Basic flow of events:
1. Customer add an item with cartID, itemID and quantity
2. System check if the inventory is enough
3. System update the inventory level
4. Updated shopping cart contents and total price are displayed
Alternative flow of events
1a. itemID invalid: display error message, abort transaction
2a. Inventory is not enough: display error message, abort transaction

Use case 3
Name: Delete an item in shopping cart
Basic flow of events:
1. Customer remove an item with cartID, itemID and quantity
2. System update the inventory level
3. Updated shopping cart contents and total price are displayed.
Alternative flow of events
1a. itemID invalid: display error message, abort transaction

Use case 4
Name: Check out shopping cart content
Basic flow of events:
1. Customer check out with customer ID and cartID
2. System update inventory level
3. Order is presented to customer with customer’s name, address, credit card
number, ordered items and total price.
Alternative flow of events
1a. customerID or cartID invalid: display error message, abort transaction

Use case 5
Name: Add a customer
Basic flow of events:
1. Customer’s name, address and credit card no. are recorded, a customer ID is
assigned as well
Alternative flow of events
1a. Customer data invalid: display error message, abort transaction

2
COMP5028 Object Oriented Analysis and Design Semester 2, 2004

Use case 6
Name: Update inventory level
Basic flow of events:
1. When customer adds an item with itemID and quantity (q) in the shopping cart, q
pieces of that item are put as “in cart”.
2. When customer deletes an item with item ID and quantity (q) in the shopping cart,
q pieces of the item are put back as “available”
3. When customer check out an item with quantity (q), the availability inventory will
be decreased by q
4. Salesperson can also update inventory by replenishing items with quantity (q). In
that case, the availability inventory will be increased by q
Alternative flow of events
*a itemID invalid: display error message, abort transaction
1a. inventory is not enough: display error message, abort transaction

Use case 7
Name: Check inventory level of an item
Basic flow of events:
1. Customer query inventory with itemID
2. System display inventory information including item name, price, quantity in cart
and quantity available.
Alternative flow of events
1a. itemID invalid: display error message, abort transaction

Use case 8
Name: Display catalog to customer
Basic flow of events:
1. Customer choose to display options: based on brand name, or price
2. All items in inventory are displayed according to customer’s selected option.
Displayed information include ItemID, itemName, brandName and price
Alternative flow of events
None

Use case 9
Name: Run statistic report daily
Basic flow of events:
1. Salesperson starts the transaction
2. System displays all orders completed today
3. System checks the shopping cart bay and display all discarded shopping cart.
Alternative flow of events
None

3
COMP5028 Object Oriented Analysis and Design Semester 2, 2004

Your Tasks
A. Do an initial analysis and produce an initial object model (A class diagram with
short descriptions of each classes or interfaces). The object model should contain
major entity objects in the shopping system. You do not need to produce detailed
attribute and operations in the object model.
B. Realize all nine use cases described above. You should follow the test-driven
development approach. You need to produce a static and dynamic design model
for each use case. You are also required to write test methods for all nine use
cases and to implement them as well.
C. Document the object model and use case static and dynamic design models in a
design document. Point out any design patterns or design principles you employed
while doing your design ( There is no specific format for this documentation).
D. Compile all source codes to build an executable system. You don’t have to supply
a main program; the test application will serve the purpose.

Deliverable
1. Lab demonstration (5 marks)
Run the test application to demonstrate that all nine use cases are successfully
implemented in week 12 lab.
2. Design documentation and source code (15 marks)
Submit the printed design documentation on week 12 to your tutor during the regular
lab time. Wrap up all your source file ( not .class file ) in a .jar file and submit this to
the electronic submission page (see the link on the course web)

Das könnte Ihnen auch gefallen