Вы находитесь на странице: 1из 143

Cafeteria Management System

By

Ng Song Hui

SCHOOL OF ARTS AND SCIENCE


TUNKU ABDUL RAHMAN COLLEGE
KUALA LUMPUR
ACADEMIC YEAR
2010/2011

Cafeteria Management System

Cafeteria Management System

By
Ng Song Hui
Supervisor: Ms. Chin Chai Lim

A project report submitted to the School of Arts and Science


in partial fulfillment of the requirement for the
Bachelor of Science, Campbell University, U.S.A,
And
Advanced Diploma in Science.

Division of Computer Science


School of Arts and Science
Tunku Abdul Rahman College
Kuala Lumpur
20010/2011

Copyright 2009 by Tunku Abdul Rahman College.


All rights served. No part of this project documentation may be reproduced,
stored in retrieval system, or transmitted in any form or by any means without
prior permission of Tunku Abdul Rahman College.

Project

ii

Cafeteria Management System

Declaration

Declaration
The project submitted herewith is a result of my own efforts in totality and in every
aspects of the project works. All information that has been obtained from other
sources had been fully acknowledged. I understand that any plagiarism, cheating or
collusion or any sorts constitutes a breach of College rules and regulations and would
be subjected to disciplinary actions.

__________________________
Students Name :
Programme :

Project

iii

Cafeteria Management System

Acknowledgement

Abstract
Cafeteria Management System is computer that system that help cafeteria to manage
their cafeteria dairy process, such as order, reservation, redemption and etc. The entire
system consists of back end and front end, which back end was an offline application
and front end was a web site. The offline application allow cafeteria to manage the
cafeteria information and managing the dairy process such as seat admission and
order. And the system allow cafeteria to manage their meal menu and promotion. And
all the updated meal menu and promotion will be show on the web page automatically
upon the completion of updating.

Cafeteria Management System is developed by using Microsoft Visual 2010. The


offline application is developed by using VB.net with object-oriented programming
method, and the web site is developed by using c#. The database is design and
managed by using Microsoft SQL 2007.

The current cafeteria is currently working by using manual way which means fully
paperwork, which consist a lot of man power and time in managing the record and
dairy process. And human mistake is unavoidable while the workload is increasing.
Therefore they request for the developing of Cafeteria Management System, which
making their dairy process form paperwork into automate system. Cafeteria
Management System other than replace their manual dairy work such as enter order,
make reservation and payment, also including new function such as online reservation
and ordering, online meal and promotion viewing, report generating and reservation
notification.

With the developing of Cafeteria Management System, it increases the efficiency of


Cafeteria and improves the service, automate system process able reduce dairy work
error, also save time and also cost in long term.

Project

vi

Cafeteria Management System

Acknowledgement

Acknowledgement
I wish to express my sincere gratitude to my project supervisor, Ms Chin Chai Lim,
for her guidance on completing my Final Year Project. I would like to convey my
heartfelt appreciation to Ms Choon Kwai Mui for her contribution on the Project.

I would like to take this chance to thanks my friend and senior which giving me a
hand while Im facing problem on debugging the system, and thanks to their
experience and idea contribution on the logic of code in my system. And also million
thanks to people who providing me resources such as Ajax information and code.

Project

vii

Cafeteria Management System

Contents
Cafeteria Management System ...............................................................................................ii
Declaration.............................................................................................................................. iii
Abstract .................................................................................................................................... vi
Acknowledgement ..................................................................................................................vii
1.0 System Planning ................................................................................................................. 1
1.1
1.2
1.3
1.4
1.5

Project Aims and Objectives................................................................................................. 1


Company Background .......................................................................................................... 2
Project Scope ........................................................................................................................ 3
Project Schedule ................................................................................................................... 6
Outline of approach/Methodology Used ............................................................................... 8

2.0 Requirements Analysis .................................................................................................... 10


2.1
2.1.1
2.1.2

2.2
2.3
2.4
2.5
2.6
2.7

Fact Gathering..................................................................................................................... 10
Background Reading ....................................................................................................................... 11
Interview .......................................................................................................................................... 11
Non-Functional Requirements ............................................................................................ 12
Functional Requirements .................................................................................................... 13
Overview Use Case Diagram .............................................................................................. 15
Detail Use Case Diagram (My Module) ............................................................................. 16
Use Case Specification ....................................................................................................... 19
Activity Diagrams ............................................................................................................... 36

3.0 System Design ................................................................................................................... 49


3.1
3.2
3.3
3.4
3.5

Class Diagram ..................................................................................................................... 49


Database Structure .............................................................................................................. 50
Sequence Diagram .............................................................................................................. 57
User Interface ...................................................................................................................... 69
Report Design ..................................................................................................................... 78

4.0 Programming.................................................................................................................... 84
4.1
4.1.1
4.1.2
4.1.3

4.2
4.2.1
4.2.2
4.2.3

4.3
4.4
4.5
4.6
4.7
4.8
4.8.1
4.8.2
4.8.3

Project

Three Tier Architecture ...................................................................................................... 84


Graphic User Interface Class ........................................................................................................... 84
Problem Domain Class .................................................................................................................... 86
Data Access Class ............................................................................................................................ 88
Common Add, Edit and Delete ........................................................................................... 89
Add Function ................................................................................................................................... 89
Edit Function.................................................................................................................................... 90
Delete Function ................................................................................................................................ 92
Auto ID Generation ............................................................................................................ 93
Upload Image to database ................................................................................................... 94
Display Image from database (Offline Application)........................................................... 96
Display Image from database (Web Page).......................................................................... 97
Ajax Techniques Adapting ................................................................................................. 99
Programming Tools .......................................................................................................... 100
Strength of Programming Tools used............................................................................................ 100
Weakness of Programming Tools used ......................................................................................... 100
Problem Faced ............................................................................................................................... 100

vii

Cafeteria Management System

5.0 Software Testing............................................................................................................. 102


5.1
5.1.1
5.1.2
5.1.3
5.1.4

5.2
5.3
5.4
5.5
5.6
5.7

Type of Testing ................................................................................................................. 102


Unit Testing ................................................................................................................................... 102
Integrating Testing ......................................................................................................................... 102
System Testing ............................................................................................................................... 102
User Acceptance Testing ............................................................................................................... 102
Meal Module ..................................................................................................................... 103
Promotion Module ............................................................................................................ 105
Order Module .................................................................................................................... 108
Reservation Module .......................................................................................................... 111
Report Module .................................................................................................................. 113
Seat Admission Module .................................................................................................... 113

Conclusion ............................................................................................................................ 116


6.1
6.2
6.3
6.4

Link Project to Seminar .................................................................................................... 116


Project Achievement ......................................................................................................... 116
Project Management Issues .............................................................................................. 116
Evaluate Project Strengths and Weaknesses ..................................................................... 117
6.4.1
Strengths ........................................................................................................................................ 117
6.4.2
Weakness ....................................................................................................................................... 118
6.5 Suggestion for future improvement .................................................................................. 118
6.6 Personal Reflection ........................................................................................................... 118

References ............................................................................................................................. 119


Appendices ............................................................................................................................ 120
User Guide ............................................................................................................................ 121

Project

viii

Cafeteria Management System

Chapter 1
System Planning

Project

ix

Cafeteria Management System

1.0 System Planning


This chapter will provide the overview of the project planning in the system which
include project aims and objectives, company background, project scope, project
schedule, and outline of approach/Methodology Used.

1.1

Project Aims and Objectives

The system will helps to fasten the respond time when doing daily transaction.
Customers or members enquiries will be responding in an efficient way because the
system can help to keep track of the member record quickly.
The system also can help to save the manpower in maintaining the paperwork, record
that kept in system will save the paper cost, and manpower cost that normally require
more staff to take care of the paper document and using database also save the place
to store the document.
The system make the payment process become easier and faster.
Appointment becomes flexible and easy to maintain. The member can make
appointment by phone call the staff of cafeteria or using the online system making the
appointment for their dinning time and food they need.
Online feedback can let customer to rating for the meal that they eat. The meal rating
also can be a kind of reference when customers make meal ordering. This may help to
improve the sales of the cafeteria.
The system allows the time and set meal arrangement for whole week and makes the
appointment become easier.
The system help the cafeteria to keep track the membership status of the member.
Thus, it helps the cafeteria to increase the income and keep track the popularity of
cafeteria.

Project

Cafeteria Management System

1.2

Company Background

As U Like Caf is a cafeteria that located at section 2, Petaling Jaya and provide
different set of breakfast, lunch and dinner. The cafeteria is own by Jimmy and have
over 10 years experience. As U Like Caf provide great range of delicious food
varieties and great atmosphere with dining sensation that suits the modern lifestyle.
As U Like Caf provide meal that fresh and rich with nutritious, we also provide with
various kind of food such as Chinese, Western, Hong Kong and Japanese cuisine. Our
beverage is prepared according to teenagers habit to suit local taste.

Project

Cafeteria Management System

1.3

Project Scope

Figure 1.1 Project Structrue Chart and Module Distrubution

Project

Cafeteria Management System

Below is my responsible module:

Meal Module
Cafeteria staff able to change their menu information such as price, meal image
and etc, via the offline application and the updated information will be shown at
their web page automatically. And customers are able to view the menu through
the cafeteria web page. And meal order able to make though this module, after
reservation is made in web page.

Promotion Module
Cafeteria can combine existing meal to become promotion. And the information
could add for promotions are same with Meal Module such as price, meal image
and etc. The updated promotion information will be show in web page as well.
Orders are able to make though this module too in web page.

Reservation Module
Cafeteria able to make reservation for customer through the offline application,
and customer able to make reservation online via cafeteria web page after register
as member. And a Reservation Monitoring Interface will be available for cafeteria
side to monitor the upcoming reservation. The Reservation Monitoring Interface
will be refreshing every 10 minutes.

Order Module
Order module allow customer to make meal order after reservation had been
make, and cafeteria side could enter the order into the system after order had been
made by walk-in customer. And the order entered will make the payment process
become easier by directly passing the order information to payment module.

Project

Cafeteria Management System

Report Module
The system is able generate order report and reservation report. Order allow
cafeteria to see which meal and promotion is more popular and having the need to
trade in more ingredient, or meal that didnt order by anyone and could proceed to
remove the item from menu. The reservation report would able to tell show the
reservation information, so that cafeteria side could come out with the summary
on which day and what time people would prefer to make reservation.

Seat Admission Module


This module allow cafeteria to monitor all the seat situation in the cafeteria, which
seat is occupied or which seat is available, and the order of each table will be keep
track for payment purpose.

Project

Cafeteria Management System

1.4

Project Schedule

Figure 1.2 Project Schedule

Figure 1.3 Project Schedule

Project

Cafeteria Management System

Figure 1.4 Project Schedule

Project

Cafeteria Management System

1.5

Outline of approach/Methodology Used

Microsoft Visual 2010 had been used in developing the system, and Microsoft SQL
2007 had been use for database management of the system, which is build-in database
of Microsoft Visual 2010. Vb.net is used for the offline application development and
c# is adapted on web application development. 3 Tier Object Oriented approaches had
been used on offline application for easier maintenance of the system. And SDLC
method had been use in designing the system requirement and work flow.

Project

Cafeteria Management System

Chapter 3: System Design

Chapter 2
Requirements Analysis

Project

Cafeteria Management System

Chapter 3: System Design

2.0 Requirements Analysis


This chapter is going to analysis the requirement of the system and what function the
system shall be able to provide in order to fulfill the user need. Fact will be collect
and gather by understanding the user need.

2.1

Fact Gathering

As U Like Caf is currently using the old type of management way, this is though
paper work. Everything is done manually by using paper recording including order,
reservation, payment, staff and member information recording. And thats no personal
web site for cafeteria.

Because everything thing is done by using manual work, which is merely using pen to
record on book or paper, therefore more manpower and time will be consume. And
manual paper-work may cause more mistake compare to automate system method.
And cafeteria staff had to always aware of the order and reservation list, to make sure
every reservation and order will de deliver on time, without the help of auto
notification.

And information maintenance will be hard when information is recorded in paper


work. Paper-work information storing require more and more space while the
business size is becoming bigger, and will be time-consuming and difficult to retrieve
information from a pile of paper work.

Therefore, a system that able to solve the current problem is require, which mean a
system that able to provide easier information maintenance, order and reservation
management, and also include external function such as report generating.

Project

10

Cafeteria Management System

Chapter 3: System Design

2.1.1 Background Reading


Its a process to gain more understanding about our customer such as their company
background, objective, business core and so on. By gaining the understanding of their
company such as company policy and company rules, it eases developer to building up
the business rules when designing the database and coding. Through the reading, we
understanding all their business need and also find out that they are actually using
manual paperwork for management currently.
2.1.2 Interview
After the background reading, we also interviewed Ms Lim, the Manager of As U Like
Caf. Though the interview, we gather all problems thats facing by their current
management, such as troublesome in maintenance the old record, high error rate on
documentation, time consuming and so on. In order to gain more understanding about
the need of system, Ms Lim agreed us to collect information from cafeteria staff by
using questionnaire technique. Other than understanding the current problem facing by
the current management in the interview, we also discuss about the new function
request by them such as redemption module and online menu viewing.

Below is the interview information:

Project

Interviewer:

Lum Li Yao, Ng Song Hui

Interviewee:

Manager of As U Like Cafe: Ms Lim

Date:

12th April 2010

Time:

10.00am 12.00pm

Venue:

As U Like Cafe Meeting Room

11

Cafeteria Management System

2.2

Chapter 3: System Design

Non-Functional Requirements

Product Requirement
Efficiency Requirement
The overall response of the system is satisfies, system will response to user action within
few seconds. The modification of meal and promotion information will be updated
directly on webpage.

Reliability Requirement
Thats no system error so far from system testing, therefore the system is reliable. All
information modified or uploaded by user didnt lead to any conflict or error.

Portability Requirement
The system is able to run on different platform as long as operating system is installed.

Usability Requirement
The system is design as simple as possible without removing any requires function. Every
single function could be complete in one form to avoid user confusion. And every upon
every completion of action, proper message will be shown to inform user.

Organization Requirement
Delivery Requirement

Project

Order is only allowed upon the completion of reservation.

Only member is allowed to make reservation.

12

Cafeteria Management System

Chapter 3: System Design

External Requirement
Legislative Requirement
The system is developed within the scope of law and regulations. User and staff
information in the system will not disclose to any unrelated person.

Ethical Requirement
The offline application is designing according to the need of cafeteria staff
requirement, and the web application is design in the manner where every general
public user able to adapt, since public user is able to register and make reservation and
order via the web application.

2.3

Functional Requirements

Meal Module
This module allow cafeteria to manage their meal menu, function included edit, delete and
add, by using offline application. Photo is allowed to upload. Updated menu list in the
offline application will update the menu list on the web page as well. And member of
cafeteria is able to view all updated meal menu at their web page.

Promotion Module
This module allow cafeteria to combine the existing meal to become a promotion menu,
function are included edit, delete and add via the offline application. Photo is allowed to
upload. Updated promotion list in the offline application will update the promotion list on
the web page as well. And member of cafeteria is able to view all updated meal menu at
their web page.

Project

13

Cafeteria Management System

Chapter 3: System Design

Table Reservation Module


This module allows seat reservation to be made, either by staff or customer. Staff can
help customer to reserve seat via the offline application, or customer could reserve in
cafeteria webpage after register as member.

Order Module
This module allows order to make. Order make is allowed to edit as long as the payment
havent being made. Meal ordering are allowed by member after reservation had been
make online, or by staff after a walk-in customer has choose a table. 20% of deposit of
the subtotal of meal ordered need to be by credit/debit card if the order is make online.
And order information will pass to payment module to generate payment process.

Report Module
This module allows the cafeteria to generate and view report. The reports included are
Order Report and Reservation Report.

Seat Admission Module


This module allow cafeteria to monitor the current seat situation of the restaurant. Which
table, or how many table is available or not available. And each table will be bound to
one order and one member once occupied.

Project

14

Cafeteria Management System

2.4

Chapter 3: System Design

Overview Use Case Diagram

Figure 2.1 Over view use case for Cafeteria Management System

Project

15

Cafeteria Management System

2.5

Chapter 3: System Design

Detail Use Case Diagram (My Module)

Meal Module

Meal Module
ViewMealMenu

Staff

AddMealMenu

Customer
EditMealMenu

Manager
DeleteMealMenu

Figure 2.2 Use Case for Meal Module

Promotion Module

Promotion Module
ViewPromotion

Staff

AddPromotion

Customer
EditPromotion

Manager
DeletePromotion

Figure 2.3 Use Case for Promotion Module

Project

16

Cafeteria Management System

Chapter 3: System Design

Table Reservation Module

Table Reservation Module


AddTableReservation
<<extends>>

Staff
AddOrderMeal

Customer
EditReservation

Manager
ViewReservation

Figure 2.4 Use Case for Reservation Module

Report Module

Report Module

GenerateCustomerReservationReports

Manager

GenerateMealOrderReports

Figure 2.5 Use Case for Report Module

Project

17

Cafeteria Management System

Chapter 3: System Design

Order Module

Meal Ordering Module


ViewOrderMeal

Staff

AddMealOrder

<<include>>

Customer

CheckReservationdetails

Manager
EditMealOrder

Figure 2.6 Use Case for Order Module

Seat Admission Module

Seats Admission
Module
AssignTable
Staff

MonitorReservation

Manager

Figure 2.7 Use Case for Admission Module

Project

18

Cafeteria Management System

2.6

Chapter 3: System Design

Use Case Specification

Search Meal Menu


Use Case: Meal Module
Brief Description: This use case allows cafeterias staff to search meal menu.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Meal Menu option


5) Redirect to Meal Menu user interface
6) Retrieve the 1st Meal Menu Record
7) Enter menu ID that wanted to be
search
8) Click Search button
9) Retrieve meal menu information
according to menu ID enter
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched meal ID
- System prompts for error message Invalid Meal ID!

Project

19

Cafeteria Management System

Chapter 3: System Design

Add Meal Menu


Use Case: Meal Module
Brief Description: This use case allows cafeterias staff to add new meal menu.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Meal Menu option


5) Redirect to Meal Menu user interface
6) Retrieve the 1st Meal Menu Record
7) Click Add New Button
8) Enable field for information key-in
and auto generate meal menu ID
9) Enter the Meal Menu information
10) Click Save button
11) Validate meal menu information.
12) Prompt for meal added successfully
message box.
13) Update Database
14) Retrieve to 1st Meal Menu Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 11: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.

Project

20

Cafeteria Management System

Chapter 3: System Design

Edit Meal Menu


Use Case: Meal Module
Brief Description: This use case allows cafeterias staff to edit meal menu.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Meal Menu option


5) Redirect to Meal Menu user interface
6) Retrieve the 1st Meal Menu Record
7) Enter menu ID that wanted to be
search.
8) Click search button
9) Retrieve meal menu information
according to menu ID enter
10) Click Edit button
11) Enable field for information editing.
12) Edit Meal Menu information
13) Click Save button
14) Validate meal menu information.
15) Prompt for meal added successfully
message box.
16) Update Database
17) Retrieve to 1st Meal Menu Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched meal ID
- System prompts for error message Invalid Meal ID!
A4.Step 14: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.

Project

21

Cafeteria Management System

Chapter 3: System Design

Delete Meal Menu


Use Case: Meal Module
Brief Description: This use case allows cafeterias staff to delete meal menu.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Meal Menu option


5) Redirect to Meal Menu user interface
6) Retrieve the 1st Meal Menu Record
7) Enter menu ID that wanted to be
search.
8) Click search button
9) Retrieve meal menu information
according to menu ID enter
10) Click Delete button
11) Prompt for confirmation message
12) Update Database
13) Retrieve the 1st Meal Menu Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6 & 13: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched meal ID
- System prompts for error message Invalid Meal ID!
A4.Step 12: If actor selects No for in confirmation message box.
- System abort delete action.

Project

22

Cafeteria Management System

Chapter 3: System Design

Search Promotion Menu


Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to search promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Promotion option


5) Redirect to Promotion user interface
6) Retrieve the 1st Promotion Record
7) Enter Promotion ID that wanted to be
search
8) Click Search button
9) Retrieve Promotion information
according to promotion ID enters
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched meal ID
- System prompts for error message Invalid Promotion ID!

Project

23

Cafeteria Management System

Chapter 3: System Design

Add Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to add new promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Promotion option


5) Redirect to Promotion user interface
6) Retrieve the 1st Promotion Record
7) Click Add New Button
8) Enable field for information key-in
and auto generate Promotion ID
9) Enter the Promotion information
10) Click Save button
11) Validate Promotion information
12) Prompt for Promotion added
successfully message box
13) Update Database
14) Retrieve to 1st Promotion Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 11: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.

Project

24

Cafeteria Management System

Chapter 3: System Design

Edit Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to edit promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Promotion option


5) Redirect to Promotion user interface
6) Retrieve the 1st Promotion Record
7) Enter Promotion ID that wanted to be
search.
8) Click search button
9) Retrieve Promotion information
according to Promotion ID enter
10) Click Edit button
11) Enable field for information editing.
12) Edit Promotion information
13) Click Save button
14) Validate Promotion information.
15) Prompt for meal added successfully
message box.
16) Update Database
17) Retrieve to 1st Promotion Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched promotion ID
- System prompts for error message Invalid Promotion ID!
A4.Step 14: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.

Project

25

Cafeteria Management System

Chapter 3: System Design

Delete Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to delete promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Promotion option


5) Redirect to Promotion user interface
6) Retrieve the 1st Promotion Record
7) Enter Promotion ID that wanted to be
search.
8) Click search button
9) Retrieve Promotion information
according to menu ID enter
10) Click Delete button
11) Prompt for confirmation message
12) Update Database
13) Retrieve the 1st Promotion Record
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6 & 13: If system found no record
- System prompts for error message Empty Record!
A3.Step 9: If system found no matched promotion ID
- System prompts for error message Invalid Promotion ID!
A4.Step 12: If actor selects No for in confirmation message box.
- System abort delete action.

Project

26

Cafeteria Management System

Chapter 3: System Design

Add Reservation (Offline Application)


Use Case: Reservation Module
Brief Description: This use case allows cafeterias staff to add reservation.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Reservation option


5) Redirect to Reservation user interface
& auto generate Reservation ID
8) Key in reservation information
7) Click Reserve Button
8) Validate Promotion information
12) Prompt for Promotion added
successfully message box
13) Update Database
14) Prompt for meal order option
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 8: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.
A3.Step 14: If actor selects yes
- Redirect to order interface.

Project

27

Cafeteria Management System

Chapter 3: System Design

Add Reservation (Web Page)


Use Case: Reservation Module
Brief Description: This use case allows cafeterias customer to add reservation.
Actor: Customer
Main flows of event (Main Scenario)
Actor Action
1)Login to the web page

System Response
2) Verify the login name and password
3) Redirect to home page

4) Choose Reservation option


5) Redirect to Reservation user interface
6) Select reservation information
7) Click Reserve Button
8) Validate Promotion information &
auto generate Reservation ID
9) Prompt for Promotion added
successfully message box
10) Update Database
11) Prompt for meal order option
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 8: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.
A3.Step 11: If actor selects yes
- Redirect to order interface.

Project

28

Cafeteria Management System

Chapter 3: System Design

Edit Reservation (Web Page)


Use Case: Reservation Module
Brief Description: This use case allows customer to edit reservation.
Actor: Customer
Main flows of event (Main Scenario)
Actor Action
1)Login to the web page

System Response
2) Verify the login name and password
3) Redirect to home page

4) Choose Reservation option


5) Redirect to Reservation user interface
6) Retrieve existed reservation
information.
6) Select reservation
7) Click Edit Button
8) Enable field for reservation editing
9) Edit reservation information
10) Click Save
9) Prompt for reservation updated
message box
10) Update Database
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 8: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message.
A3.Step 11: If actor selects yes
- Redirect to order interface.

Project

29

Cafeteria Management System

Chapter 3: System Design

Print Report
Use Case: Report Module
Brief Description: This use case allows cafeterias manager to print report.
Actor: Manager
Main flows of event (Main Scenario)
Actor Action
1)Login to the web page

System Response
2) Verify the login name and password
3) Redirect to Main menu

4) Choose Report option


5) Redirect to Report user interface
6) Select report information
7) Click View Button
8) Display report in crystal report
viewer
10) Click Print
9) Print selected report

Project

30

Cafeteria Management System

Chapter 3: System Design

Search Order
Use Case: Order Module
Brief Description: This use case allows cafeterias staff to search order.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Table option


5) Redirect to Table user interface
6) Select table
7) Click Order
8) Redirect to Order user interface
8) Click Reserved button
9) Enable filed for searching
10) Enter order ID
11) Click Search
11) Retrieve selected order information
accordingly
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If selected table is assigned
- Order button will be enabled.
A3.Step 11: If system found invalid order ID
- System prompts for error message Invalid order ID

Project

31

Cafeteria Management System

Chapter 3: System Design

Add Order (Offline Application)


Use Case: Order Module
Brief Description: This use case allows cafeterias staff to add new order.
Actor: Staff

Main flows of event (Main Scenario)


Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Table option


5) Redirect to Table user interface
6) Select table
7) Click Order
8) Redirect to Order user interface and
auto generate auto ID
9) Enter order information
8) Click Confirm button
9)Validate order information
10) Prompt for order added successful
message.
11) Update Database
12) Redirect back to Table user interface
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If selected table is assigned
- Order button will be enabled.
A3.Step 9: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message

Project

32

Cafeteria Management System

Chapter 3: System Design

Add Order (Web Page)


Use Case: Order Module
Brief Description: This use case allows cafeterias staff to add new order.
Actor: Staff

Main flows of event (Main Scenario)


Actor Action
1)Login to the web page

System Response
2) Verify the login name and password
3) Redirect to Home Page

4) Choose Meal Menu option


5) Redirect to Meal Menu user interface
6) Select meal
7) Click Add to Cart!
8) Add selected Meal into Cart List
8) Click Proceed to Order button
9) Redirect to Order Page
10) Select Reservation ID to bound to
current Order
11) Key in Credit/Debit card info
12) Click Add to Order
13) Validate Credit/Debit card info
14) Prompt for Order successfully
message.
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 8: If cart list is empty
- System prompts for error message Cart List is Empty!
A3.Step 13: If system found invalid credit/debit card information
- System display Error Provider Icon on specify filed with proper message

Project

33

Cafeteria Management System

Chapter 3: System Design

Edit Order
Use Case: Order Module
Brief Description: This use case allows cafeterias staff to edit order.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Table option


5) Redirect to Table user interface
6) Select table
7) Click Order
8) Redirect to Order user interface
8) Click Reserved button
9) Enable filed for searching
9) Enter order ID
10) Click Search
11) Retrieve selected order information
accordingly
12) Edit order information
13) Click Confirm
14) Validate edited information
15) Update Database
16) Redirect back to Table user interface
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If selected table is assigned
- Order button will be enabled.
A3.Step 11: If system found invalid order ID
- System prompts for error message Invalid order ID
A3.Step 14: If system found invalid format information
- System display Error Provider Icon on specify filed with proper message

Project

34

Cafeteria Management System

Chapter 3: System Design

Assign Table
Use Case: Seats Admission Module
Brief Description: This use case allows cafeterias staff to assign table to customer.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Table option


5) Redirect to Table user interface
6) Select table
7) Click Occupy
8) Turn selected table into Occupied
mode
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!
A2.Step 6: If selected table is not assigned
- Occupy button will be enabled.

Monitor Reservation
Use Case: Seats Admission Module
Brief Description: This use case allows cafeterias staff to assign table to customer.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system

System Response
2) Verify the login name and password
3) Redirect to Main Menu

4) Choose Table option


5) Redirect to Table user interface
6) Click Reservation Monitor
7) Prompt Reservation Monitor
Interface
8) Display reservation information in
upcoming 30minutes
9) Refresh every 10minutes
Alternative flows (other scenario)
A1.Step 2: If system gets the incorrect login name and password
- System prompts for error message incorrect login name and password!

Project

35

Cafeteria Management System

2.7

Chapter 3: System Design

Activity Diagrams

Add Meal Menu


Staff

System

SelectMenuOption

DisplayMenuOption

SelectAddNewMenu

EnableFieldforNewMenuAdding

EnterNewMenuDetails
PromptForConfirmation

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.8 Activity Diagram for Add Meal Menu

Project

36

Cafeteria Management System

Chapter 3: System Design

Edit Meal Menu


Staff

System

SelectMenuOption

DisplayMenuOption

SearchMenuthatneededtoUpdate
DisplaySelectedMenuDetails

DisplaySeletedMenuinEditableMode

Click"Edit"Button
PromptForConfirmation

Editdetails

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.9 Activity Diagram for Edit Meal Menu

Project

37

Cafeteria Management System

Chapter 3: System Design

Delete Meal Menu


Staff

System

SelectMenuOption

DisplayMenuOption

SearchMenuthatwantedtobeDelete
DisplaySelecetedMenuDetails

PromptForConfirmation

Click"Delete"Button
UpdateDatabase

Select"Yes"or"No"Button

[Yes]
[No]

Figure 2.10 Activity Diagram for Delete Meal Menu

Project

38

Cafeteria Management System

Chapter 3: System Design

Add Promotion
Staff

System

SelectPromotionOption

DisplayPromotionOption

SelectAddPromotion

EnableFiledforNewPromotionAdding

EnterPromotionDetails
PromptForConfirmation

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.11 Activity Diagram for Add Promotion

Project

39

Cafeteria Management System

Chapter 3: System Design

Edit Promotion
Staff

System

SelectMealMenuOption

DisplayMealMenuOption

SearchMenuthatwantedtobeEdit

DisplaySelectedPromotionDetail

DisplaySeletedPromotioninEditableForm

Click"Edit"Button
PromptForConfirmation

EditSelectedPromotion

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.12 Activity Diagram for Edit Promotion

Project

40

Cafeteria Management System

Chapter 3: System Design

Delete Promotion
Staff

System

SelectPromotionOption

DisplayPromotionOption

SerachPromotionthatwantedtobeDelete

DisplaySelectedPromotionDetails

PromptForConfirmation

Click"Delete"Button
UpdateDatabase

Select"Yes"or"No"Button

[Yes]

[No]

Figure 2.13 Activity Diagram for Delete Promotion

Project

41

Cafeteria Management System

Chapter 3: System Design

Add Reservation (Web Page)


Member

System

Login

VerifyAuthentication

[LoginFail]
[LoginSuccessfully]

SelectReservationPage

DisplayMemberPage

ChooseAvailableTable&Time

DisplayReservationPage

Click"Reserve"Button

PromptForConfirmation

[No]
Select"Yes"or"No"Button

PromptFor"MealOrder"Selection

[Yes]

[OrderOnSeat]
UpdateDatabase
SelectOrderNoworOrderOnSeat
RedirectMemberto"MealOrder"Page

[OrderNow]

Figure 2.15 Activity Diagram for Add Reservation (Offline)

Project

42

Cafeteria Management System

Chapter 3: System Design

Add Reservation (Offline)


Staff

System

SelectReservationOption

DisplayReservationOption

EnterReservationDetails

PromptForConfirmation

Click"Save"Button

[No]
Select"Yes"or"No"Button

PromptFor"MealOrder"Selection

[Yes]

SelectOrderNoworOrderOnSeat
[OrderOnSeat]
UpdateDatabase

Redirectto"MealOrder"Form
[OrderNow]

Figure 2.15 Activity Diagram for Add Reservation (Offline)

Project

43

Cafeteria Management System

Chapter 3: System Design

Edit Reservation (Web Page)


Staff

System

SelectReservationOption

DisplayReservationOption

DisplayAllReservationinaList

SelectReservationthatneededtoEdit

DisplaySeletedReservationinEditableMode

Click"Edit"Button

PromptForConfirmation

EditSelectedReservation

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.16 Activity Diagram for Edit Reservation (Web Page)

Project

44

Cafeteria Management System

Chapter 3: System Design

Add Order (Off line Application)


Staff

System

SelectOrderOption

DisplayOrderOption

EnterOrderDetails
PromptForConfirmation

Click"AddOrder"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.17 Activity Diagram for Add Order (Offline Application)

Project

45

Cafeteria Management System

Chapter 3: System Design

Add Order (Web Page)


Member

System

Login

VerifyAuthentication

[LoginFail]
[LoginSuccessfully]

DisplayHomePage

SelectMealMenuOption

DisplayMealOrderMenu

SelectMealwanttobeOrder

Click"AddtoCartList!"Button

AddSelectedItemintoCartList

Click"ProceedtoOrder"Button

RedirecttoOrderPage

SelectReservationtoboundtocurrentOrder
UpdateDatabase
Click"Confirm"

Figure 2.18 Activity Diagram for Add Order (Web Page)

Project

46

Cafeteria Management System

Chapter 3: System Design

Edit Order
Staff

System

SelectOrderOption

DisplayOrderOption

DisplaySeletedOrderinEditableMode

Click"Edit"Button
PromptForConfirmation

UpdateOrderdetails

Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button

[Yes]

Figure 2.19 Activity Diagram for Add Order (Edit Order)

Project

47

Cafeteria Management System

Chapter 3: System Design

Chapter 3
System Design

Project

48

Cafeteria Management System

Chapter 3: System Design

3.0 System Design


This chapter will show the design phase such as Database Design, User Interface Design,
Class Diagrams, and Sequence Diagram.

3.1

Class Diagram

Class Diagram
CreditCard

Member

Staff
-staff_ID(PK)
-password
-name
-sex
-email
-address
-phone
-DOB
-MaritalStatus
-salary
-position
-ICNo
-status

Table
-Table_ID(PK)
-member_ID(FK)
-order_ID(FK)
-valid

Reservation
-ReservationID(PK)
-member_ID(FK)
-order_ID(FK)
-reserve_seat
-reserve_date
-reserve_time

1..1 *..1
Have

-member_ID(PK)
-password
-name
-sex
-email
-address
-phone
-DOB
-MaritalStatus
-reward_point
-security_question
-security_answer
-phonePlace
-status

1..*
1..1
Have

-CardID(PK)
-expire
-cvcCode
-password
-UserName

1..* 1..1
Have

1..*

-redeem_ID(PK)
-date
-quantity
-time
-memberID
-gift_ID

Have

-Payment_ID(PK)
-order_ID(FK)
1..1
-member_ID(FK) 1..1
Have
-subTotal
-grandTotal
-balance
-time
-date

-order_ID(PK)
-reservation_ID(FK)
-date
-memberID(FK)
-table

OrderDetail

1..*

1..*

Have

-OrderDetail_ID(PK)
-mealID(FK)
-orderID(FK)
-qty

Promotion

Food
-Meal_ID(PK)
-name
-type
-photo
-price
-description
1..1

-Gift_ID(PK)
-name
-description
-quantity
-point_need_walkIn
-point_need_web
-updateDate
-photo

Order

1..*

-MenuID(PK)
-Q1
-Q2
-Q3
-Q4
-Q5
-participant

1..* 1..1
Have

1..1

Payment

Survey

Gift

redemption

-Promotion_ID(PK)
-name

1..*
1..*
-price
Belongs

-description
-date_start
-date_end
-image

1..1

1..1

Have

PromotionDetail
-PromotionDetailID(PK)
-PromotionID(FK)
-MealID(FK)

Figure 3.0 Class Diagram for Cafeteria Management System

Project

49

Cafeteria Management System

3.2

Chapter 3: System Design

Database Structure

Credit Card
Field Name

Length

CardID

Data
Type
varchar

expire

image

cvcCode

varchar

50

password

varchar

50

UserName

varchar

Length

Meal_ID

Data
Type
varchar

50

For identify the meal record.

name

varchar

50

To store the name of the meal.

type

varchar

50

To store the type of the meal.

photo

image

To store the image of the meal.

Price

decmial

18,2

To store the price of the meal.

description

varchar

MAX

To store the description of the meal.

50

Description
For identify the credit/debit card
record.
To store expiry date of credit/debit
card.
To store the cvc code of the
credit/debit card.
To store the password of the
credit/debit card.
To store the user name of the
credit/debit card owner.

PK /FK
PK
-

Food
Field Name

Project

50

Description

PK /FK
PK

Cafeteria Management System

Chapter 3: System Design

Gift
Field Name

Length

Gift_ID

Data
Type
varchar

Description

PK /FK

50

For identify the gift record.

name

varchar

50

To store the name of the gift.

description

varchar

MAX

To store the description of the gift.

quantity

int

point_need_walkin

int

Point_need_web

int

updateDate

varchar

50

photo

image

To store the quantity available of


the gift.
To store the point needed for walkin redemption.
To store the point needed for online
redemption.
To store the latest updated date that
gift being update.
To store the image of the gift.

Length

order_ID

Data
Type
varchar

50

For identify the order record.

PK

reservation_ID

varchar

50

FK

date

varchar

50

memberID

varchar

50

table

varchar

50

For identify which reservation the


order bound to.
For store the date where the order is
made.
For identify which member makes
the order.
For identify which table the order
bound to.

Length

OrderDetail_ID

Data
Type
varchar

50

For identify the order detail record.

PK

mealID

varchar

50

FK

orderID

varchar

50

int

For identity the meal/promotion


being order.
For identity which order the order
detail record bound to.
To store the quantity of
meal/promotion ordered.

PK

Order
Field Name

Description

PK /FK

FK
FK

OrderDetail
Field Name

qty

Project

51

Description

PK /FK

FK
-

Cafeteria Management System

Chapter 3: System Design

Member
Field Name

Length

member_ID

Data
Type
varchar

50

For identify the member record.

password

varchar

50

name

varchar

50

To store the password of the


member account.
To store the name of the member.

sex

varchar

50

To store the gender of the member.

email

varchar

50

To store the email of the member.

address

varchar

MAX

To store the address of the member.

phone

int

DOB

varchar

50

MaritalStatus

varchar

50

reward_point

int

security_question

varchar

MAX

security_answer

varchar

MAX

phonePlace

varchar

50

status

varchar

50

To store the phone number of the


member.
To store the date of birth of the
member.
To store the marital status of the
member.
To store the reward point currently
owned by member.
To store the security question for
password recovery purpose.
To store the security answer for
password recovery purpose.
To store the type of contact of
member.
To store the member account
current status.

Project

52

Description

PK /FK
PK
-

Cafeteria Management System

Chapter 3: System Design

Payment
Field Name

Length

Payment_ID

Data
Type
varchar

Description

PK /FK

50

For identify the payment record.

PK

order_ID

varchar

50

FK

Member_ID

varchar

50

subTotal

decimal

18,2

grandTotal

decimal

18,2

balance

decimal

18,2

time

varchar

50

date

varchar

50

For identity the order that bound to


this payment.
For identity which member makes
this payment.
To store the subtotal of the
payment.
To store the grand total of the
payment.
To store the balance of the
payment.
To store the time when the payment
is made.
To store the date when the payment
is made.

Length

Promotion_ID

Data
Type
varchar

50

For identify the promotion record.

name

varchar

50

To store name of the promotion.

price

decimal

18,2

To store the price of the promotion.

description

varchar

MAX

date_start

varchar

50

date_end

varchar

50

image

image

50

To store the description of the


promotion.
To store the date where the
promotion is start.
To store the date where the
promotion is end.
To store the image of the
promotion.

FK
-

Promotion
Field Name

Project

53

Description

PK /FK
PK

Cafeteria Management System

Chapter 3: System Design

PromotionDetail
Field Name

Length

PromotionDetailID

Data
Type
varchar

Description

PK /FK

50

For identify the promotion detail.

PK

promotionID

varchar

50

FK

MealID

varchar

50

For identify which promotion


bound to the promotion detail.
For identify which meal bound to
the promotion detail.

Length

redeem_ID

Data
Type
varchar

50

For identify the redemption record.

PK

date

varchar

50

int

time

datetime

memberID

varchar

50

gift_ID

varchar

50

To store the date where the


redemption is made.
To store the quantity of items being
redeem.
To store the time where the
redemption is made.
For identify which member makes
the redemption.
For identify which gift had been
redeemed.

Length

reservationID

Data
Type
varchar

50

For identify the reservation record.

PK

member_ID

varchar

50

FK

order_ID

varchar

50

reserve_seat

varchar

50

reserve_date

varchar

50

reserve_time

datetime

For identify which member makes


this reservation.
For identify which order is bound
to the reservation.
To store the number of reserved
seats.
To store the date for the
reservation.
To store the time for the
reservation.

FK

redemption
Field Name

quantity

Description

PK /FK

FK
FK

Reservation
Field Name

Project

54

Description

PK /FK

FK
-

Cafeteria Management System

Chapter 3: System Design

Staff
Field Name

Length

staff_ID

Data
Type
varchar

50

For identify the staff record.

password

varchar

50

name

varchar

50

To store the password of the staff


account.
To store the name of the staff.

sex

varchar

50

To store the gender of the staff.

email

varchar

50

To store the email of the staff.

address

varchar

MAX

phone

int

DOB

varchar

50

MaritalStatus

varchar

50

int

18,2

position

varchar

50

ICNo

varchar

50

To store the house address of the


staff.
To store the contact number of the
staff.
To store the day of birth of the
staff.
To store the marital status of the
staff.
To store the monthly salary of the
staff.
To store the position of the staff in
cafeteria.
To store the IC number of the staff.

status

varchar

50

To store the staff current account


status.

salary

Project

55

Description

PK /FK
PK

Cafeteria Management System

Chapter 3: System Design

Survey
Field Name

Data
Type
varchar

Length

Q1

int

Q2

int

Q3

int

Q4

int

Q5

int

participant

int

Length

table_ID

Data
Type
varchar

50

For identify the table record.

PK

member_ID

varchar

50

FK

order_ID

varchar

50

int

For identify which member is


currently bound to the table.
For identify which order is
currently bound to the table.
For keep track the table current
status, either occupied or available.

menuID

50

Description
For identify the survey record.
To store the total rating for question
1.
To store the total rating for question
2.
To store the total rating for question
3.
To store the total rating for question
4.
To store the total rating for question
5.
To store the total participant that
involved in the survey.

PK /FK
PK
-

Survey
Field Name

valid

Project

56

Description

PK /FK

FK
-

Cafeteria Management System

3.3

Chapter 3: System Design

Sequence Diagram

Add Meal Menu

Figure 3.1 Sequence Diagram for Add Meal Menu

Project

57

Cafeteria Management System

Chapter 3: System Design

Edit Meal Menu

Figure 3.2 Sequence Diagram for Edit Meal Menu

Project

58

Cafeteria Management System

Chapter 3: System Design

Delete Meal Menu

Figure 3.3 Sequence Diagram for Delete Meal Menu

Project

59

Cafeteria Management System

Chapter 3: System Design

Add Promotion

Figure 3.4 Sequence Diagram for Add Promotion

Project

60

Cafeteria Management System

Chapter 3: System Design

Edit Promotion

Figure 3.5 Sequence Diagram for Edit Promotion

Project

61

Cafeteria Management System

Chapter 3: System Design

Delete Promotion

Figure 3.5 Sequence Diagram for Delete Promotion

Project

62

Cafeteria Management System

Chapter 3: System Design

Add Reservation

Figure 3.6 Sequence Diagram for Add Reservation

Project

63

Cafeteria Management System

Chapter 3: System Design

Edit Reservation

Figure 3.7 Sequence Diagram for Edit Reservation

Project

64

Cafeteria Management System

Chapter 3: System Design

Add Order

Figure 3.8 Sequence Diagram for Add Order

Project

65

Cafeteria Management System

Chapter 3: System Design

Edit Order

Figure 3.9 Sequence Diagram for Edit Order

Project

66

Cafeteria Management System

Chapter 3: System Design

View Report

Figure 3.10 Sequence Diagram for View Report

Project

67

Cafeteria Management System

Chapter 3: System Design

Print Report

Figure 3.11 Sequence Diagram for Print Report

Project

68

Cafeteria Management System

3.4

Chapter 3: System Design

User Interface

Offline Application
Log In Page

Figure 3.12 Login Page User Interface

Main Menu Form

Figure 3.13 Main Menu User Interface

Project

69

Cafeteria Management System

Chapter 3: System Design

Table Admission Form

Figure 3.14 Table Admission User Interface

Reservation Form

Figure 3.15 Reservation User Interface

Project

70

Cafeteria Management System

Chapter 3: System Design

Meal Menu Maintenance Form

Figure 3.16 Meal Menu Maintenance User Interface

Project

71

Cafeteria Management System

Chapter 3: System Design

Promotion Maintenance Form

Figure 3.17 Promotion Maintenance User Interface

Project

72

Cafeteria Management System

Chapter 3: System Design

Order Form

Figure 3.18 Order Form User Interface

Project

73

Cafeteria Management System

Chapter 3: System Design

Report Generation Form

Figure 3.19 Report Generation User Interface

Project

74

Cafeteria Management System

Chapter 3: System Design

Web Page
Meal Menu Page

Figure 3.20 Meal Menu User Interface

Project

75

Cafeteria Management System

Chapter 3: System Design

Order Page

Figure 3.21 Order User Interface

Project

76

Cafeteria Management System

Chapter 3: System Design

Reservation Page

Figure 3.22 Reservation User Interface

Project

77

Cafeteria Management System

3.5

Chapter 4: Programming

Report Design

Yearly Reservation Report

Figure 3.23 Yearly Reservation Report Design

Project

78

Cafeteria Management System

Chapter 4: Programming

Monthly Reservation Report

Figure 3.24 Monthly Reservation Report Design

Project

79

Cafeteria Management System

Chapter 4: Programming

Dynamic Reservation Report

Figure 3.5 Dynamic Reservation Report Design

Project

80

Cafeteria Management System

Chapter 4: Programming

Order Report
Yearly Order Report

Figure 3.6 Yearly Order Report Design

Monthly Order Report

Figure 3.7Monthly Order Report Design

Project

81

Cafeteria Management System

Chapter 4: Programming

Dynamic Order Report

Figure 3.8 Dynamic Order Report Design

Project

82

Cafeteria Management System

Chapter 4: Programming

Chapter 4
Programming

Project

83

Cafeteria Management System

Chapter 4: Programming

4.0 Programming
This chapter will show the coding part of Cafeteria Management System, and some
explanation on how the logic works.

4.1 Three Tier Architecture


Cafeteria Management System is developed by adapting three tier object-oriented
programming method. Three Tier Architecture is separated to three sections which are
graphic user interface class, problem domain class and data access class. Each of the
sections has different function and role
4.1.1 Graphic User Interface Class
This class contains the object and code which build up the user interface. It
communicates with problem domain class to pass in and receive necessary parameter
from database. Below are the examples of code of graphic user interface class that
extract from cafeteria management system.
Private Sub btnAddMeal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles
btnAddMeal.Click
If txtMealID.Text = "" Then
ErrorProvider1.Clear()
ErrorProvider1.SetError (txtMealID, "Please enter Meal ID.")
Else
ErrorProvider1.Clear()

If Food.validate(txtMealID.Text) = "yes" Then


aPromotion = Promotion.addMeal(txtMealID.Text)
listMealID.Items.Add(aPromotion.pMealID)
listMealName.Items.Add(aPromotion.pMealName)
Else
MessageBox.Show("Invalid Meal ID", "Invalid Meal ID")
End If
End If
End Sub

Project

84

Cafeteria Management System

Project

Chapter 4: Programming

85

Cafeteria Management System

Chapter 4: Programming

4.1.2 Problem Domain Class


This class act as a middle tier between graphic user interface class and data access class
to control the functionality of the application. It playing an important role for gets and
set thevalue passing between graphic user interface class and data access class. Below
are the examples of code of problem domain class that extract from cafeteria
management system.
Public Class Promotion
Private
Private
Private
Private
Private
Private
Private
Private

promotionID As String
name As String
price As Double
descript As String
dateStart As String
dateEnd As String
RetrievePhoto As System.IO.MemoryStream
SavePhoto As String

Public Sub New()


End Sub
Public Sub New(ByVal aPromotionID As String, ByVal aName As String, ByVal aPrice As
Double,
ByVal aDescript As String, ByVal aDateStart As String, ByVal aDateEnd As
String, ByVal aRetrievePhoto As System.IO.MemoryStream, ByVal aSavePhoto As String)
pPromotionID = aPromotionID
pName = aName
pPrice = aPrice
pDescript = aDescript
pDateStart = aDateStart
pDateEnd = aDateEnd
pRetrievePhoto = aRetrievePhoto
pSavePhoto = aSavePhoto
End Sub
Public Sub New(ByVal aMealID As String, ByVal aMealName As String)
pMealID = aMealID
pMealName = aMealName
End Sub
Public Property pMealName() As String
Get
Return mealName
End Get
Set(ByVal value As String)
mealName = value
End Set
End Property

Project

86

Cafeteria Management System

Chapter 4: Programming

End Class

Project

87

Cafeteria Management System

Chapter 4: Programming

4.1.3 Data Access Class


This class will handle every operation thats regarding to database such as data retrieve
and data saving. Below are the examples of code of data access class that extract from
cafeteria management system.
Imports System.Data.SqlClient
Public Class PromotionDA
Shared Conn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\NG\Desktop\FYP Final\backup v12\Cafeteria
Management System\Cafeteria Management System\Cafeteria Management
System\Database.mdf;Integrated Security=True;User Instance=True")
Shared aPromotion As Promotion
Public Shared Sub Delete(ByVal promotionID As String)
Dim sqlDelete As String
sqlDelete = "DELETE FROM Promotion WHERE Promotion_ID = '" & promotionID & "'"
Try
Initialize()
Dim adpApp As New SqlDataAdapter()
adpApp.DeleteCommand = New SqlCommand(sqlDelete)
adpApp.DeleteCommand.Connection = Conn
adpApp.DeleteCommand.ExecuteNonQuery()
Catch e As Exception
MessageBox.Show(e.Message)
Finally
Terminate()
End Try
End Sub

Project

88

Cafeteria Management System

4.2

Chapter 4: Programming

Common Add, Edit and Delete

Add, edit and delete coding is one three of the most common code used in the system.
The code were basically the same, the only different of these code in different module is
amount of object involve, object name and sql statement. Below is the example code of
each function:

4.2.1 Add Function


Public Shared Sub AddNew(ByVal aFood As Food)
Meal_ID = aFood.Food_MealID
Name = aFood.Food_Name
Type = aFood.Food_Type
SavePhoto = aFood.Food_SavePhoto
Price = Double.Parse(aFood.Food_Price)
Descript = aFood.Food_Description
Try
Initialize()
Dim command As New SqlCommand("INSERT INTO Food VALUES ('" & Meal_ID & "', '" &
Name & "','" & Type & "', @Picture,'" & Price & "', '" & Descript & "')", Conn)
Using picture As Image = Image.FromFile(SavePhoto)
Using stream As New IO.MemoryStream
picture.Save(stream, Imaging.ImageFormat.Jpeg)
command.Parameters.Add("@Picture", SqlDbType.VarBinary).Value =
stream.GetBuffer()
End Using
End Using
command.ExecuteNonQuery()
Dim cmdSurvey As New SqlCommand("INSERT INTO Survey VALUES ('" & Meal_ID & "',
'0','0','0','0','0','0')", Conn)
cmdSurvey.ExecuteNonQuery()
MessageBox.Show("New meal menu save successfully.", "Save Successfully")
Catch ex As System.IO.FileNotFoundException
MessageBox.Show("Invalid path for image uploading.", "Error!")
Finally
Terminate()
End Try
End Sub

Project

89

Cafeteria Management System

Chapter 4: Programming

4.2.2 Edit Function


Editing and text information and image separate to two parts. For module that involve
image editing, the system will check is that any image path is passed in to data access
class, if yes, the system will replace the database image according to the image path,
else nothing will be change to the existing image.
Public Shared Sub Update(ByVal aFood As Food)
Meal_ID = aFood.Food_MealID
Name = aFood.Food_Name
Type = aFood.Food_Type
SavePhoto = aFood.Food_SavePhoto
Price = aFood.Food_Price
Descript = aFood.Food_Description
Dim sqlUpdate As String = "Update Food SET name ='" & Name & "',type='" & Type &
"' ,price ='" & Price & "' ,description ='" & Descript & "' WHERE Meal_ID = '" & Meal_ID
& "'"
Initialize()
Dim adpFoodup As New SqlDataAdapter()
adpFoodup.InsertCommand = New SqlCommand(sqlUpdate)
adpFoodup.InsertCommand.Connection = Conn
adpFoodup.InsertCommand.ExecuteNonQuery()
MessageBox.Show("Update Successfully!")
Terminate()
If SavePhoto <> "" Then
Try
Dim command As New SqlCommand("UPDATE Food SET photo = @Picture WHERE
Meal_ID = '" & Meal_ID & "'", Conn)
Using picture As Image = Image.FromFile(SavePhoto)
Using stream As New IO.MemoryStream
picture.Save(stream, Imaging.ImageFormat.Jpeg)
command.Parameters.Add("@Picture", SqlDbType.VarBinary).Value =
stream.GetBuffer()
End Using
End Using
Initialize()
command.ExecuteNonQuery()

Catch ex As System.IO.FileNotFoundException
MessageBox.Show("Invalid path for image uploading.", "Error!")
Catch e As Exception

Project

90

Cafeteria Management System

Chapter 4: Programming

MessageBox.Show("No Image is selected for upload.", "Error!")


Finally
Terminate()
End Try
End If
End Sub

Project

91

Cafeteria Management System

Chapter 4: Programming

4.2.3 Delete Function


Public Shared Sub Delete(ByVal MealID As String)
Dim sqlDelete As String
sqlDelete = "DELETE FROM Food WHERE Meal_ID = '" & MealID & "'"
Try
Initialize()
Dim adpApp As New SqlDataAdapter()
adpApp.DeleteCommand = New SqlCommand(sqlDelete)
adpApp.DeleteCommand.Connection = Conn
adpApp.DeleteCommand.ExecuteNonQuery()
Catch e As Exception
MessageBox.Show(e.Message)
Finally
Terminate()
End Try
End Sub

Project

92

Cafeteria Management System

4.3

Chapter 4: Programming

Auto ID Generation

Below is the code use for auto ID generation. This code will get the last ID in the
particular database, grab the ID number and generate the next ID. If no ID is existed, it
will proceed to generate the 1st ID (number) which is 0001.
Public Shared Function GenerateID() As String
Initialize()
Dim AutoID As String
Dim sequence As Integer
Dim cmd As New SqlCommand("Select Top 1 Meal_ID from Food Order By Meal_ID DESC",
Conn)
Dim adpFood As New SqlDataAdapter(cmd)
Dim dsFood As New DataSet("Food")
Try
adpFood.Fill(dsFood, "Food")
AutoID = dsFood.Tables("Food").Rows(0).Item(0).ToString.Substring(2).Trim
sequence = Convert.ToInt32(AutoID)
sequence = sequence + 1
If sequence.ToString.Length = 1 Then
CurrentID = "ML000" & sequence
ElseIf sequence.ToString.Length = 2 Then
CurrentID = "ML00" & sequence
ElseIf sequence.ToString.Length = 3 Then
CurrentID = "ML0" & sequence
End If
Catch ex As Exception
CurrentID = "ML0001"
Finally
Terminate()
End Try
Return CurrentID
End Function

Project

93

Cafeteria Management System

4.4

Chapter 4: Programming

Upload Image to database

In graphic user interface class, a button will be inserting with browsing code, and the
code with OFD component and paste in a label. With the path available, the data access
code able to covert the image into bit file and store into database. Below is the code used
for image uploading in offline application which is vb.net language.
Graphic User Interface Class
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnBrowse.Click
OFDmenu.Title = "Get Image"
OFDmenu.Filter = "Bitmap Files|*.bmp|Gif Files|*.gif|JPEG Files|*.jpg"
OFDmenu.DefaultExt = "bmp"
OFDmenu.FilterIndex = 1
OFDmenu.FileName = ""
OFDmenu.ShowDialog()
End Sub
Private Sub OFDmenu_FileOk(ByVal sender As System.Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles OFDmenu.FileOk
txtImageFile.Text = OFDmenu.FileName
End Sub

Data Access Class


Public Shared Sub AddNew(ByVal aFood As Food)
Meal_ID = aFood.Food_MealID
Name = aFood.Food_Name
Type = aFood.Food_Type
SavePhoto = aFood.Food_SavePhoto
Price = Double.Parse(aFood.Food_Price)
Descript = aFood.Food_Description
Try
Initialize()
Dim command As New SqlCommand("INSERT INTO Food VALUES ('" & Meal_ID & "', '"
& Name & "','" & Type & "', @Picture,'" & Price & "', '" & Descript & "')", Conn)
Using picture As Image = Image.FromFile(SavePhoto)
Using stream As New IO.MemoryStream
picture.Save(stream, Imaging.ImageFormat.Jpeg)
command.Parameters.Add("@Picture", SqlDbType.VarBinary).Value =
stream.GetBuffer()
End Using

Project

94

Cafeteria Management System

Chapter 4: Programming

End Using
command.ExecuteNonQuery()
End Sub

Project

95

Cafeteria Management System

4.5

Chapter 4: Programming

Display Image from database (Offline Application)

For some module that involved image in information, image displaying is needed. Below
is the code for abstract image from sql database and display it with picture box
component.
Graphic User Interface Class
Dim ImageFromDB As New Bitmap(aFood.Food_RetrievePhoto)
MenuPictureBox.Image = ImageFromDB
txtPrice.Text = aFood.Food_Price
txtDescription.Text = aFood.Food_Description

Data Access Class


If dsFood.Tables("Food").Rows.Count > 0 Then
Dim foodRow As DataRow
foodRow = dsFood.Tables("Food").Rows(0)
Dim newMstream As New System.IO.MemoryStream(CType(foodRow.Item("photo"), Byte()))
UploadPhoto = newMstream
SavePhoto = Nothing
aFood = New Food(Meal_ID, Name, Type, UploadPhoto, Price, Descript, SavePhoto)
End If

Project

96

Cafeteria Management System

4.6

Chapter 4: Programming

Display Image from database (Web Page)

To display image in c#, ahsx page is needed to play as a role to store temporary image,
because c# only allow image to be show by using image path. Below is the code needed
to retrieve image from sql database into ashx page. And this ashx filed name as
ShowCommon.ashx
<%@ WebHandler Language="C#" Class="ShowImage" %>
using
using
using
using
using
using

System;
System.Configuration;
System.Web;
System.IO;
System.Data;
System.Data.SqlClient;

public class ShowImage : IHttpHandler {


public void ProcessRequest(HttpContext context)
{
string empno;
//if (context.Request.QueryString["id"] != null)
//
empno = Convert.ToInt32(context.Request.QueryString["id"]);
//else
//
throw new ArgumentException("No parameter specified");
empno = context.Request.QueryString["name"];
context.Response.ContentType = "image/jpeg";
Stream strm = ShowEmpImage(empno);
byte[] buffer = new byte[4096];
int byteSeq = strm.Read(buffer, 0, 4096);
while (byteSeq > 0)
{
context.Response.OutputStream.Write(buffer, 0, byteSeq);
byteSeq = strm.Read(buffer, 0, 4096);
}
//context.Response.BinaryWrite(buffer);
}
public Stream ShowEmpImage(string name)
{
string conn = ConfigurationManager.ConnectionStrings["FYPconn"].ConnectionString;
SqlConnection connection = new SqlConnection(conn);
string sql = "Select photo From Food Where name=@name";
SqlCommand cmd = new SqlCommand(sql, connection);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@name", name);
connection.Open();
object img = cmd.ExecuteScalar();

Project

97

Cafeteria Management System

Chapter 4: Programming

try
{
return new MemoryStream((byte[])img);
}
catch
{
return null;
}
finally
{
connection.Close();
}
}
public bool IsReusable
{
get
{
return false;
}
}

After ashx retrieve the image, below is the code needed to display the image in coding
phase.
ImageCommon.ImageUrl = "~/ashxCode/ShowCommon.ashx?name=" + dtrMenu["name"].ToString();

Project

98

Cafeteria Management System

4.7

Chapter 4: Programming

Ajax Techniques Adapting

Few Ajax techniques are used in the member registration at web page.
Below is the code for auto comment on password strength.
<asp:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="txtPass"
DisplayPosition="RightSide"
StrengthIndicatorType="Text"
PreferredPasswordLength="10"
PrefixText="Strength:"
TextCssClass="TextIndicator_TextBox1"
MinimumNumericCharacters="0"
MinimumSymbolCharacters="0"
RequiresUpperAndLowerCaseCharacters="false"
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
TextStrengthDescriptionStyles="cssClass1;cssClass2;cssClass3;cssClass4;cssClass5
CalculationWeightings="50;15;15;20"
>
</asp:PasswordStrength>

Below is the code for auto validation.


*Common ASP validator needs to be set and bound to the field before using this Ajax
code.
<asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" TargetControlID="txtPass"
WatermarkText="enter password here" runat="server">
</asp:TextBoxWatermarkExtender>

Project

99

Cafeteria Management System

4.8

Chapter 4: Programming

Programming Tools

Visual Studio 2010 is used on the development of Cafeteria Management System. .Net
language is the main programming language that will be used in Visual Studio, there
for I chosen this tools for my program development due to .Net language is the major
language I learned in college and also was the language that I most experience with.

4.8.1 Strength of Programming Tools used


Based on my experience, Visual Studio is a very convenience developing software
compare to the other developing software such as Net Bean. Visual Studio had many
features that ease developer in programming such as automate data adapter creation,
auto coding for some components, and auto matching the code wanted to enter. And
visual studio able to support object-oriented programming which make the
programming work become easier.

4.8.2 Weakness of Programming Tools used


When work becoming convenience, developer becoming started to depending on the
tools, and caused developer unable to adapt themselves when using force to using older
version/other programming tools. And based on my experience, web interface
designing by using visual studio is inconvenience, due to the inflexible of alignment
control.

4.8.3 Problem Faced


Overall not much problem is encounter when using .Net language on developing. The
only major problem is occurring when we had error in the database path when using
object-oriented programming. Because the error message point to Problem Domain
Class instead of Data Access Class which lead us to trouble shoot on the wrong area.
And finally the problem is solved after few days of debugging while asking opinion
from senior and classmate.

Project

100

Cafeteria Management System

Chapter 4: Programming

Chapter 5
Software Testing

Project

101

Cafeteria Management System

Chapter 5: Software Testing

5.0 Software Testing


Software testing is the process to evaluate a system whether it reach the expectation
and fulfill the user requirement, and make sure the system is free from any error
before releasing the system to market. Therefore software testing before releasing is
important and necessary in order to provide a high quality and reliable system to
customer.

5.1

Type of Testing

5.1.1

Unit Testing

The idea of unit testing is test the system module by module, which means the
developer will only proceeds to develop the other module when a module is complete,
and ensured its free from any error and bug, only proceed to develop the other module.
5.1.2

Integrating Testing

Integrating Testing is the stage where individual modules is combined and test in
group. Which mean the module thats developed individually are combined and test to
make sure a module wont conflict with the other module and able communicate with
each other. This phase is occurs after unit testing and system testing.
5.1.3

System Testing

System testing is the testing of the entire system, which means all modules, to make the
system is free from any error and bug before releasing to user/customer. In this stage,
the developer should make sure the system is system was fulfilling the user requirement
and able run smoothly without any problem.
5.1.4

User Acceptance Testing

User Acceptance testing is the testing stage where the system will be demo to the user
and receive feedback from them, to make sure the system is meet the user requirement
and expectation. Any feedback from user in this stage will be accept and make
modification to the system according to user response.

Project

102

Cafeteria Management System

5.2

Chapter 5: Software Testing

Meal Module

Search
In order to search a menu, ID need to be enter and search. If the no ID is enter when
searching, message as show in the image below will display.

Figure 5.1 Empty Field Validations for Meal Searching


If the entered searching ID is invalid, message as show in the image below will
display

Figure 5.2 Valid Record Searching Validation

Field Validation for Add New and Edit


For field validation, proper message with notification will be show beside the field
with validation error as show in the image below.

Project

103

Cafeteria Management System

Chapter 5: Software Testing

Figure 5.3 Field Validations for Meal Menu Maintenance


Field validations involved are including:
No

Test Action

Message in error provider

Image left as blank

No Image is Uploaded.

Name field left as blank

Please enter name.

Price field left as blank

Please enter the price.

Price field key in with 0

Price can't be 0.

Description field left as Please enter description.


blank

Price field key in with none- Price must be numeric number.


numeric info

Project

104

Cafeteria Management System

Chapter 5: Software Testing

Promotion Module

5.3

Promotion Module

Search
In order to search a promotion, ID need to be enter and search. If the no ID is enter
when searching, message as show in the image below will display.

Figure 5.4 Empty Field Validations for promotion Searching


If the entered searching ID is invalid, message as show in the image below will
display

Figure 5.5 Valid Record Searching Validation

Project

105

Cafeteria Management System

Chapter 5: Software Testing

Field Validation for Add New and Edit


For field validation, proper message with notification will be show beside the field
with validation error as show in the image below.

Figure 5.6 Field Validations for Meal Menu Maintenance


Field validations involved are including:
No

Test Action

Message in error provider

Image left as blank

No Image is Uploaded.

Name field left as blank

Please enter name.

Price field left as blank

Please enter the price.

Price field key in with 0

Price can't be 0.

Description field left as Please enter description.


blank

Price field key in with none- Only numeric are allow.


numeric info.

Select date thats lesser then Selected Date can't be lesser then today date.
today date for promotion
starting date.

Select date thats lesser then Selected Date can't be lesser then today date.
today date for promotion
ending date.

Select

same

promotion

date

starting

for Both promotion dates can't be same.


and

ending date.
10

Project

If no meal menu is selected.

Meal offer menu is empty.

106

Cafeteria Management System

Chapter 5: Software Testing

In promotion form, thats a box at right side for select item for promotion purpose.
And thats validation for meal adding for promotion in that box as well.
If the meal ID field is empty when adding item to promotion, message notification as
shown in the picture below will prompt up.

Figure 5.7 Empty Field Validations for promotion Searching


If the meal added is invalid, message box as shown below will prompt up.

Figure 5.8 Valid Record Searching Validation

Project

107

Cafeteria Management System

5.4

Chapter 5: Software Testing

Order Module

Offline Application
In order form, cafeteria need to key in the customer user in the order form. And thats
some validation in order form, and proper message with notification will be show
beside the field with validation error as show in the image below.

Figure 5.9 Field Validation for entering in order form


Field validations involved are including:
No

Test Action

Message in error provider

Menu ID field left as blank

Please enter Meal ID.

Quantity field left as empty

Please enter Meal quantity.

Quantity field key in with 0

Quantity filed must not be lesser then 0

Quantity field key in with Quantity filed must not be numeric input
none-numeric sentence

If the ID entered is invalid, message box as shown in the image below will prompt up.

Figure 5.10 Valid Record Searching Validation

Project

108

Cafeteria Management System

Chapter 5: Software Testing

In order form, thats an order menu box in left bottom record all the meal thats
already order. And staff would able to edit or remove the order in the menu box.
Therefore thats validation for the particular order menu box as well.
If the order menu box list is empty and user click edit, message box as shown below
prompt up.

Figure 5.11 Validations for Item editing in Order Form

If the order menu box list is empty and user click remove, message box as shown
below will prompt up.

Figure 5.12 Validations for Item removing in Order Form

In edit mode, if user enters none numeric for meal quantity, message box as shown
below will prompt up.

Figure 5.13 Format Validations for Item editing in Order Form

Project

109

Cafeteria Management System

Chapter 5: Software Testing

In edit mode, if user left the quantity field empty, message box as shown below will
prompt up.

Figure 5.14 Field Validations for Item editing in Order Form

In Web Page
When customer wanted to order meal via web page, they need to go the meal menu
page, and select wanted meal and add into cart list. When user adding the meal into
cart list, they need to enter the quantity as well. Below show the validation of the
quantity field and
No

Test Action

Message prompt

Quantity field left as blank

Please insert quantity.

Quantity field is key in with Only Numeric is allow


none numeric word

When the user click remove while the cart list is empty, message box as shown below
will prompt up.

Figure 5.14 Cart List Validations

Project

110

Cafeteria Management System

5.5

Chapter 5: Software Testing

Reservation Module

Offline Application
For field validation, proper message with notification will be show beside the field with
validation error as show in the image below.

Figure 5.15 Field Validations in Reservation Form

Field validations involved are including:


No

Test Action

Message in error provider

Member ID field left as blank Please enter member ID.

Date chosen lesser then today Booking Date can't be lesser then today date.
date

No seats number is enter "Please enter seats needed.


while selecting larger party

Seats number enter is not Seats only allowed between 11 to 100


between 11 to 100 while
selecting larger party

None numeric is key into Only Numeric is allow to enter


seats field while selecting
larger party

Project

111

Cafeteria Management System

Chapter 5: Software Testing

While user key in invalid member ID, message box as shown below will prompt up.

Figure 5.16 Member ID Validation Message


When the selected booking time and date had reach the maximum limit (5times),
message box as shown below will prompt up.

Figure 5.17 Message for Maximum limit on Reservation

Web Page
Customer are allowed to make their reservation online as well, thats few validation on
the internet reservation as show in table below.
No

Test Action

Message show

Booking selected is lesser Booking date can't be lesser then today date.
then today date.

Seats field left as blank

Same

Please enter seats needed.

date and

time of Booking on selected time and date had reached


the maximum limit.
booking had made more than
5 times.

Project

112

Cafeteria Management System

5.6

Chapter 5: Software Testing

Report Module

When user selected report type as reservation report, they need to select the reservation
duration for the report which is starting time and ending time. If the selected ending time
is lesser then starting time, message as below will prompt up,

Figure 5.17 Report Module Error Message

5.7

Seat Admission Module

In this module, table can keep track the table is occupied by which member, therefore
member ID are allowed to enter to keep track the table, as optional.
If the member ID entered is invalid, message box as shown below will prompt up.

Figure 5.18 Field Validations for Item editing in Order Form

If the user trying to insert member ID with the member ID field left with blank,
message box as shown below will prompt up.

Project

113

Cafeteria Management System

Chapter 5: Software Testing

Figure 5.19 Field Validations for Item editing in Order Form

Project

114

Cafeteria Management System

References

Chapter 6
Conclusion

Project

115

Cafeteria Management System

References

6.0 Conclusion
This chapter is an overall conclusion for Cafeteria Management System, by conclude
from it strength and weakness, and also discuss about further improvement that could
enhance to the system.

6.1

Link Project to Seminar

My title of my seminar is Ajax, which is an internet technology that able update a


webpage asynchronously. In Cafeteria Management System, Ajax technology is used
in member registration on web page. An auto field validation had been developed by
using Ajax technology, which mean the system will auto validate the require field
without the need of reloading of web page. And function to rate on user entered
password on registration is developed with Ajax too, which will help user to decide
password to user, by telling the password strength directly while user key in.

6.2

Project Achievement

By Overall, the project achieves all the system requirement and objective, all the
module is run as well as in expectation. But thats a flaw in designing where the
report design for order report doesnt meet supervisor requirement, where the report
information should include the order information such as meal price, meal name and
etc. The information failed to carry due to the failure from displaying information
from 4 different database tables.

6.3

Project Management Issues

The difficulty on this system developing is programming some function that never
being done before, such as uploading image by using vb.net. When come to coding a
function that never done before, lot of effort and time need to be investing on the
researching. Some other difficult part is figuring the code logic on how to achieve the
function wanted, such as transmitting of huge information from Database Access
Class to Problem Domain Class. And the other issues occurring are combining
module with the other teammate, which may cause system conflict due asynchronous
of information code.

Project

116

Cafeteria Management System

6.4

References

Evaluate Project Strengths and Weaknesses

6.4.1 Strengths

Error Reduction
By changing from the old processing method, which is record everything manually
by pen and paper, to automate management system, it could reduce the error might
happened by using manual recording. Human get tired and confuse when working
for a wrong period and will cause error, but a system wouldnt useless bug happen
or human mistake when key in information.

Easy Maintenance
When every record is keep by using paper work, mean it require a lot space to store
the record. And it would take long time retrieve information from bunch of paper
work, and its time and man power consuming on maintenance. But automate
management system could finish all the maintenance easily.

Efficiency Improvement
Efficiency of cafeteria could be improve, which mean improve in term of services as
well, by using simple and fast response computer to replace human work.

Security
Only authorized user are able to login into the system, therefore could protect all the
information from disclose. Its more secure compare to paper work recording, people
are able to read information in paper recording as long as able to contact physically
with the record, but system need authorization account.

Convenience
With the existing of web site, users are able to view all the meal offered by the cafeteria,
and also able to make reservation via internet. And the seat admission module help
cafeteria to keep track on every table status in the shop, it ease the staff to assign table
to customer to rush hour.

Project

117

Cafeteria Management System

References

6.4.2 Weakness

Web Page Interface

The design of web page interface is not so satisfied. Some of the page alignment is over
border which is not necessary.

Starting Speed on Table Admission Form

This form takes more time to start up compare to other form, approximate 2-3 second to
start up because it load more information on starting compare to the other form.

6.5

Suggestion for future improvement

Advance Ajax techniques could be enhanced into the webpage, to improve the
efficiency of the web page. For example, while user viewing promotion and meal
menu at the webpage, it could use Ajax technology to load the selected item image
and information, while the current design is using traditional web method. And the
user interface on webpage could be further improved as well.

6.6

Personal Reflection

I learn a lot upon completing this final year project. Its the 1st assignment that I need
to start from project specification, designing until documentation, which all the
previous are not necessary. It somehow giving me an image on how software is
develops from beginning to the end in the real market. And by debugging some bug
that I had never encountered before is also increasing my programming experience
and self value on programming market.

And by completing this project, I had learned some programming knowledge that
could not obtain from school, such as Image uploading, the use of Ajax technology
and so on. And while facing problem, I had obtain some help from senior which
working in the real programming market. They had provided me some valuable
opinion, and although some of the conversation is not related or help the project, but
their conversation had help me to explore more on IT field by understanding what a
language or technique could really do. For example from their conversation, I
understand that advanced SQL statement could actually execute some function that
need to be complete by using programming language in my level.

Project

118

Cafeteria Management System

References

References
ASP.NET AJAX Control Toolkit Tutorial and demo. 2009: Available on
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/

C# Crystal Reports from SQL Query. 2010: Available on http://csharp.netinformations.com/crystal-reports/csharp-crystal-reports-sql-query.htm

Code Project. 1999-2011: Available on http://www.codeproject.com/

Project

119

Cafeteria Management System

User Guide

Appendices
Interview Questions
The following is the list of interview questions will be asking to the interviewee:
1.

What is the nature of work for you?

2.

What is the nature of business of As U Like Cafe?

3.

Does the company have any Management System?

4.

What do you think about the services that provided by using current system?
Is it still satisfying the requirement of As U Like Cafs services nowadays?

5.

Does the company facing any problem by using current system? What the
problem facing by using the current system.

6.

Do you think that should develop a new system to overcome the problem that
cause by the current system?

7.

What are the functions or services needs for the new system?

8.

After implement the Cafeteria Management System, do you think that it will
increase efficiency for daily activities?

Project

120

Cafeteria Management System

User Guide

User Guide
Installation

Step1. Double click on the setup application icon.

Step2. Confirmation box for installation will prompt up, for this step, click install.

Project

121

Cafeteria Management System

User Guide

Step3. After confirmation, installation process will run.

Step4. After completion of the installation, Cafeteria Management System will be


available at Window Start List.

Default Login ID: ST0001


Default Login Password: ST0001

Project

122

Cafeteria Management System

User Guide

Table Admission Form


1. Table

2. Occupy
Button

3. Order
Button

4. Bill
Button

5. Validate
Button

6. Open
Reservation
Monitor

7. Exit
Button

1. Green color stand for available, and Red color stand for occupied. Seats for each table
are stated on the table.
2. Only enable for available table. Turn the table available status to occupied status.
3. Only enable for occupied table. Redirect to order form for meal ordering for selected
table.
4. Only enable for occupied table. Redirect to payment form for payment process for
selected table.
5. Validate member ID and bound to the selected table.
6. Open reservation monitor table that will display reservation thats up coming in the
next 30minutes. Reservation list will be updated for every 10minutes.
7. Exit from current form.

Project

123

Cafeteria Management System

User Guide

Reservation Form (Offline Applicatrion)

1. Reservation ID Field
2. Reserve Seat Field
3. Manual Enter Reserve Seat
4. Reserve Date Field
5. Reserve Time Field
6. Reserve Member Field

7. Reserve
Button

8. Exit
Button

1. Current reservation ID, will be generate automatically.


2. Reservation seats, available from 1-10 seats.
3. This field will be available for enter when user select Larger Party on Number of
Seats (Party Numbers) field.
4. Selection date for reservation.
5. Selection time for reservation.
6. ID of member that making the reservation.
7. Confirm reservation.
8. Exit from current form.

Project

124

Cafeteria Management System

User Guide

Resevation Page (Web Page)

1. Seat Selection

2. Date Selection

3. Time Selection
4. Reserve Button

5. Reservation List

6. Edit Button
1. Selection for seats for reservation.
2. Selection for date for reservation.
3. Time selection for reservation.
4. Button for reservation confirmation.
5. List of reserved reservation.
6. Edit for the selected reservation.

Project

125

Cafeteria Management System

User Guide

Order Form (Offline Applicatrion)

1. Order ID Field
2. Date Field
3. Reserved Button
4. Table Field
5. Member Field

6. Menu ID Field
7. Quantity Field

9. Meal ID List

8. Add Order Button

10. Meal Name List


11. Quantity List

13. Remove
12. Edit Button

15. Exit Button


14. Confirm Button

1. Order ID for current Order. Will be auto generate.


2. Field for displaying today date.
3. For enter reserved order purpose. After clicking this button, Order ID field will be
enabled for enter the reserved ID.
4. Table assign for current order.
5. Field for display member who occupied the current table.
6. To enter the meal ordered by customer for current order.
7. To enter quantity order for entered meal in Field 6.
8. Add the entered meal and quantity into order menu list.
9.

The list of meal menu ID ordered for current order.

10. The list of meal name ordered for current order.

Project

126

Cafeteria Management System

User Guide

11. The list of quantity ordered for current order.


12. Button for edit the selected meal order in the meal menu list.
13. Button for remove the selected meal order in the meal menu list.
14. Exit from the current form.

Meal Menu (Web Page)

3. Menu List

1. Menu Type
2. Category

7. Name List

6. Quantity Field

8. Quantity List

4. Add to Cart Button

9. Total List
5. Menu Information

10. Remove
11. Proceed Button
12. Subtotal Field
1. Selection for menu type for viewing.
2. Selection for menu category. (only for common menu)
3. Meal list of selected menu type.

Project

127

Cafeteria Management System

User Guide

4. Add the selected meal into cart list.


5. Display the information of selected meal.
6. For enter the preferable quantity to order for selected meal.
7. The name list of meal that added into cart list.
8. The quantity list of each meal that added into cart list.
9. The total cost of each meal that added into cart list.
10. To remove the select meal from cart list.
11. To proceed to order page.
12. The subtotal of select selected meal in cart list.

Order Page (Web Page)


1. Reservation ID

2. Reservation Information

3. CVC Field
7. Name List

4. Card ID Field

8. Edit Button

5. Password Field

9. Edit Button
6. Edit Button

11. Proceed Button

10. Subtotal Field

1. Select reservation to bind the current order to.


2. The information of selected reservation.
3. Field for enter CVC code for order deposit purpose.

Project

128

Cafeteria Management System

User Guide

4. Field for enter credit/debit card ID for order deposit purpose.


5. Field for enter the credit/debit card password for order deposit purpose.
6. Field for enter the card holder name for order deposit purpose.
7. The name list of meal ordered.
8. The quantity list of meal ordered.
9. The total cost list for each meal ordered.
10. To confirm the ordered.
11. Field for display the current order subtotal.

Project

129

Cafeteria Management System

User Guide

Meal Menu Maintenance

1. Search Field
2. Search Button

3. Browse Button
4. Image Path
5. Menu ID Field
6. Name Field
7. Type Field

8. Price Field
9. Add New Button
10. Edit Button
11. Delete Button
12. Exit Button

13. Description Field


1. Field for Menu ID key in for searching.
2. Search for entered menu.
3. Will be enabling when add new or edit meal menu. For image browsing purpose.
4. The path of image browsed will be display here.
5. Will show the menu ID of current record. Will auto generate new ID when adding
new menu.
6. Will show the name of current record. Will enable when add new or edit meal menu.

Project

130

Cafeteria Management System

User Guide

7. Will show the food type of current record. Will enable when add new or edit meal
menu.
8. Will show the price of current record. Will enable when add new or edit meal menu.
9. For adding new meal menu, required field for add new meal menu will enable when
clicked.
10. For editing current meal menu record, required field for add edit meal menu will
enable when clicked.
11. For delete the current meal menu record.
12. Exit from the current form.
13. Will show the description of current record. Will enable when add new or edit meal
menu.

Project

131

Cafeteria Management System

User Guide

Promotion Maintenance

1. Search Field
2. Button Search

8. Browse Button
3. Meal ID offer
4. Meal Name
offer

5. Menu ID Field
9. Image Path

6. Add Button

10. ID Field

7. Remove
Button

11. Name Field


12. Price Field
13. Start Date Field
17. Edit Button

14. End Date Field


15. Description Field
1.

16. Add New Button

Field for Promotion ID key in for searching.

2. Search for entered promotion.


3. The list of meal menu ID offer in the promotion.
4. The list of meal menu name offer in the promotion.

Project

132

19. Exit Button


18. Delete Button

Cafeteria Management System

User Guide

5. Field for enter the meal menu ID to list as item in the promotion.
6. Add the entered meal menu ID in field 5 into promotion list.
7. Remove the selected meal menu in meal offer list.
8. Will be enabling when add new or edit promotion. For image browsing purpose.
9. The path of image browsed will be display here.
10. Will show the promotion ID of current record. Will auto generate new ID when
adding new promotion.
11. Will show the name of current record. Will enable when add new or edit promotion
12. Will show the price of current record. Will enable when add new or edit promotion.
13. Will show the promotion starting date of current record. Will enable when add new or
edit promotion
14. Will show the promotion ending date of current record. Will enable when add new or
edit promotion
15. Will show the description of current record. Will enable when add new or edit
promotion.
16. For adding new promotion, required field for add new meal menu will enable when
clicked.
17. For editing current promotion record, required field for add edit meal menu will
enable when clicked.
18. For delete the current promotion record.
19. Exit from the current form.

Project

133

Cafeteria Management System

User Guide

Report

1. Report Type
Field

2. Dynamic Date
5. Reservation Time
3. Monthly

4. Yearly

6. View Button

7. Exit Button

1. Field for selecting type of report for generation.


2. Dynamically select the duration for report generation.
3. For select particular month of particular year for report generation.
4. For select particular year for report generation.
5. To select the reserve time duration for reservation report generation.

Project

134

Cafeteria Management System

User Guide

The End

Project

135

Вам также может понравиться