You are on page 1of 45

Object Oriented Analysis and Design

Final Project

Submitted to:
Ms. Atifa Sarwar
Ms. Ifrah Qaiser
Submitted by:
Fahad Ameen

(i14-0049)

Ali Hasan

(i14-0301)

Muhammad Bilal

(i14-0232)

BS CS Section C
Dated: December, 7 2016
National University of Computer and Emerging Sciences
Islamabad

Caf Management System (CMS)

Table of Contents
Table of Contents ............................................................................................................................ 1
Honor Code ..................................................................................................................................... 5
Project Title ..................................................................................................................................... 6
Introduction .................................................................................................................................... 6
Purpose ........................................................................................................................................... 6
Scope ............................................................................................................................................... 6
Problem statement and description ............................................................................................... 6
Objectives........................................................................................................................................ 7
Business opportunity ...................................................................................................................... 7
Product Position Statement ............................................................................................................ 7
User Summary................................................................................................................................. 7
Stake Holder Summary ................................................................................................................... 8
High Level Goals .............................................................................................................................. 8
User Environment ........................................................................................................................... 8
Market Demographics .................................................................................................................... 8
Summary of Capabilities ................................................................................................................. 9
Summary of System Features ......................................................................................................... 9
Use Cases ...................................................................................................................................... 10
High Level Use cases ................................................................................................................. 10
UC1 (Edit/Change Order): - .................................................................................................... 10
UC2 (View Order): - ................................................................................................................ 10
1

Caf Management System (CMS)


UC3 (Order Receipt): - ............................................................................................................ 10
UC4 (Deliver Order): - ............................................................................................................. 10
UC5 (Generate Bills): .............................................................................................................. 11
UC6 (Generate Receipt for Students): - ................................................................................. 11
UC7 (Manage Menu): - ........................................................................................................... 11
UC8(Manage User): - .............................................................................................................. 11
UC9 (View Balance): - ............................................................................................................. 12
UC10 (View Account): - .......................................................................................................... 12
UC11 (Place Order): -.............................................................................................................. 12
UC12 (View Order History): -.................................................................................................. 12
UC13 (Print Balance Sheet): - ................................................................................................. 13
Extended Use cases................................................................................................................... 14
UC 1: Place Order ................................................................................................................... 14
UC 2: Edit/Change Order ........................................................................................................ 15
UC 3: View Order .................................................................................................................... 15
UC 4: Order Receipt................................................................................................................ 16
UC 5: Generate bills ................................................................................................................ 17
UC 6: Edit/Change Order ........................................................................................................ 18
UC 7: Generate receipt for students ...................................................................................... 19
UC 8: Manage menu ............................................................................................................... 20
UC 9: Manage user ................................................................................................................. 21
UC 10: View Balance............................................................................................................... 22
Use Case Diagram ......................................................................................................................... 23
Domain Model .............................................................................................................................. 24
System Sequence Diagram ........................................................................................................... 25
SSD1-Edit Placed Order ............................................................................................................. 25
SSD2-View Balance ................................................................................................................... 26
2

Caf Management System (CMS)


SSD3-Generate Receipt for Academic Staff .............................................................................. 26
SSD4-Generate Receipt for Student ......................................................................................... 27
SSD5-View Order....................................................................................................................... 27
SSD6-Manage User ................................................................................................................... 28
SSD7-Manage Menu ................................................................................................................. 29
SSD8-Order Receipt .................................................................................................................. 30
SSD9-Place Order ...................................................................................................................... 31
Operation Contracts...................................................................................................................... 32
CO1-RequestMenu () ................................................................................................................ 32
CO2-SelectItem () ...................................................................................................................... 32
CO3-Edit/ChangeMenuList () .................................................................................................... 32
CO4-EditOrder () ....................................................................................................................... 33
CO5-AccountDetails () ............................................................................................................... 33
C06-Bill Receipt () ...................................................................................................................... 33
C07-Request Order List () .......................................................................................................... 34
C08-StaffList () ........................................................................................................................... 34
CO9-Edit/ChangeStaff () ............................................................................................................ 34
CO10-ForwardList () .................................................................................................................. 35
Class Diagram ................................................................................................................................ 36
Sequence Diagrams....................................................................................................................... 37
1. View Placed Order ............................................................................................................. 37
2. Manage Users .................................................................................................................... 37
3. Manage Menu .................................................................................................................... 38
3

Caf Management System (CMS)


4. View Account ..................................................................................................................... 38
5. View Balance ...................................................................................................................... 39
6. Select Item ......................................................................................................................... 39
7. Request Receipt ................................................................................................................. 40
8. Request Menu .................................................................................................................... 40
9. Place Order......................................................................................................................... 41
10.

Edit Order ....................................................................................................................... 41

11.

Edit Placed Order............................................................................................................ 42

12.

Confirm Order ................................................................................................................ 42

Package Diagram........................................................................................................................... 43
Deployment Diagram ................................................................................................................ 44

Caf Management System (CMS)

Honor Code
"I am a person of integrity. I pledge, as a member of the NUCES-FAST University community, to
abide by and uphold the honor code. All submitted work is done by me and I have not
plagiarized or cheated from other sources"

Member 1 Signature ___________________

Member 2 Signature ___________________

Member 3 Signature ___________________

Caf Management System (CMS)

Project Title
Caf Management System (CMS)

Introduction
The purpose of this project is to ease the Teaching Staff, Students and Cafe Management. By
CMS (Caf Management System) teacher can see Food Menu and order their food in their
offices and account on daily basis will be maintained. Students can also see the Food Menu,
order their food and a queue type receipt will be generated which will ease students for not
standing in a line and wait and caf staff will be helpful in determining their food requirements.

Purpose
Main purpose of this supplementary document is to explain the specification of the Caf
Management System. FURPS model is implemented to describe this management system. It
describes user interfaces and design constraints to be implemented when the system is
designed. Complete system requirements are written in this document. Requirements
described in this document are derived from the Vision document.

Scope
CMS is associated with the university Teaching staff, Students, and Cafeteria staff.
i.
ii.
iii.

Caf Manager will operate system to manage food Menu, staff accounts, and bills.
Academic Staff can view Menu online and place order there and their bill will be
deducted from their account.
Students can view food Menu anywhere in university and then order in caf.

Problem statement and description


This project has been decided to reduce the problems in our university cafe. This project is only
for our university. But after the successful testing and implementing in our university, this idea
may also be implemented in other universities by our software company.
Cafe management system is not applied yet in our university. Traditional database and services
are provided by cafe system due to which students and teachers are facing difficulties. Having
not a computerized database system, also causing problem for cafe management for their
check and balance.
6

Caf Management System (CMS)

Objectives
i.
ii.
iii.

Easiness should be provided to students and teachers.


Not to wait in queue for taking meal in long time.
Teachers will get their meal in their rooms by just on one call or selecting meal from
their Web app.

Business opportunity
As this kind of cafe system has not present in our university and other universities, so there is a
great chance for our company to establish this idea in university. In start we dont have as much
competitors as well as highly demand of teachers and students make this idea stronger and
profitable.

Product Position Statement


Product Position Statement
For
How
Caf Management
System (CMS)
That
Unlike
Our Product

Teachers, Students and Caf Staff


Have problems in knowing Food Menu, ordering food in their
offices and wait in a long queue
is a software application
Provides the ability of see food Menu, ordering food in offices for
teachers and not to wait in a queue for students
NO such an application in Market
Provide the facility of see food Menu any time anywhere. Not to
wait in a queue. Place order at offices. A daily basis account for
teaching staff food bills.

User Summary
User Summery
Name
Academic Staff

Description
He will see Menu and place order. After placing order, it is on
Academic Staff member whether he will pay directly or by the
account. After payment order will be delivered to him in his room.
7

Caf Management System (CMS)


Name
Students

Description
He can see menu and price from CMS.

Stake Holder Summary


Stake Holder Summery
Name

Description

Responsibilities

Caf Manager

Manages CMS and


Caf Staff

He will receive orders from Academic Staff, and


Students, Manage Food Manu on daily basis and
Managing of Bills of Academic Staff.

Waiter

Deliver Order

He will deliver order and then update the status


whether it is delivered or not.

Chef

Prepare Order

He will prepare order and update status of


prepare.

High Level Goals


Our main Goal of this project is to help and assist the Caf of our University in managing the
orders received from the students and from the academic staff easily.

User Environment
Our projects task cycle includes Caf staff, students, administrative and academic staff. We will
make this system as generic as possible so that if we want to add features to it, we can easily
do. We will focus and try to make task cycle as short as possible in order to save users and
stakeholders time. Presently no such system is found in universitys Cafes. But it is found in
private cafes.

Market Demographics
We are highly motivated to make this caf management system because it has great potential
in the market.
First our target market is the Caf of our University (Fast Nuces) and after success we will
spread and offer it to other universities as well as to private Cafes and Restaurants. Presently
8

Caf Management System (CMS)


no such type of Robust and highly Functional system is available in the market. We are new in
the market and trying our best to capture good reputation in different market segments by
developing flexible systems. As we are new so, we have chosen this product because it is highly
demandable and less available in the market, so it will surely help us in achieving our goals.

Summary of Capabilities
Summary of Capabilities
Name
Robust,
Reliable and
efficient

Description
i.
The speed will be ensured as the work load increases
ii.
Orders will be managed in a Database
iii.
Real time updates and concurrency problems will no longer be
there
iv. All the functions will be properly integrated so that they can be
efficiently managed and the resources are used at their optimum
level.
v.
The interaction and functional processes are made friendly.
vi. Admin can view the entire work flow

Summary of System Features


CMS has many system features which enable it to become software that is unique and up to
the standards. Some of the key features are listed below:
i.

All work will be loaded on Database.

ii.

Computerized receipt

iii.

Updating of food menu every day.

iv.

Overload of orders will be handled gently.

Caf Management System (CMS)

Use Cases
High Level Use cases
UC1 (Edit/Change Order): Use case:

Edit/change order

Actors:

Academic Staff

Type:

Primary

Description:

Once the items are selected, there is still option to change it or edit according to the
user choice. From this user can update his/her order and make changes for his
order.

UC2 (View Order): Use case:

View order

Actors:

Manager

Type:

Primary

Description:

Once order is confirmed by the user then it will be displayed to the manager on the
computer in the cafe. Cafe Manager is locating and maintaining all the orders.

UC3 (Order Receipt): Use case:

Order receipt

Actors:

Manager, Chef

Type:

Supporting

Description:

This use case allows manager to generate a receipt according to the order. Receipts
is given to the chef to make order ready. Chef will take receipt, prepare food
according to the order and will update the status in the system that food is ready.

UC4 (Deliver Order): Use case:

Deliver order

Actors:

Waiter

Type:

Primary

Description:

This use case is for delivering the order to the faculty members. Waiter will take
order from chef and deliver it to the order place. He will also update the status in
the system that order has been delivered.

10

Caf Management System (CMS)


UC5 (Generate Bills): Use case:

Generate bills

Actors:

Manager

Type:

Primary

Description:

Manager will generate Bill against every order for giving it to the user. Waiter will
take bill with order to give it to the right place. This also provides feasibility to the
user to see his payments of order.

UC6 (Generate Receipt for Students): Use case:

Generate Receipt for students

Actors:

Students, Manager

Type:

Primary

Description:

Students after viewing the menu from the online website, can only order their meal
in caf. But they will get a receipt against each order. This is due to avoiding time
wastage. A student can get his receipt and order numbers will be displayed on the
machine in caf. No one can stand and wait to get his order.

UC7 (Manage Menu): Use case:

Manage menu

Actors:

Manager

Type:

Primary

Description:

Menu can easily be managed and updated by the manager. He can see the menu list
and update according to the sale of meal. If an item sold completely then he will
delete that particular item from the menu.

UC8(Manage User): Use case:

Manage user

Actors:

Manager

Type:

Primary

Description:

A manager can manage all the staff of caf which includes waiters, chef etc. He has
authority to see how many waiters and another staff is required for caf. If needed
more he will add and if there is any need to drop he will drop.

11

Caf Management System (CMS)


UC9 (View Balance): Use case:

View balance

Actors:

Academic Staff

Type:

Primary

Description:

This use case is use is for the faculty members to see their balance remaining in
account. This option is available on the online website. This also helps them in
knowing if their balance is low.

UC10 (View Account): Use case:

View Account

Actors:

Academic Staff

Type:

Primary

Description:

Teacher can see their account details by the option of account details. They will see
the account details and also can change their account password and other options.

UC11 (Place Order): Use case:

Place order

Actors:

Academic Staff

Type:

Primary

Description:

This use case allows faculty members to open and view the entire menu which is
present for following day. After the successful opening of menu user can simply
select the items and their quantity presented in the list. Once the items are
confirmed, order will be saved and transfer to the cafe administrator. There is only
5 minutes duration for the users to change it or delete the order otherwise order
will be delivered.

UC12 (View Order History): Use case:

View order history

Actors:

Academic Staff

Type:

Primary

Description:

This use case allowed user to see their complete order history. From this option user
can see what he ordered at what date, all the details will come up by this option.

12

Caf Management System (CMS)


UC13 (Print Balance Sheet): Use case:

Print balance sheet

Actors:

Manager

Type:

Primary

Description:

At the end of the day, caf management system needs to see all the details of their
selling. This is done by this use case. This use case tells us about printing the balance
sheet to see all the details of the day.

13

Caf Management System (CMS)

Extended Use cases


UC 1: Place Order
Scope: Caf Management System
Level: User level
Primary Actors: Academic Staff
Stakeholders and Interests: Want to place and save his order in the successfully in the database.
Preconditions: The user should be successfully login to his account by entering his/her
credentials.
Success Guarantee (or Post-conditions): The order of the particular Academic staff will be successfully
delivered to the caf staff.
Main Success Scenario:
1. The Academic staff logins to the system by entering his/her credentials.
2. System responds properly and shows all the functionality.
3. User accesses and opens the menu which is present for the entire day.
4. System displays the list of all the food items of the menu of the current day.
5. User selects the food item and confirms his order.
6. The order is successfully saved in the database.
7. The user satisfied logs out.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Login
3. Repeat the process.
b) The parameters entered for login are not valid.
1. Error message is generated.
2. The user re-enters the username and password.
c) The menu of food items is empty.
1. Report it to the cafe manager.
Specific Requirements:
a) The Color and font should be easy to read.
b) Saving of order in the database should be quick.

Frequency of Occurrence: Near Continuous.

14

Caf Management System (CMS)

UC 2: Edit/Change Order
Scope: Caf Management System
Level: User level
Primary Actors: Academic staff
Stakeholders and Interests: Academic staff
Preconditions: The Order is once placed. And less than 5 minutes have passed when the order was placed.
Success Guarantee (or Post-conditions): The users order will be changed and updated to the Caf system
successfully.
Main Success Scenario:
1. Once the order is placed, if user wants to edit and change the order.
2. System checks that if less than 5 minutes have passed, after the order was passed, then menu is
again displayed to the Academic staff.
3. The academic staff selects new items and confirms.
4. The new order is successfully updated in the database.
Extensions:
a)

At any time, The System fails:


1. Restart the system
2. Login
3. Repeat the process

b) Displayed menu is empty


1. Repeat the process.
Specific Requirements:
a) The edited order should be updated in the database quickly.

Frequency of Occurrence: Rare

UC 3: View Order
Scope: Caf Management System
Level: User level
Primary Actors: Manager
Stakeholders and Interests: Wants that the placed orders are retrieved from the database quickly and
showed to the manager.

15

Caf Management System (CMS)


Preconditions: Academic Staff has successfully placed by the academic staff and the order is successfully
saved in the database.
Success Guarantee (or Post-conditions): Manager has successfully viewed all the orders placed by the
academic staff.
Main Success Scenario:
1. The manager opens the list of received orders.
2. The placed orders are retrieved from the database and are displayed to the manger.
Extensions:
a) The list of placed orders is empty.
1. Repeat the process.
Specific Requirements:
a) Data and order retrieval from database should be quick and performed within 30 sec.
Frequency of Occurrence: Near Continuous.

UC 4: Order Receipt
Scope: Caf Management System
Level: User level
Primary Actors: Manager, Chef
Stakeholders and Interests: Wants that the order receipt are generated quickly.
Preconditions: Manager has successfully viewed all the orders placed by the Academic staff.
Success Guarantee (or Post-conditions): The receipt will be successfully generated and is given to the
chef.
Main Success Scenario:
1. The manager asks the system to generates receipt.
2. System generates the receipt successfully.
3. The chef prepares food and after preparing he updates the status in the system that food is
prepared.
4. System updates status as prepared against that order and sends signal to the manager.
Specific Requirements:
a) The receipts should be generated quickly.
Extensions:
a)

At any time, The System fails:

16

Caf Management System (CMS)


4. Restart the system
5. Login
6. Repeat the process

Frequency of Occurrence: Near Continuous.

UC 5: Generate bills
Scope: Caf Management System
Level: User Level
Primary Actors: Manager, waiter
Stakeholders and Interests: Generating a correct and quick bill of order by the computer operator. Waiter
wants to get bill from operator to deliver it on time.
Preconditions: Correct bill should be generated on time.
Post-conditions: Successful bill generated by the computer operator of cafe.
Main Success Scenario:
1. All order details added correctly by caf computer operator.
2. Order details should be calculated and manipulated correctly and efficiently.
3. Calculated amount with details of bill print in quick time.
4. Printed bill given to the waiter.
5. Waiter dispatches shortly bill to the required place.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Enter details
3. Print bill
b) Wrong entry of order entered.
1. Option of retrieving that wrong entry.
2. Deleting the wrong entry
3. Enter entry with corrected data.
Specific Requirements:
a) Bill should be formatted in well and proper format.
b) Not more than 30 seconds it will take to generate bill.

17

Caf Management System (CMS)


UC 6: Edit/Change Order
Scope: Caf Management System
Level: User level
Primary Actors: Computer operator, waiter
Stakeholders and Interests: wants to generate bill for the customers and give the bill to waiter.
Waiter will be dispatched it to the required place.
Preconditions: Correct bill should be generated on time.
Success Guarantee (or Post-conditions): Successful bill generated by the computer operator of
cafe.
Main Success Scenario:
1. Computer operator enter user order in the system.
2. System checks and calculated the total items and calculate the total bill against order.
3. System will generate a bill.
4. Waiter will take the bill with order and give it to the right person.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Enter details
3. Print bill
b) Wrong entry of order
1. Option of retrieving last wrong entry.
2. Deleting the wrong entry.
3. Enter entry again with corrected data.
Specific Requirements:
a) Bill should be formatted in well and proper form.
b) Not more than 30 seconds it will take to generate bill.
c) Total amount should be bold too visible clearly.
Frequency of Occurrence: continuous.

18

Caf Management System (CMS)


UC 7: Generate receipt for students
Scope: Caf management system.
Level: User Level
Primary Actors: Manager, student
Stakeholders and Interests: wants to generate a correct and quick receipt of order by the
computer operator for the students.
Preconditions: Correct bill should be generated on time.
Success Guarantee (or Post-conditions): Successful bill generated by the computer operator of
cafe.
Main Success Scenario:
1. All order details of student added correctly by caf computer operator.
2. Order details should be calculated and manipulated correctly and efficiently.
3. Receipt containing the total amount and order generated by the system.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Enter details
3. Print receipt
b) Wrong entry of order entered.
1. Option of retrieving that wrong entry.
2. Deleting the wrong entry.
3. Enter entry with corrected data.
Specific Requirements:
a) Receipt should be formatted in well and proper format.
Frequency of Occurrence: Near continuous.

19

Caf Management System (CMS)


UC 8: Manage menu
Scope: Sedulous: Caf management system.
Level: User Level
Primary Actors: Manager
Stakeholders and Interests: Wants to manage and update menu according to the items which
are presented in the list.
Preconditions: Items should be maintained well in the item list.
Success Guarantee (or Post-conditions): If item sold out then it will be deleted successfully
from the list and no longer to be displaying in the list.
Main Success Scenario:
1. User will update list when item sold out.
2. Item will be deleted from the lists.
3. User will not be able to see that item in the list.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Check again that item in the list.
3. If not present, then delete it.
b) System fails to save the item deleted:
1. System displays an Error Message.
2. User may try again.
Frequency of Occurrence: Often.

20

Caf Management System (CMS)


UC 9: Manage user
Scope: Sedulous: Caf management system.
Level: User Level
Primary Actors: Manager
Stakeholders and Interests: Wants to manage all the caf staff. If any waiter or chef needed in
caf it will be added as well as staff can also be drop.
Preconditions: Check the staff and their requirements in caf.
Success Guarantee (or Post-conditions): If anyone required he will be added and if there is no
need of any staff then he will be dropped.
Main Success Scenario:
1. Manager will see the staff and check all their requirements in the cafe.
2. If he needs any more staff he will add in the system.
3. System will be updated by the new staff.
4. System will also set the responsibilities and place of staff.
Extensions:
a) At any time, The System fails:
1. Restart the system
2. Enter staff details again.
3. Save it.
b) The parameters entered for staff are not valid.
1.
Error message is generated.
2. The user re-enters the staff details.
Frequency of Occurrence: rare.

21

Caf Management System (CMS)


UC 10: View Balance
Scope: Sedulous: Caf management system.
Level: User Level
Primary Actors: Academic staff
Stakeholders and Interests: Wants to see current balance in account.
Preconditions: Account created already.
Success Guarantee (or Post-conditions): Check successfully total amount present in the
account.
Main Success Scenario:
1. Log in to the account by entering username and password.
2. See the account details.
3. System will show the current balance of user.
4. User will log out his account after estimating his current balance.
Extensions:
a) At any time, The System fails:
1. Restart the system.
2. Log in again.
3. Check details.
b) The username and password are not valid.
4. Error message is generated.
5. The user re-enters the email and password.
Specific Requirements:
a) Total amount should be in bold form.
Frequency of Occurrence: often.

22

Caf Management System (CMS)

Use Case Diagram

23

Caf Management System (CMS)

Domain Model

class Domain Obj ects


Domain model: Cafe Management System

SaleLineItems
-

ItemDescrption

Item

quantity

Records sale of
*

item_no
name

Describes

Name
Serial no#: int

order_no

Stocks
1
Order

Cafe
-

City
Name
Place

Contains

Manager
maintains

name

Contains
1

1
*

Receipt
generates

against

date
time

Customer

Transaction
-

Has

places

r_no

Initiated by
*

c_id
name

Account
holds
1

acc_no

payment
1

for

amount

24

Caf Management System (CMS)

System Sequence Diagram


SSD1-Edit Placed Order
sd Edit Placed Order
CMS
Academic Staff
alt
[if(time<5 minutes)]

ViewPlacedOrder()

:SelectedOrder

EditOrder()

:EditableOrderList

ConfirmOrder()

:ConfirmtionMsg

[else]
:Time Over

25

Caf Management System (CMS)

SSD2-View Balance
sd View Balance
CMS
Academic Staff

AccountDetails()

:AccountDetails

SSD3-Generate Receipt for Academic Staff


sd Generate Receipt For Academic Staff
CMS
Manager

BillReceipt(name)

:BillReceipt

26

Caf Management System (CMS)

SSD4-Generate Receipt for Student


sd Generate Receipt For Students
CMS
Manager

BillReceipt()

:BillReceipt

SSD5-View Order
sd View Order
CMS
Manager

RequestOrderList()

:OrderList

27

Caf Management System (CMS)

SSD6-Manage User
sd Manage User
CMS
Manager

StaffList()

:StaffList

Edit/ChangeStaff()

:EditableList

28

Caf Management System (CMS)

SSD7-Manage Menu
sd ManageMenu
CMS
Manager

MenuList()

:List

Edit/ChangeList()

:EditableList

ConfirmMenu()

:ConfirmationMessage

29

Caf Management System (CMS)

SSD8-Order Receipt
sd Order Receipt
CMS
Manager

Chef

RequestReceipt()

:Receipt

Forward Receipt()

:Receipt

MarkStatus()

:FoodPreparedMsg

30

Caf Management System (CMS)

SSD9-Place Order
sd Place Order
CMS
Academic Staff

RequestMenu()

:DisplayMenu
loop
SelectItem()

:AddToCart

31

Caf Management System (CMS)

Operation Contracts
CO1-RequestMenu ()
Contract C01:

Request menu

Operation:

RequestMenu()

Cross Reference:

Place order

Responsibility:

Shows the current menu.

Precondition:

Faculty member have account and logged in.

Post condition:

An instance of cafe was created in customer. Instance used for


association between customer and caf to view the menu. Item instance
created in caf to access the RequestMenu option.

CO2-SelectItem ()
Contract C02:

SelectItem

Operation:

SelectItem()

Cross Reference:

Place order

Responsibility:

Select the item for order.

Precondition:

Faculty member have account, logged in and having a display menu open.

Post condition:

Sale line Item contained instance of item. Sale line item has associativity
with sale to store items in sale line item. Sale line Item instance created
in order. Sale line Item instance associated with order.

CO3-Edit/ChangeMenuList ()
Contract C03:

Edit/Change menu list

Operation:

Edit/ChangeMenulist()

Cross Reference:

Manage Menu

Responsibility:

Select the item list for addition and deletion of items in list.

Precondition:

Manager must be logged in and menu list opened in front of manager.


32

Caf Management System (CMS)

Post condition:

Manager contained instance of item. That instance was associated


with item.

CO4-EditOrder ()
Contract C04:

EditOrder

Operation:

EditOrder()

Cross Reference:

Edit Place order

Responsibility:

To edit the selected order.

Precondition:

Faculty member have account, logged in and already placed an order.

Post condition:

Instance of order created in customer. Association between order and


customer exists. Sale line Item instance created in order. Sale line Item
instance associated with order.

CO5-AccountDetails ()
Contract C05:

AccountDetails

Operation:

AccountDetails ()

Cross Reference:

View Balance

Responsibility:

To view the details of balance.

Precondition:

Faculty member have account, logged in and already being have


deposited some balance.

Post condition:

Instance of account was created in customer. Association between order


and customer exists to view the details.

C06-Bill Receipt ()
Contract C05:

Bill Receipt

Operation:

Bill Receipt ()

Cross Reference:

Generate Receipt for Students

Responsibility:

To view bill receipt


33

Caf Management System (CMS)


Precondition:

Student gives his order at counter

Post condition:

Instance of transaction created in receipt. Association between sale line


item, transaction and receipt to print bill

C07-Request Order List ()


Contract C05:

RequestOrderList

Operation:

RequestOrderList ()

Cross Reference:

View Order

Responsibility:

To view already placed order list

Precondition:

Orders are added by manager in correct way

Post condition:

Instance of customer created in list. Association between customer,


receipt to view all orders by customers.

C08-StaffList ()
Contract C05:

StaffList

Operation:

StaffList ()

Cross Reference:

Manage User

Responsibility:

View details of working members in caf.

Precondition:

Manager add all details of members correctly

Post condition:

Instance of caf created in manager. Association in Staff and manager to


view details.

CO9-Edit/ChangeStaff ()
Contract C03:

Edit/Change Staff

Operation:

Edit/ChangeStaff()
34

Caf Management System (CMS)


Cross Reference:

Manage Users

Responsibility:

Select the staff list for addition and deletion of staff in list.

Precondition:

Manager must be logged in and menu list opened in front of manager.

Post condition:

Manager contained instance of staff. That instance was associated with


staff.

CO10-ForwardList ()
Contract C03:

Forward List

Operation:

ForwardList()

Cross Reference:

Order Receipt

Responsibility:

Give the order of the customer to chef to prepare order.

Precondition:

Manager must forward receipt to chef.

Post condition:

Instance of receipt was created in staff. Association in staff and receipt is


created till update order prepare status

35

Caf Management System (CMS)

Class Diagram
class Class Model

Person
-

Controller

address: string
cnic: string
name: string

Worker

Customer
-

Cid: int
validUser: boolean

loginCustomer(): person

Wid: int

DBHandler

Waiter

Manager
Student

Academic Staff
-

Sid: int

Mid: int

isDelievered: boolean

account: Account
phoneNumber: int
roomNumber: int

Account

Chef

accountNumber: int
balance: int
password: int
userName: string

+
+

checkLogistics(): boolean
loginAccount(): int

isPrepare: boolean

Menu
+

Order

viewMenu(): void
-

orderNumber: int
totalItem: int

returnOrder(): ArrayList<Order>

Items
ItemDescription
-

description: string

itemId: int
itemName: String
price: int

viewMenu(): list

SaleLineItem
-

quantity: int

36

Caf Management System (CMS)

Sequence Diagrams
1. View Placed Order
sd View PlacedOrder
Order

DB Handler

Controller
View Order()

RetrieveOrder()

ReturnOrder
()

:OrderList

:OrderList

2. Manage Users
sd Manage User
Employee

DB Handler

Controller
Add User()

AddEmployee(id, name, address, cell)

Add(id, name, address, cell)

Delete User()

DeleteEmployee(id)

Delete(id)

37

Caf Management System (CMS)

3. Manage Menu
sd ManageMenu
Item

DB Handler

Controller

Add Item()

AddItem(name, price)

Add(name price)
Delete Item()

DeleteItem(name)
Delete(name)

4. View Account
sd View Account
Account

DB Handler

Controller
View Account()

ViewAccount(id)
View(id)

:account
:account

38

Caf Management System (CMS)

5. View Balance
sd View Balance
Account

DB Handler

Controller
ViewBalance(id)

ViewBalance(id)

view(id)

:Balance
:Balance

6. Select Item
sd SelectItem
:Customer

:Item

SaleLineItem

SelectItem()

SelectItem(ID)

AddToCart()

:itemView

39

Caf Management System (CMS)

7. Request Receipt
sd RequestReceipt
:Manager

:Order

:Receipt

Receipt()

ViewOrder(ID)

GetReceipt()

:ConfirmationMsg

8. Request Menu
sd RequestMenu
:Customer

:Cafe

Request()

RequestMenu()

:List

40

Caf Management System (CMS)

9. Place Order
sd PlaceOrder
:Customer

:Cafe

:Item

RequstMenu()

:Menu

alt loop

SelectItem(Item_id)

:AddT oCart

10.

Edit Order

sd EditOrder
:Customer

:Order

:SaleLineItem

:DataBase

Order()
alt
[Time < 5 minutes]

SelectOrder(Order_id)

:Order

EditOrder(Order_id)

Save(Order_id)

Store(Order_id)

:ItemStored

41

Caf Management System (CMS)

11.

Edit Placed Order

sd Edit Placed Order


:Customer

alt

:Order

:SaleLineItem

ViewPlacedOrder()

:List

EditOrder()

EditableOrderList()

ConfirmOrder()

12.

Confirm Order

sd ConfirmOrder
Customer

Order

Database

Confirm()

Select(Order_no)

:Order

ConfirmOrder(Order_no)

Store(Order_no)

:Stored

42

Caf Management System (CMS)

Package Diagram
pkg Package
BLL
Person

Items

Person
Customer

Student

SaleLineItem

Item

ItemDescription

Worker

Academic Staff

Manager

Chef

Order

Receipt

AcademicStaff

Account

Order

Manager

DAL

InsertHandler

DBConection

SelectHandler

UI

Serv lets

JSPs

SelectServ let

43

Caf Management System (CMS)

Deployment Diagram

44

You might also like