Upload
ledung
View
232
Download
6
Embed Size (px)
Citation preview
Object Oriented Systems Analysis and Design with UML
Problem Statement
Supermarket requires stock control system to void out of stock level for each product. A purchasing_admin will be able to process an order by entering product numbers and required quantities into the system. The system will display a description, price and available stock. In-stock products will normally be collected immediately by the customer from the store. If stock is not available the purchasing_admin will be able to create a backorder for the product. The system will allow products to be paid by cash. Order details for in-stock products will be printed including the quantity, product number and description. The store manager will be able at any time to print a summary report of sales in the store for a given period, including assignment of sales to sales assistants in order to calculate weekly sales. The stock manager will be able to monitor stock levels and weekly run-rates in order to set minimum stock levels and requisition products which fall below the minimum stock levels or for which demand is anticipated. When the stock arrives it will be booked in by the warehouse person. Stock that has been backordered for collection from the store is held in a separate area and the store manager advised of its arrival. The catalogue of available products will be maintained remotely.
Step 1:
Identify the business events and make an event table.
Number of event
Event description
System input
Actor providing system input
output
Actor receive output
1-
Purchase some goods from supplier
Request out of stock product
Purchasing admin
List of out of stock product
Purchasing admin determine which product want to buy from Supplier
2-
Receive product from supplier
Product_id And quantity
Purchasing admin
Update product level in the stock
Purchasing admin
3-
Generate bill
Product_id Product_price Product _quantity
supplier
invoice
Purchasing Admin To pay these invoice
4-
View goods in the supermarket
Product_id Product name
seller Product Information that stored in the system
customer
5-
Customer purchase product from supermarket
Product _id Product _unit
customer Decrease the stock level of that product
Seller
6-
Generate selling bill
Product _id Product-unit
employee invoice customer
Step2:
Identify the use cases and produce a use case diagram for the
system
1- Purchase goods from supplier
2-Receive product from supplier (after check the product that
need)
3- Generate purchasing bill
4- View product in the supermarket
5- Purchase product from customer
6- Generate selling bill to the customer
Determine the Actor:
Initiate Participant
Purchasing _admin supplier
Purchasing _admin Purchasing _ admin
supplier Purchasing _admin
seller customer
customer seller
employee customer
Use case diagram
Purchasing_admin supplier
Stock manager
Seller
Customer
Purchase good
from supplier
Generate
purchasing bill
View product into a
supermarket
Purchase product by
customers
Generate selling bill
Receive product from
supplier
Employee
Step 3:
Write a use case narrative describing the system’s response to
each business event
Use case Purchase goods from supplier
Actor Purchasing_admin Supplier
purpose Determine out of stock product then check product want to buy
Description Purchasing admin request out of stock product and the system response a list of out of stock product then purchasing admin check the product want to buy from supplier
Use case Receive product from supplier
Actor Purchasing _ admin
purpose To check the product unit want to store in the inventory
Description After the purchasing_admin determine the product want to Supply from specific supplier the product send to the supermarket then purchasing_admin check this product and update stock level
Use case Generate purchasing bill
Actor Supplier Purchasing_admin
purpose
To identify and document the quantity of product that supplied from supplier and document amount of invoice
Description Supplier determine the product id and quantity and price that checked by the purchasing_admin then prepare the invoice to the purchasing admin to prepare payment
Use case View product in the supermarket
Actor Seller Customer
Purpose
To store the information in the product and then view in the supermarket
description The seller enter the product information in the system and then view the product in the supermarket
Use case Purchase product by the customer
Actor Customer seller
purpose Paying the product and update the level of the stock
Description Customer purchase product and the level of stock decrease (-)
Use case Generate bill to the customer
Actor Employee customer
purpose To produce invoice description After customer purchase some
goods from the supermarket the
employee enter product _id to the system and the system provide invoice that contain product _id, unit, price .
Expanded essential use case narrative for supermarket system:-
Use case Purchase goods from supplier
Actor Purchasing_admin Supplier
purpose Determine out of stock product then check product want to buy
Description Purchasing admin request out of stock product and the system response a list of out of stock product then purchasing admin check the product want to buy from supplier
Type essential
precondition Out of stock product must exist
Post condition List of out of stock product
Special requirement Purchasing admin must get the system response in 20 second
Flow of event
Actor action 1- this use case begin when purchasing admin system response desire to supply some goods from supplier 2- the purchasing admin provide the request 3- list of out of stock product to determine the out of stock product 5- send the list to the supplier 4- check the product want to purchase
Alternative flow of event When no product that out of stock so no list generate …
Use case Receive product from supplier
Actor Purchasing _ admin
purpose To check the product unit want to store in the inventory
Description After the purchasing_admin determine the product want to Supply from specific supplier the product send to the supermarket then purchasing_admin check this product and update stock level
Type Essential
Precondition Request of the product must exit
Post condition Confirmation that the list already supply to the supermarket and received
Special requirement Purchasing admin must get the response and confirmation in 1 day
Flow of events Actor action system response 1- this use case begins when 2- send conformation A supplier receive the list of to the purchasing-admin out of stock product include the quantity and price of the checked product 3- purchasing admin receive The confirmation and the product 4- update stock level Supplied and hold in the inventory
Alternative flow of events
Step2:if no conformation send to the purchasing admin so no product received
Use case Receive purchasing bill
Actor Supplier Purchasing_admin
purpose
To identify and document the quantity of product that supplied from supplier and document amount of invoice
Description Supplier determine the product id and quantity and price that checked by the purchasing_admin then prepare the invoice to the purchasing admin to prepare payment
Type essential Precondition Receive product from supplier and
update the level of the stock Post condition Receive the invoice to prepare
payment
Flow of event
Actor action system response 1-this use case begin when a supplier desire to provide specific detail about 4- receive the invoice product that supplied to purchase-admin 2- the supplier provide invoice-no Quantity and price 3- on completion of entry the supplier indicate that the invoice is complete and send to the purchasing-admin
Use case View product in the supermarket
Actor Seller Customer
Purpose
To store the information in the product and then view in the supermarket
description The seller enter the product information in the system and then view the product in the supermarket
Precondition Receive product must be exist Update level of stock must be exist Store information in the system
Post condition After the completion of storing information product view in the supermarket.
Flow of event
Actor action system response
1- this use case begin when the seller store 2- store the information about
product
information about the product then the product
view in the supermarket
Use case Purchase product by the customer
Actor Customer seller
purpose Paying the product and update the level of the stock
Description Customer purchase product and the level of stock decrease (-)
Precondition Store information about the product and view the product in the supermarket must exist
Post condition Customer buying the product and update the stock level
flow of event
Actor action system response
1-this use case begin when the 3- the system store
customer purchase goods from information of the product
supermarket
2- the seller enter the product id
and quantity
4-on completion this process the customer
Receive product (after payment)
Use case Generate bill to the customer
Actor Employee customer
purpose To produce invoice description After customer purchase some
goods from the supermarket the employee enter product _id to the system and the system provide invoice that contain product _id, unit, price .
Type Essential Precondition 1- customer purchase product
2-decrease the stock level
Post condition Generate bill to the customer
contain product unit, and price ,and name
Event flow
Actor action system response
1-This use case begin when employee desire 3- add detail of that product
To provide specific detail about product 4-prepare invoice.
That purchased by customer.
2- employee enter product specification as
(product_id,product_name,unit,price)
Alternative step3: invalid product detail return to step 3
Use case 1: Purchase goods from supplier
Purchasing admin request the out of stock product, the system provides a list
of out of stock product.
After the list checked by the purchasing admin, purchasing admin choose the
galaxy chocolate to purchase from a supplier.
Use case scenario
He needs galaxy detail such as (id) the system provides detail and request
from supplier.
Product name galaxy
Product _id 1012345678
unit 200 unit
Receive product from supplier:- After the request send to the supplier the purchasing admin wait the
supplier conformation if the supplier can provide the product.
When the conformation received the supplier can provide only 150 unit of
galaxy chocolate. The purchasing admin send the request again to another
supplier or reduce the quantity.
Generate purchasing bill:-
The supplier “kareem masri” send the conformation to the purchasing
admin that he can provide the 200 unit of galaxy after
One day.
The purchasing admin agree with this transaction and wait the invoice.
the supplier “kareem masri” send the invoice (invoice no :10132,send to
the purchasing admin in 2-2-2011 and include the quantity of sold
product (galaxy:200 unit ) and price 600 shekel .
View product into the supermarket:
When the seller want to view the product (galaxy) in the supermarket
He enter the product detail (galaxy detail) before he can view in the
supermarket
He enter the galaxy_id 1031245, galaxy _description, quantity in the stock,
and the supplier _id)
Assume he save this information the system response:
(Invalid product_ id)
Purchase product by the customer:
Ahmad Jamal went to the supermarket on Jan 12,2011 and intend to
by rice ( shoqha , 150 shekel , 10kg) but the product was drained from
the supermarket , then the customer go back without buying it ).
Generate bill to the customer:-
Omar isam went to the super market on Feb 3,2011 and he intend to
buy milk (Nedo, 25 shekel) the employee enter the product barcode
and the system generate bill provided to the customer include product
name and product quantity and the(sub total) price and total price ..
“System sequence diagram “
1-use case 1
Purchase goods from supplier
Purchasing_admin
Request ( )
Bids ( )
request product( )
list of out of stock product ( )
paying product (id, unit )
confirmation ( )
end request ( )
Supermarket system
Supplier
“System sequence diagram “
Use case 2: receive product from supplier
Stock manager
Purchasing_admin
jjjuhui
Enter product information (id, unit, name)
Store information ( ) update stock level ( )
Supermarket system
“System sequence diagram “
Use case 3: generate bill from supplier
Admin
Supplier
Determine buying product
(product_id, name, unit, price)
Invoice information ( ) send invoice ( )
Super market system
“System sequence diagram “
Use case 4: view product in the supermarket
Seller
View product (p-id, name, des, image)
Store information ( )
Super market system
“System sequence diagram “
Use case 5: purchase product by the customer
Employee
Check barcode (product_id)
Decrease level of stock ( )
Payment (p-id, price, amount)
Confirmation ( )
Supermarket system
“System sequence diagram “
Generate bill to the customer :-
Employee
Customer
Determine purchasing product
(Product id, name, price, unit)
Generate bill ( ) send invoice ( )
Supermarket system
Contract:
Name Request out of stock product
Responsibilities Provide the product not a available in the stock
Type System
Exception If all product a available no out of stock generate
Precondition Decrease the stock level
Post condition Update list of out of the stock product
Name Paying the product (product _id,product_unit)
Responsibilities To identify the product id and unit want to buy
Type System
Exception If the product id is not valid indicate that it was an error
Precondition Save List of out of the stock product
Post condition Save List of product want to buy
Name Request product (product _id, unit)
Responsibilities To identify the supplier and send a list of product want to
buy
Type System
Exception If no supplier none in the system indicate the error
Precondition Add supplier to the system
Post condition Add new order information.
Name Choose bid
Responsibilities Choose one of several bids
Type System
Exception If no bids provided indicate an error
Precondition Store the order information
Post condition Save selected bid
Name Receive the product from supplier
Responsibilities Update stock level
Type System
Exception If product is not available indicate error
Precondition Save selected bid
Post condition Update stock level.
Name Determine buying product (p_id,name ,price,unit)
Responsibilities Determine buying product
Type System
Exception Indicate error if p_id not available
Precondition Update stock level
Post condition Save product information .
Contracts
for use case 4
contract
view product(product t id ,product name,
description ,image)
Name :
viewing product in the supermarket. Responsibilities :
system.
Type :
Contract
store information(product id ,product name
,description ,image).
Name:
storing information about product. Responsibilities :
system. Type:
information stored. Output:
For use case 3
Contract
determine buying product(product id
,product name ,unit price).
Name:
to know what the product that we buying
from supplier.
Responsibilities:
system. Type :
purchasing bill. Output:
send order must be exist. Precondition :
display invoice information. Pot condition :
Contract
invoice information(product id, product name
,price).
Name:
storing information about invoice. Responsibilities:
system. Type :
display the product that we want to buy Precondition:
saving information of invoice. Postcondition :
Contract
send invoice() Name :
sending invoice to the admin from supplier Responsibilities:
system. Type :
bill for the system. Output: