Top Banner
C C a a f f e e t t e e r r i i a a M M a a n n a a g g e e m m e e n n t t S S y y s s t t e e m m By Ng Song Hui SCHOOL OF ARTS AND SCIENCE TUNKU ABDUL RAHMAN COLLEGE KUALA LUMPUR ACADEMIC YEAR 2010/2011
143

Cateria Management System

Feb 06, 2016

Download

Documents

vista_cryto7630

Thank for you information
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cateria Management System

CCaaffeetteerriiaa MMaannaaggeemmeenntt SSyysstteemm

By

Ng Song Hui

SCHOOL OF ARTS AND SCIENCE TUNKU ABDUL RAHMAN COLLEGE

KUALA LUMPUR

ACADEMIC YEAR 2010/2011

Page 2: Cateria Management System

Cafeteria Management System

Project ii

CCaaffeetteerriiaa MMaannaaggeemmeenntt SSyysstteemm

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.

Page 3: Cateria Management System

Cafeteria Management System Declaration

Project iii

DDeeccllaarraattiioonn 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.

__________________________

Student’s Name :

Programme :

Page 4: Cateria Management System

Cafeteria Management System Acknowledgement

Project vi

AAbbssttrraacctt 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.

Page 5: Cateria Management System

Cafeteria Management System Acknowledgement

Project vii

AAcckknnoowwlleeddggeemmeenntt

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 I’m 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.

Page 6: Cateria Management System

Cafeteria Management System

Project vii

Contents

Cafeteria Management System ............................................................................................... ii 

Declaration.............................................................................................................................. iii 

Abstract .................................................................................................................................... vi 

Acknowledgement .................................................................................................................. vii 

1.0 System Planning ................................................................................................................. 1 

1.1  Project Aims and Objectives ................................................................................................. 1 1.2  Company Background .......................................................................................................... 2 1.3  Project Scope ........................................................................................................................ 3 1.4  Project Schedule ................................................................................................................... 6 1.5  Outline of approach/Methodology Used ............................................................................... 8 

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

2.1  Fact Gathering..................................................................................................................... 10 2.1.1  Background Reading ....................................................................................................................... 11 2.1.2  Interview .......................................................................................................................................... 11 2.2  Non-Functional Requirements ............................................................................................ 12 2.3  Functional Requirements .................................................................................................... 13 2.4  Overview Use Case Diagram .............................................................................................. 15 2.5  Detail Use Case Diagram (My Module) ............................................................................. 16 2.6  Use Case Specification ....................................................................................................... 19 2.7  Activity Diagrams ............................................................................................................... 36 

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

3.1  Class Diagram ..................................................................................................................... 49 3.2  Database Structure .............................................................................................................. 50 3.3  Sequence Diagram .............................................................................................................. 57 3.4  User Interface ...................................................................................................................... 69 3.5  Report Design ..................................................................................................................... 78 

4.0 Programming.................................................................................................................... 84 

4.1  Three Tier Architecture ...................................................................................................... 84 4.1.1  Graphic User Interface Class ........................................................................................................... 84 4.1.2  Problem Domain Class .................................................................................................................... 86 4.1.3  Data Access Class ............................................................................................................................ 88 4.2  Common Add, Edit and Delete ........................................................................................... 89 4.2.1  Add Function ................................................................................................................................... 89 4.2.2  Edit Function .................................................................................................................................... 90 4.2.3  Delete Function ................................................................................................................................ 92 4.3  Auto ID Generation ............................................................................................................ 93 4.4  Upload Image to database ................................................................................................... 94 4.5  Display Image from database (Offline Application) ........................................................... 96 4.6  Display Image from database (Web Page) .......................................................................... 97 4.7  Ajax Techniques Adapting ................................................................................................. 99 4.8  Programming Tools .......................................................................................................... 100 4.8.1  Strength of Programming Tools used ............................................................................................ 100 4.8.2  Weakness of Programming Tools used ......................................................................................... 100 4.8.3  Problem Faced ............................................................................................................................... 100 

Page 7: Cateria Management System

Cafeteria Management System

Project viii

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

5.1  Type of Testing ................................................................................................................. 102 5.1.1  Unit Testing ................................................................................................................................... 102 5.1.2  Integrating Testing ......................................................................................................................... 102 5.1.3  System Testing ............................................................................................................................... 102 5.1.4  User Acceptance Testing ............................................................................................................... 102 5.2  Meal Module ..................................................................................................................... 103 5.3  Promotion Module ............................................................................................................ 105 5.4  Order Module .................................................................................................................... 108 5.5  Reservation Module .......................................................................................................... 111 5.6  Report Module .................................................................................................................. 113 5.7  Seat Admission Module .................................................................................................... 113 

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

6.1  Link Project to Seminar .................................................................................................... 116 6.2  Project Achievement ......................................................................................................... 116 6.3  Project Management Issues .............................................................................................. 116 6.4  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 

Page 8: Cateria Management System

Cafeteria Management System

Project ix

Chapter 1

System Planning

Page 9: Cateria Management System

Cafeteria Management System

Project 1

11..00 SSyysstteemm PPllaannnniinngg

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.

Page 10: Cateria Management System

Cafeteria Management System

Project 2

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 teenager’s habit to suit local taste.

Page 11: Cateria Management System

Cafeteria Management System

Project 3

1.3 Project Scope

Figure 1.1 Project Structrue Chart and Module Distrubution

Page 12: Cateria Management System

Cafeteria Management System

Project 4

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.

Page 13: Cateria Management System

Cafeteria Management System

Project 5

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 didn’t 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.

Page 14: Cateria Management System

Cafeteria Management System

Project 6

1.4 Project Schedule

Figure 1.2 Project Schedule

Figure 1.3 Project Schedule

Page 15: Cateria Management System

Cafeteria Management System

Project 7

Figure 1.4 Project Schedule

Page 16: Cateria Management System

Cafeteria Management System

Project 8

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.

Page 17: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 9

Chapter 2

Requirements Analysis

Page 18: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 10

22..00 RReeqquuiirreemmeennttss AAnnaallyyssiiss

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 that’s 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.

Page 19: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 11

2.1.1 Background Reading

It’s 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 that’s 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:

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

Page 20: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 12

2.2 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

That’s no system error so far from system testing, therefore the system is reliable. All

information modified or uploaded by user didn’t 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

Order is only allowed upon the completion of reservation.

Only member is allowed to make reservation.

Page 21: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 13

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.

Page 22: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 14

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

haven’t 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.

Page 23: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 15

2.4 Overview Use Case Diagram

Figure 2.1 Over view use case for Cafeteria Management System

Page 24: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 16

2.5 Detail Use Case Diagram (My Module)

Meal Module

Meal Module

Customer

View Meal Menu

Delete Meal Menu

Add Meal Menu

Edit Meal Menu

Staff

Manager

Figure 2.2 Use Case for Meal Module

Promotion Module

Promotion Module

Customer

View Promotion

Delete Promotion

Add Promotion

Edit Promotion

Staff

Manager

Figure 2.3 Use Case for Promotion Module

Page 25: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 17

Table Reservation Module

Table Reservation Module

Customer

Add Order Meal

Add Table Reservation

Edit Reservation

Staff

Manager

<<extends>>

View Reservation

Figure 2.4 Use Case for Reservation Module

Report Module

Generate Customer Reservation Reports

Generate Meal Order Reports

Report Module

Manager

Figure 2.5 Use Case for Report Module

Page 26: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 18

Order Module

Meal Ordering Module

Customer

View Order Meal

Add Meal Order

Edit Meal Order

Staff

Manager

Check Reservation details

<<include>>

Figure 2.6 Use Case for Order Module

Seat Admission Module

Seats Admission Module

Staff

Manager

Assign Table

Monitor Reservation

Figure 2.7 Use Case for Admission Module

Page 27: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 19

2.6 Use Case Specification

Search Meal Menu

Use Case: Meal Module Brief Description: This use case allows cafeteria’s staff to search meal menu. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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!”

Page 28: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 20

Add Meal Menu

Use Case: Meal Module Brief Description: This use case allows cafeteria’s staff to add new meal menu. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

 

Page 29: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 21

Edit Meal Menu

Use Case: Meal Module Brief Description: This use case allows cafeteria’s staff to edit meal menu. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 30: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 22

Delete Meal Menu

Use Case: Meal Module Brief Description: This use case allows cafeteria’s staff to delete meal menu. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 31: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 23

Search Promotion Menu

Use Case: Promotion Module Brief Description: This use case allows cafeteria’s staff to search promotion. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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!”

Page 32: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 24

Add Promotion

Use Case: Promotion Module Brief Description: This use case allows cafeteria’s staff to add new promotion. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 33: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 25

Edit Promotion

Use Case: Promotion Module Brief Description: This use case allows cafeteria’s staff to edit promotion. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 34: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 26

Delete Promotion

Use Case: Promotion Module Brief Description: This use case allows cafeteria’s staff to delete promotion. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 35: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 27

Add Reservation (Offline Application)

Use Case: Reservation Module Brief Description: This use case allows cafeteria’s staff to add reservation. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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.

Page 36: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 28

Add Reservation (Web Page)

Use Case: Reservation Module Brief Description: This use case allows cafeteria’s customer to add reservation. Actor: Customer Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the web page

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.

Page 37: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 29

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 System Response 1)Login to the web page

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.

Page 38: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 30

Print Report

Use Case: Report Module Brief Description: This use case allows cafeteria’s manager to print report. Actor: Manager Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the web page

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

Page 39: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 31

Search Order

Use Case: Order Module Brief Description: This use case allows cafeteria’s staff to search order. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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”

Page 40: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 32

Add Order (Offline Application)

Use Case: Order Module Brief Description: This use case allows cafeteria’s staff to add new order. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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

 

Page 41: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 33

Add Order (Web Page)

Use Case: Order Module Brief Description: This use case allows cafeteria’s staff to add new order. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the web page

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

Page 42: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 34

Edit Order

Use Case: Order Module Brief Description: This use case allows cafeteria’s staff to edit order. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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

Page 43: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 35

Assign Table

Use Case: Seats Admission Module Brief Description: This use case allows cafeteria’s staff to assign table to customer. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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 cafeteria’s staff to assign table to customer. Actor: Staff Main flows of event (Main Scenario)

Actor Action System Response 1)Login to the system

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!”

Page 44: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 36

2.7 Activity Diagrams

Add Meal Menu

SystemStaff

Select Menu Option Display Menu Option

Select Add New MenuEnable Field for New Menu Adding

Enter New Menu Details

Prompt For Confirmation

Click "Save" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Figure 2.8 Activity Diagram for Add Meal Menu

Page 45: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 37

Edit Meal Menu

SystemStaff

Select Menu Option Display Menu Option

Display Selected Menu Details

Search Menu that needed to Update

Display Seleted Menu in Editable Mode

Click "Edit" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Edit details

Click "Save" Button

Prompt For Confirmation

Figure 2.9 Activity Diagram for Edit Meal Menu

Page 46: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 38

Delete Meal Menu

Staff System

Select Menu Option Display Menu Option

Search Menu that wanted to be DeleteDisplay Seleceted Menu Details

Prompt For Confirmation

Click "Delete" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Figure 2.10 Activity Diagram for Delete Meal Menu

Page 47: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 39

Add Promotion

Staff System

Select Promotion Option Display Promotion Option

Select Add PromotionEnable Filed for New Promotion Adding

Enter Promotion Details

Prompt For Confirmation

Click "Save" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Figure 2.11 Activity Diagram for Add Promotion

Page 48: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 40

Edit Promotion

Staff System

Select Meal Menu Option Display Meal Menu Option

Search Menu that wanted to be EditDisplay Selected Promotion Detail

Display Seleted Promotion in Editable Form

Click "Edit" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Edit Selected Promotion

Click "Save" Button

Prompt For Confirmation

Figure 2.12 Activity Diagram for Edit Promotion

Page 49: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 41

Delete Promotion

SystemStaff

Select Promotion Option Display Promotion Option

Serach Promotion that wanted to be DeleteDisplay Selected Promotion Details

Prompt For Confirmation

Click "Delete" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Figure 2.13 Activity Diagram for Delete Promotion

Page 50: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 42

Add Reservation (Web Page)

Member System

Login Verify Authentication

Select Reservation Page Display Member Page

Choose Available Table & Time Display Reservation Page

Click "Reserve" Button

Update Database

[Login Successfully] 

[Login Fail] 

Select "Yes" or "No" Button

Prompt For Confirmation

[Yes] 

[No] 

Prompt For "Meal Order" Selection

Select Order Now or Order On Seat

[Order On Seat] 

[Order Now] 

Redirect Member to "Meal Order" Page

Figure 2.15 Activity Diagram for Add Reservation (Offline)

Page 51: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 43

Add Reservation (Offline)

Staff System

Select Reservation Option Display Reservation Option

Enter Reservation Details

Prompt For ConfirmationClick "Save" Button

Select "Yes" or "No" Button

[No] 

[Yes] 

Update Database

Prompt For "Meal Order" Selection

Select Order Now or Order On Seat

[Order On Seat] 

[Order Now] 

Redirect to "Meal Order" Form

Figure 2.15 Activity Diagram for Add Reservation (Offline)

Page 52: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 44

Edit Reservation (Web Page)

Staff System

Select Reservation Option Display Reservation Option

Select Reservation that needed to Edit Display All Reservation in a List

Display Seleted Reservation in Editable ModeClick "Edit" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Edit Selected Reservation

Click "Save" Button

Prompt For Confirmation

Figure 2.16 Activity Diagram for Edit Reservation (Web Page)

Page 53: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 45

Add Order (Off line Application)

Staff System

Select Order Option Display Order Option

Enter Order Details

Prompt For Confirmation

Click "Add Order" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Figure 2.17 Activity Diagram for Add Order (Offline Application)

Page 54: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 46

Add Order (Web Page)

Member System

Login Verify Authentication

Select Meal Menu Option Display Home Page

Click "Confirm"

Add Selected Item into Cart List

Click "Proceed to Order" Button

Update Database

[Login Successfully] 

[Login Fail] 

Select Reservation to bound to current Order

Redirect to Order Page

Display Meal Order Menu

Select Meal want to be Order

Click "Add to Cart List!" Button

Figure 2.18 Activity Diagram for Add Order (Web Page)

Page 55: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 47

Edit Order

Staff System

Select Order Option Display Order Option

Display Seleted Order in Editable Mode

Click "Edit" Button

Update Database

Select "Yes" or "No" Button

[No] 

[Yes] 

Update Order details

Click "Save" Button

Prompt For Confirmation

Figure 2.19 Activity Diagram for Add Order (Edit Order)

Page 56: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 48

Chapter 3

System Design

Page 57: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 49

33..00 SSyysstteemm DDeessiiggnn This chapter will show the design phase such as Database Design, User Interface Design,

Class Diagrams, and Sequence Diagram.

3.1 Class Diagram

CreditCard

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

Food

-Meal_ID(PK)-name-type-photo-price-description

Gift

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

Member

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

Order

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

OrderDetail

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

Payment

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

Promotion

-Promotion_ID(PK)-name-price-description-date_start-date_end-image

PromotionDetail

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

redemption

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

Reservation

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

Staff

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

Survey

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

Table

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

1..1 *..1

Have

1..* 1..1

Have

1..* 1..1Have

1..* 1..1

Have

1..1 1..1

Have

1..*

1..1

Have

1..*1..*

1..*

Have

Belongs

1..* 1..*

1..11..11..1

Have

Class Diagram

Figure 3.0 Class Diagram for Cafeteria Management System

Page 58: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 50

3.2 Database Structure

Credit Card

Field Name Data Type

Length Description PK /FK

CardID varchar 50 For identify the credit/debit card record.

PK

expire image - To store expiry date of credit/debit card.

-

cvcCode varchar 50 To store the cvc code of the credit/debit card.

-

password varchar 50 To store the password of the credit/debit card.

-

UserName varchar - To store the user name of the credit/debit card owner.

-

Food

Field Name Data Type

Length Description PK /FK

Meal_ID varchar 50 For identify the meal record.

PK

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.

-

Page 59: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 51

Gift

Field Name Data Type

Length Description PK /FK

Gift_ID varchar 50 For identify the gift record.

PK

name varchar 50 To store the name of the gift.

-

description varchar MAX To store the description of the gift.

-

quantity

int - To store the quantity available of the gift.

-

point_need_walkin int - To store the point needed for walk-in redemption.

-

Point_need_web

int - To store the point needed for online redemption.

-

updateDate varchar 50 To store the latest updated date that gift being update.

-

photo

image - To store the image of the gift. -

Order

Field Name Data Type

Length Description PK /FK

order_ID varchar 50 For identify the order record.

PK

reservation_ID varchar 50 For identify which reservation the order bound to.

FK

date varchar 50 For store the date where the order is made.

-

memberID

varchar 50 For identify which member makes the order.

FK

table varchar 50 For identify which table the order bound to.

FK

OrderDetail

Field Name Data Type

Length Description PK /FK

OrderDetail_ID varchar 50 For identify the order detail record.

PK

mealID varchar 50 For identity the meal/promotion being order.

FK

orderID varchar 50 For identity which order the order detail record bound to.

FK

qty

int - To store the quantity of meal/promotion ordered.

-

Page 60: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 52

Member

Field Name Data Type

Length Description PK /FK

member_ID varchar 50 For identify the member record.

PK

password varchar 50 To store the password of the member account.

-

name varchar 50 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 - To store the phone number of the member.

-

DOB

varchar 50 To store the date of birth of the member.

-

MaritalStatus

varchar 50 To store the marital status of the member.

-

reward_point

int - To store the reward point currently owned by member.

-

security_question

varchar MAX To store the security question for password recovery purpose.

-

security_answer

varchar MAX To store the security answer for password recovery purpose.

-

phonePlace

varchar 50 To store the type of contact of member.

-

status

varchar 50 To store the member account current status.

-

Page 61: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 53

Payment

Field Name Data Type

Length Description PK /FK

Payment_ID varchar 50 For identify the payment record.

PK

order_ID varchar 50 For identity the order that bound to this payment.

FK

Member_ID varchar 50 For identity which member makes this payment.

FK

subTotal

decimal 18,2 To store the subtotal of the payment.

-

grandTotal decimal 18,2 To store the grand total of the payment.

-

balance

decimal 18,2 To store the balance of the payment.

-

time

varchar 50 To store the time when the payment is made.

-

date

varchar 50 To store the date when the payment is made.

-

Promotion

Field Name Data Type

Length Description PK /FK

Promotion_ID varchar 50 For identify the promotion record.

PK

name varchar 50 To store name of the promotion.

-

price decimal 18,2 To store the price of the promotion.

-

description

varchar MAX To store the description of the promotion.

-

date_start varchar 50 To store the date where the promotion is start.

-

date_end

varchar 50 To store the date where the promotion is end.

-

image

image 50 To store the image of the promotion.

-

Page 62: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 54

PromotionDetail

Field Name Data Type

Length Description PK /FK

PromotionDetailID varchar 50 For identify the promotion detail.

PK

promotionID varchar 50 For identify which promotion bound to the promotion detail.

FK

MealID varchar 50 For identify which meal bound to the promotion detail.

FK

redemption

Field Name Data Type

Length Description PK /FK

redeem_ID varchar 50 For identify the redemption record.

PK

date varchar 50 To store the date where the redemption is made.

-

quantity int - To store the quantity of items being redeem.

-

time

datetime - To store the time where the redemption is made.

-

memberID varchar 50 For identify which member makes the redemption.

FK

gift_ID

varchar 50 For identify which gift had been redeemed.

FK

Reservation

Field Name Data Type

Length Description PK /FK

reservationID varchar 50 For identify the reservation record.

PK

member_ID varchar 50 For identify which member makes this reservation.

FK

order_ID varchar 50 For identify which order is bound to the reservation.

FK

reserve_seat

varchar 50 To store the number of reserved seats.

-

reserve_date varchar 50 To store the date for the reservation.

-

reserve_time

datetime - To store the time for the reservation.

-

Page 63: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 55

Staff

Field Name Data Type

Length Description PK /FK

staff_ID varchar 50 For identify the staff record.

PK

password varchar 50 To store the password of the staff account.

-

name varchar 50 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 To store the house address of the staff.

-

phone int - To store the contact number of the staff.

-

DOB

varchar 50 To store the day of birth of the staff.

-

MaritalStatus

varchar 50 To store the marital status of the staff.

-

salary

int 18,2 To store the monthly salary of the staff.

-

position

varchar 50 To store the position of the staff in cafeteria.

-

ICNo

varchar 50 To store the IC number of the staff. -

status

varchar 50 To store the staff current account status.

-

Page 64: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 56

Survey

Field Name Data Type

Length Description PK /FK

menuID varchar 50 For identify the survey record.

PK

Q1 int - To store the total rating for question 1.

-

Q2 int - To store the total rating for question 2.

-

Q3

int - To store the total rating for question 3.

-

Q4 int - To store the total rating for question 4.

-

Q5

int - To store the total rating for question 5.

-

participant

int - To store the total participant that involved in the survey.

-

Survey

Field Name Data Type

Length Description PK /FK

table_ID varchar 50 For identify the table record.

PK

member_ID varchar 50 For identify which member is currently bound to the table.

FK

order_ID varchar 50 For identify which order is currently bound to the table.

FK

valid

int - For keep track the table current status, either occupied or available.

-

Page 65: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 57

3.3 Sequence Diagram

Add Meal Menu

Figure 3.1 Sequence Diagram for Add Meal Menu

Page 66: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 58

Edit Meal Menu

Figure 3.2 Sequence Diagram for Edit Meal Menu

Page 67: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 59

Delete Meal Menu

Figure 3.3 Sequence Diagram for Delete Meal Menu

Page 68: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 60

Add Promotion

Figure 3.4 Sequence Diagram for Add Promotion

Page 69: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 61

Edit Promotion

Figure 3.5 Sequence Diagram for Edit Promotion

Page 70: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 62

Delete Promotion

Figure 3.5 Sequence Diagram for Delete Promotion

Page 71: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 63

Add Reservation

Figure 3.6 Sequence Diagram for Add Reservation

Page 72: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 64

Edit Reservation

Figure 3.7 Sequence Diagram for Edit Reservation

Page 73: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 65

Add Order

Figure 3.8 Sequence Diagram for Add Order

Page 74: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 66

Edit Order

Figure 3.9 Sequence Diagram for Edit Order

Page 75: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 67

View Report

Figure 3.10 Sequence Diagram for View Report

Page 76: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 68

Print Report

Figure 3.11 Sequence Diagram for Print Report

Page 77: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 69

3.4 User Interface

Offline Application

Log In Page

Figure 3.12 Login Page User Interface

Main Menu Form

Figure 3.13 Main Menu User Interface

Page 78: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 70

Table Admission Form

Figure 3.14 Table Admission User Interface

Reservation Form

Figure 3.15 Reservation User Interface

Page 79: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 71

Meal Menu Maintenance Form

Figure 3.16 Meal Menu Maintenance User Interface

Page 80: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 72

Promotion Maintenance Form

Figure 3.17 Promotion Maintenance User Interface

Page 81: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 73

Order Form

Figure 3.18 Order Form User Interface

Page 82: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 74

Report Generation Form

Figure 3.19 Report Generation User Interface

Page 83: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 75

Web Page

Meal Menu Page

Figure 3.20 Meal Menu User Interface

Page 84: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 76

Order Page

Figure 3.21 Order User Interface

Page 85: Cateria Management System

Cafeteria Management System Chapter 3: System Design

Project 77

Reservation Page

Figure 3.22 Reservation User Interface

Page 86: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 78

3.5 Report Design

Yearly Reservation Report

Figure 3.23 Yearly Reservation Report Design

Page 87: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 79

Monthly Reservation Report

Figure 3.24 Monthly Reservation Report Design

Page 88: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 80

Dynamic Reservation Report

Figure 3.5 Dynamic Reservation Report Design

Page 89: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 81

Order Report

Yearly Order Report

Figure 3.6 Yearly Order Report Design

Monthly Order Report

Figure 3.7Monthly Order Report Design

Page 90: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 82

Dynamic Order Report

Figure 3.8 Dynamic Order Report Design

Page 91: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 83

Chapter 4

Programming

Page 92: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 84

44..00 PPrrooggrraammmmiinngg 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

Page 93: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 85

Page 94: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 86

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 promotionID As String

Private name As String

Private price As Double

Private descript As String

Private dateStart As String

Private dateEnd As String

Private RetrievePhoto As System.IO.MemoryStream

Private 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

Page 95: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 87

End Class

Page 96: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 88

4.1.3 Data Access Class

This class will handle every operation that’s 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

Page 97: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 89

4.2 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

Page 98: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 90

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

Page 99: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 91

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

Finally

Terminate()

End Try

End If

End Sub

Page 100: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 92

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

Page 101: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 93

4.3 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

Page 102: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 94

4.4 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

Page 103: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 95

End Using

command.ExecuteNonQuery()

End Sub

Page 104: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 96

4.5 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

Page 105: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 97

4.6 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 System;

using System.Configuration;

using System.Web;

using System.IO;

using System.Data;

using 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();

Page 106: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 98

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();

Page 107: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 99

4.7 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>

Page 108: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 100

4.8 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.

Page 109: Cateria Management System

Cafeteria Management System Chapter 4: Programming

Project 101

Chapter 5

Software Testing

Page 110: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 102

55..00 SSooffttwwaarree TTeessttiinngg 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 it’s 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 that’s 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.

Page 111: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 103

5.2 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.

Page 112: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 104

Figure 5.3 Field Validations for Meal Menu Maintenance

Field validations involved are including:

No Test Action Message in error provider

1 Image left as blank No Image is Uploaded.

2 Name field left as blank Please enter name.

3 Price field left as blank Please enter the price.

4 Price field key in with 0 Price can't be 0.

5 Description field left as

blank

Please enter description.

6 Price field key in with none-

numeric info

Price must be numeric number.

Page 113: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 105

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

Page 114: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 106

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

1 Image left as blank No Image is Uploaded.

2 Name field left as blank Please enter name.

3 Price field left as blank Please enter the price.

4 Price field key in with 0 Price can't be 0.

5 Description field left as

blank

Please enter description.

6 Price field key in with none-

numeric info.

Only numeric are allow.

7 Select date that’s lesser then

today date for promotion

starting date.

Selected Date can't be lesser then today date.

8 Select date that’s lesser then

today date for promotion

ending date.

Selected Date can't be lesser then today date.

9 Select same date for

promotion starting and

ending date.

Both promotion dates can't be same.

10 If no meal menu is selected. Meal offer menu is empty.

Page 115: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 107

In promotion form, that’s a box at right side for select item for promotion purpose.

And that’s 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

Page 116: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 108

5.4 Order Module

Offline Application

In order form, cafeteria need to key in the customer user in the order form. And that’s

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

1 Menu ID field left as blank Please enter Meal ID.

2 Quantity field left as empty Please enter Meal quantity.

3 Quantity field key in with 0 Quantity filed must not be lesser then 0

4 Quantity field key in with

none-numeric sentence

Quantity filed must not be numeric input

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

Figure 5.10 Valid Record Searching Validation

Page 117: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 109

In order form, that’s an order menu box in left bottom record all the meal that’s

already order. And staff would able to edit or remove the order in the menu box.

Therefore that’s 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

Page 118: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 110

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

1 Quantity field left as blank Please insert quantity.

2 Quantity field is key in with

none numeric word

Only Numeric is allow

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

Page 119: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 111

5.5 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

1 Member ID field left as blank Please enter member ID.

2 Date chosen lesser then today

date

Booking Date can't be lesser then today date.

3 No seats number is enter

while selecting larger party

"Please enter seats needed.

4 Seats number enter is not

between 11 to 100 while

selecting larger party

Seats only allowed between 11 to 100

5 None numeric is key into

seats field while selecting

larger party

Only Numeric is allow to enter

Page 120: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 112

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, that’s few validation on

the internet reservation as show in table below.

No Test Action Message show

1 Booking selected is lesser

then today date.

Booking date can't be lesser then today date.

2 Seats field left as blank Please enter seats needed.

3 Same date and time of

booking had made more than

5 times.

Booking on selected time and date had reached the maximum limit.

\

Page 121: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 113

5.6 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.

Page 122: Cateria Management System

Cafeteria Management System Chapter 5: Software Testing

Project 114

Figure 5.19 Field Validations for Item editing in Order Form

Page 123: Cateria Management System

Cafeteria Management System References

Project 115

Chapter 6

Conclusion

Page 124: Cateria Management System

Cafeteria Management System References

Project 116

66..00 CCoonncclluussiioonn 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 that’s a flaw in designing where the

report design for order report doesn’t 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.

Page 125: Cateria Management System

Cafeteria Management System References

Project 117

6.4 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 wouldn’t 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 it’s 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. It’s 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.

Page 126: Cateria Management System

Cafeteria Management System References

Project 118

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. It’s 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.

Page 127: Cateria Management System

Cafeteria Management System References

Project 119

RReeffeerreenncceess

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.net-

informations.com/crystal-reports/csharp-crystal-reports-sql-query.htm

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

Page 128: Cateria Management System

Cafeteria Management System User Guide

Project 120

AAppppeennddiicceess 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 Café’s 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?

Page 129: Cateria Management System

Cafeteria Management System User Guide

Project 121

UUsseerr GGuuiiddee Installation

Step1. Double click on the setup application icon.

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

Page 130: Cateria Management System

Cafeteria Management System User Guide

Project 122

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

Page 131: Cateria Management System

Cafeteria Management System User Guide

Project 123

Table Admission Form

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 that’s up coming in the

next 30minutes. Reservation list will be updated for every 10minutes.

7. Exit from current form.

1. Table

2. Occupy Button

3. Order Button

4. Bill Button

5. Validate Button

7. Exit Button

6. Open Reservation Monitor

Page 132: Cateria Management System

Cafeteria Management System User Guide

Project 124

Reservation Form (Offline Applicatrion)

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.

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

Page 133: Cateria Management System

Cafeteria Management System User Guide

Project 125

Resevation Page (Web Page)

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.

1. Seat Selection

2. Date Selection

3. Time Selection

6. Edit Button

4. Reserve Button

5. Reservation List

Page 134: Cateria Management System

Cafeteria Management System User Guide

Project 126

Order Form (Offline Applicatrion)

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.

1. Order ID Field2. Date Field

3. Reserved Button

4. Table Field

5. Member Field

6. Menu ID Field

7. Quantity Field

8. Add Order Button

14. Confirm Button

13. Remove

12. Edit Button

15. Exit Button

9. Meal ID List

10. Meal Name List

11. Quantity List

Page 135: Cateria Management System

Cafeteria Management System User Guide

Project 127

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)

1. Selection for menu type for viewing.

2. Selection for menu category. (only for common menu)

3. Meal list of selected menu type.

1. Menu Type

3. Menu List

7. Name List

8. Quantity List

9. Total List

10. Remove

11. Proceed Button

2. Category

4. Add to Cart Button

6. Quantity Field

5. Menu Information

12. Subtotal Field

Page 136: Cateria Management System

Cafeteria Management System User Guide

Project 128

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. Select reservation to bind the current order to.

2. The information of selected reservation.

3. Field for enter CVC code for order deposit purpose.

1. Reservation ID

2. Reservation Information

3. CVC Field

6. Edit Button

4. Card ID Field

5. Password Field

7. Name List

8. Edit Button

9. Edit Button

11. Proceed Button 10. Subtotal Field

Page 137: Cateria Management System

Cafeteria Management System User Guide

Project 129

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.

Page 138: Cateria Management System

Cafeteria Management System User Guide

Project 130

Meal Menu Maintenance

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.

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

13. Description Field

10. Edit Button

11. Delete Button

12. Exit Button

Page 139: Cateria Management System

Cafeteria Management System User Guide

Project 131

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.

Page 140: Cateria Management System

Cafeteria Management System User Guide

Project 132

Promotion Maintenance

1. 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.

1. Search Field

2. Button Search

17. Edit Button

16. Add New Button

19. Exit Button

18. Delete Button

8. Browse Button

5. Menu ID Field

6. Add Button

7. Remove Button

9. Image Path

10. ID Field

11. Name Field

12. Price Field

13. Start Date Field

14. End Date Field

15. Description Field

3. Meal ID offer

4. Meal Name offer

Page 141: Cateria Management System

Cafeteria Management System User Guide

Project 133

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.

Page 142: Cateria Management System

Cafeteria Management System User Guide

Project 134

Report

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.

2. Dynamic Date

3. Monthly

4. Yearly

6. View Button 7. Exit Button

5. Reservation Time

1. Report Type Field

Page 143: Cateria Management System

Cafeteria Management System User Guide

Project 135

The End