OoiWenJieAIA201314F Online Restaurant Management System

June 3, 2016 | Author: Cylinder Ooi | Category: Types, Presentations
Share Embed Donate


Short Description

This is Final Documentation for TARC University 2013/2014 Final Year Project Online Restaurant Management System...

Description

(ORMS)ONLINE RESTAURANT MANAGEMENT SYSTEM By

Ooi Wen Jie

FACULTY OF APPLIED SCIENCES AND COMPUTING TUNKU ABDUL RAHMAN UNIVERSITY COLLEGE KUALA LUMPUR ACADEMIC YEAR 2013/2014

i

Online Restaurant Management

Online Restaurant Management System By Ooi Wen Jie

Supervisor: Dr. Chong Jin Hui

A project report submitted to the Faculty of Applied Sciences and Computing in partial fulfillment of the requirement for the Bachelor of Science, Campbell University, U.S.A, And Advanced Diploma in Science.

Department of Information and Communication Technologies Faculty of Applied Sciences and Computing Tunku Abdul Rahman University College Kuala Lumpur 2013/2014

Copyright 2013 by Tunku Abdul Rahman University College. All rights reserved. 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 University College.

Project

ii

Online Restaurant Management System

Declaration

Declaration The project submitted herewith is a result of my own efforts in totality and in every aspect 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 : Ooi Wen Jie Programme :Advanced Diploma in Science (Information System Engineering Year 2)

Project

iii

Online Restaurant Management System

Abstract

Abstract In partial fulfillment of the requirement of Bachelor of Science, we are required to carry out a final year project development. The purpose of this project is to help the restaurant to maintain all the restaurant information, accept food orders from the mobile application or web application, efficiently arrange food preparing lists for kitchen, manage customer reservation and generate useful report. This project will be consisting two types of application which is the web application and mobile application. The web application of this system is used to maintain restaurant data such as membership maintenance and menu maintenance manage reservation, perform food ordering, payment, kitchen maintenance and reporting. While the mobile application will be consist of customer mobile applications and captain mobile application. The details of the module will be discussed in this document. The methodology practiced is the SDLC methodology which emphasized on project development start from the initial phase through the maintenance phase of the completed system. The development process will be the start of the sequence of system planning, requirement analysis, system design, system implementation, system testing and system maintenance. This project is developed using Microsoft Visual Studio 2012 and the database used is MsSQL. IBM RSA and MS Project 2010 also used in the project documentation. At the end, the project is fully implemented complied with the project objective and aims declared at the earliest stages. The strength of the project is interactive, efficient, unambiguous, user friendly, maintainable, portable and reliable. The weakness of the project is inability of supporting more than one restaurant, inaccessible when no Internet access and slow performance when dealing with databases. In a nutshell, I had learned and gained much experience after completing this project in term of coding or documentation. The project implemented is considered as a complete system as it able to provide all the necessary functions and services that request by the user. All of the basic functions that a traditional a restaurant system should have is included in this project. The project implemented still can be improved by implementing password encryption, forum discussion, ability in inventory control and managing more than one restaurant.

Project

iv

Online Restaurant Management System

Acknowledgement

Acknowledgement I wish to express my sincere gratitude to project supervisor, Dr. Chong Jin Hui, for his guidance, constant support and encouragement throughout the completion of this final year project. I would also like to convey my heartfelt appreciation to Dr. Chong for contributing his ideas and in-depth knowledge in the field.

A warm thank is extended to my FYP partner Mr. Lim Sau Jian for sharing his resources, opinions, knowledge, experience and skills in programming and development methodology, so generously. I would also like to personally thank my family, friends in TAR University College and my fellow course-mates who have one way or another extended their assistance in completing this project.

Last, but not least, I wish to acknowledge the unwavering support shown by Dr. Chong Jin Hui and Moderator Mr. Peter Lai Joo Choi.

Project

vi

Online Restaurant Management

Table of Contents

Table of Contents Declaration.............................................................................................................................. iii Abstract ....................................................................................................................................iv Acknowledgement ...................................................................................................................vi 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16

Introduction........................................................................................................................... 2 Problem Outline .................................................................................................................... 2 Project Aims and Objectives................................................................................................. 3 Targeted Customer ................................................................................................................ 4 System Functionalities Chart ................................................................................................ 5 Project Scope (Web Application) ......................................................................................... 6 Project Scope (Mobile Application) ................................................................................... 10 Development Environment ................................................................................................. 12 Operation Environment....................................................................................................... 13 Business Architecture...................................................................................................... 14 System Architecture ........................................................................................................ 15 Network Architecture ...................................................................................................... 16 Project Schedule .............................................................................................................. 17 Project Team and Organization ....................................................................................... 18 Methodology Used .......................................................................................................... 18 Chapter Summary............................................................................................................ 19

2. Requirements Analysis ................................................................................................... 21 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11

Introduction......................................................................................................................... 21 Fact Gathering..................................................................................................................... 21 Functional Requirement ...................................................................................................... 23 Non-Functional Requirement ............................................................................................. 37 Overview Use Case Diagram .............................................................................................. 39 Detail Use Case Diagram and Use Case Description ......................................................... 40 Business Level Activity Diagram ....................................................................................... 56 Detailed Activity Diagram .................................................................................................. 60 Sequence Diagram .............................................................................................................. 67 Collaboration Diagram .................................................................................................... 73 Chapter Summary............................................................................................................ 79

3. System Design .................................................................................................................. 81 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9

Introduction......................................................................................................................... 81 Final Class Diagram............................................................................................................ 81 Data Dictionary ................................................................................................................... 82 Normalization ..................................................................................................................... 86 Screen Design (Sketch Layout) .......................................................................................... 87 Screen Design ..................................................................................................................... 95 Report Template Design ................................................................................................... 117 Core System Flow Design ................................................................................................ 122 Chapter Summary ............................................................................................................. 126

4. Programming ................................................................................................................. 128 4.1 4.2

Project

Introduction....................................................................................................................... 128 Critical Coding Within System ......................................................................................... 128

vii

Online Restaurant Management 4.3

Table of Contents

Chapter Summary ............................................................................................................. 145

5. Software Testing ............................................................................................................ 147 5.1 5.2 5.3 5.4

Introduction....................................................................................................................... 147 Level of Testing ................................................................................................................ 147 Test Plan ........................................................................................................................... 150 Chapter Summary ............................................................................................................. 163

6. Conclusion ...................................................................................................................... 165 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9

Introduction....................................................................................................................... 165 Link to Seminar ................................................................................................................ 165 Tools, Techniques and Methodologies ............................................................................. 166 Achievement of Project Objectives .................................................................................. 167 Project Management Issues .............................................................................................. 168 Strengths and Weaknesses ................................................................................................ 169 Suggestions for Future Improvement................................................................................ 171 Personal Reflection ........................................................................................................... 172 Chapter Summary ............................................................................................................. 173

7. References ...................................................................................................................... 174 8. Appendices ..................................................................................................................... 176 9. User Guide ..................................................................................................................... 185 9.1 9.2

System Document ............................................................................................................. 185 Operation Document ......................................................................................................... 198

10. Softcopy .......................................................................................................................... 225

Project

viii

Online Restaurant Management

Chapter 1 : System Planning

Chapter 1 System Planning

Online Restaurant Management System

1

Online Restaurant Management

1.1

Chapter 1 : System Planning

Introduction

This chapter will discuss about the problems faced by most of the restaurant, the proposed solution with project aims and objectives to overcome the problems, targeted company for the new system, project scope, overview diagram and general description about the modules of the system, the system development environment, operational environment, system architecture, network architecture as well as the methodology practiced in the project development. This chapter also includes the information about project scheduling and project team organization.

1.2

Problem Outline

Problem faced by most of the restaurant is the insufficient worker to server large number of customers, especially during peak hour. Increasing the workforce just to solve peak hour problem, not seem to be the best solution as it decreases the total profitability of the restaurant.

Most of the restaurants tend to be practiced old style and inefficient order processing. A traditional way of taking orders, proceed to the kitchen and then to serve food to the customer are not current practice anymore. The complex way of ordering increased the waiting time for another customer and lead non-satisfactory to the customer.

Old styles of ordering tend to have high human mistakes which increasing unnecessary operating budget. Wrong order processing due to the human mistake will cause wastage of food and increase the operating budget. The writing of a staff is the main factor, because the order might be mistakenly interpreted by the other staff. For example, the digit „1‟ might see wrongly as „7‟, character „C‟ see wrongly as „G‟. This problem mostly happens during the peak hour as everyone in the restaurant is in a rush condition.

Online Restaurant Management System

2

Online Restaurant Management

1.3

Chapter 1 : System Planning

Project Aims and Objectives

All the problems mentioned in the above are unjust as it can be solved by our solution Online Restaurant Management System, a web application that runs the restaurant service together with a mobile application. Since the main problem faced by most of the restaurant is the inefficient and insufficient work force to serve a large number of customers, especially during peak hour. Therefore, this system serves to improve restaurant service and management by maintaining all the restaurant information, accept food order from the mobile application, efficiently arrange food preparing lists for kitchen, manage customer reservation and generate useful report. The customer mobile application of this system allows walk-in customers to place their food order without the need of waiter. They can request a self-order via the application and restaurant captain will approve their request (via the mobile application for captain) if the table is seated. Other features for customer is my food list, this feature allow customers to track their food order status (Served/Preparing/Queuing). Some other functions of the mobile application include request bill, view menu details, and view restaurant details. Besides, captain mobile application will be specially designed for restaurant captain. Restaurant captain will use the mobile application to approve the order request, view/edit table status, take orders and close order. The web application of this system is used to maintain restaurant data, manage reservation, perform food ordering, payment, and reporting. Data maintenance includes membership and menu. While for the kitchen, system is featured with intelligent food order arrange to improve food preparing. Staff can mark the food status to served, preparing or queuing.

The aims and objective of this system are to: Reduce human workforce in the restaurant. Since some of the manual works is being computerized such as staff management, customer reservation and customer membership, therefore the needs of larger workforce is not necessary.

Online Restaurant Management System

3

Online Restaurant Management

Chapter 1 : System Planning

Reduce human mistakes as the system that we develop allows the waiter to enter the customer‟s order and the system will then display the order in the kitchen‟s monitor. By implementing this type of working style, it prevents the kitchen staff to misinterpret the customer order due to handwriting issues and also the chances of losing of the order sheet.

Simplify food ordering process by allowing the dine-in customers to make their own food ordering through our developed restaurant mobile application that install in the customer mobile after the approval and confirmation by the on duty restaurant‟s captain.

Allow the kitchen department to work in an efficient and effective environment as the priority queue arrangement of food list is implemented in this system. Besides, the order taken by front desk can be clearly seen on the monitor and able to obtain the new orders in a shorter time.

Allow the restaurant staff to efficiently in maintaining the restaurant information such as customer membership, and menu information. The staff in-charge just need to key in the details through our system and our system will provide information maintenance to be made in a simple and easy way.

1.4

Targeted Customer

Our target industry for this Online Restaurant Management System is a restaurant service industry. Our target user is those restaurants that wish to reduce human workforce in running their daily operation, eliminate the needs of certain manual works and also computerizing in their management work.

Online Restaurant Management System

4

1.5

System Functionalities Chart

Diagram 1.5 System Functionalities Chart

5

Online Restaurant Management

1.6

Chapter 1 : System Planning

Project Scope (Web Application)

Diagram 1.6.1 ORMS Web Application Functionalities Chart

Online Restaurant Management System

6

Web Application



Customer Maintenance  Add New Member – allows user to register new membership.  Search Member Details – allows user to search for a particular member's details  Edit Member Details – allows user to make changes in the existing member information and update the changes in the system database.  Delete Member – allows user to delete a particular membership from the system database if the customer is no longer having the membership privilege.



Menu Maintenance  Add New Item – allows user to insert a new menu item which includes the new item name, description, price and category.  Search Item Details – allows user to search for a particular item in system database by entering a specific keyword such as the item name, item category and etc.  Edit Item Details – allows user to make changes in the existing menu item information and update the changes in the system database.



Food Order  Add New Order – allows user to enter the order details that taken from customers.  Search / View Order – allows user to search for the customer‟s order or view on the details of the order by entering a specific keyword such as table number.  Edit Order Details – allows user to make changes on the order details when the customer request for changes if the food status is not “Served” or “Preparing”.  Remove Order – allows user to remove the order that made by the customer if the customer have canceled the order.  Check Order Status – allows user to check on the status of each item in the order to make sure that all orders have been served on the customer table.

7

Online Restaurant Management 

Chapter 1 : System Planning

Reservation 

Verifies Membership – allows user to verify the validity of customer membership before a reservation is made. This verification process requires the customer name or customer member ID.



Check seat & time slot availability – allows user to check for the table and time slot availability that request by the customer.



Update Reservation – allows user to record the reservation details after a reservation is successfully made.



Reservation Notification (System Alert – SMS) – generate a short message service to the customer that make reservation to act as a reminder.



Remove Reservation – allows user to remove the reservation details from the system database when the customer have cancelled their reservation.



Kitchen  Display Food – allow the kitchen department to display on the current restaurant orders that are not served to the customer.  Filter List – allow the kitchen department to arrange or filter the list of the orders that being served based on the given condition.  Edit Food Status – allow the kitchen department to edit the food ordering status either to Queuing or Preparing state to an order listed.



Report  Identify Report Type – allows user to choose the report type that they wish to have such as daily sales report, unattended reservation report and so on.  Retrieve Database – search through the system database for the required information to generate the report.  Generate Report – allows user to view on the report that they requested on the screen. The user may also export the report into both softcopy and hardcopy.

Online Restaurant Management System

8

Online Restaurant Management 

Chapter 1 : System Planning

Payment  Identify Payment Type – allows the user to choose what type of payment that customer wish to carry out such as cash payment or credit payment.  Calculate Payment – calculate the total payment need to be paid by the customer when billing is requested by customer.  Calculate Balance – will enter the cash amount given by the customer and the system will calculate the balance of the payment.  Generate Receipt – generate a receipt to the customer after the payment is successfully paid.  Generate Bill – generate a billing statement when a customer request to make payment for his/her orders.

Online Restaurant Management System

9

Online Restaurant Management

1.7

Chapter 1 : System Planning

Project Scope (Mobile Application)

Diagram 1.7.1 ORMS Mobile Application Functionalities Chart

Mobile Application For Customer Customer can use this mobile application to place orders, request bill, track food status, edit profile details, and search food details



Food Menu  Search Food – Search menu items using keyword and category  Display Description – Display detail description of food after search



Order  Request Order – Requests a self-order and wait approval from the captain  Add Order Item – Click on the image button to order desire food  Edit Order Item – Edit quantity, add remarks or remove order item  Display Payment – Calculate and display total payment required  Request Bill – Notify waiter to collect payment

Online Restaurant Management System

10

Online Restaurant Management 

Chapter 1 : System Planning

Food List  Track Food – Check food status whether (Served, Preparing, Queuing)  Cancel Food – Remove unwanted food only if the food has not yet prepared



Profile  Display Profile – Display profile using signed-in user ID.  Edit Profile – Edit user details if the customer is signed-in  Change password – Allow user to change new password

Mobile Application For Captain This application will be owned by the restaurant captain to approve orders, take orders, check all table status, close order and receive bill notification.



Order Management  Create order – Generate new order and payment.  Approve Order – Allow customer to make self-order after further verify the customer existence  Take Order – Captain will order food that ordered by the customer  Edit Order – Captain will change quantity or remove food ordered by the customer  Close Order – Cancel order if customer not going to take any order



Table Management  View Status – Check table status (reserved, available, seated)  Edit Status – Change table status (cancel reserved to available)

Online Restaurant Management System

11

Online Restaurant Management

1.8

Chapter 1 : System Planning

Development Environment

Diagram 1.8.1 ORMS Development Environment

ORMS will be developed using the C# language because this language is supported in both mobile and web application development in Microsoft Visual Studio 2012. This will be an advantage because the developers can provide support to each other through the familiarities on same programming language. The Microsoft SQL Database server will be the shared database for the entire system to ensure the data consistency through different access from multiple applications. All the details about the development of ORMS will be documented using Microsoft Word 2013 and the system diagrams will be prepared using Microsoft Project and Smart Draw Modelling tool. The main communication methods along the development of ORMS will be face to face meeting, emailing using Gmail, and web conferencing using Skype.

Online Restaurant Management System

12

Online Restaurant Management

1.9

Chapter 1 : System Planning

Operation Environment

Diagram 1.9.1 ORMS Operational Environment Two tables above specified the minimum requirement for mobile device and computer to support all the features of ORMS system. ORMS will be hosted on a web server where it can be accessed by device browsers that fulfil minimum capability mentioned. While the mobile application will be implemented in mobile device that operate under the Windows Phone operating system. Besides, ORMS would need the support of hardware such as a printer, switch, cashier machine, and receipt printer. Both of the software and network architecture of ORMS will be presented in the next part of this document.

Online Restaurant Management System

13

Online Restaurant Management

Chapter 1 : System Planning

1.10 Business Architecture

Diagram 1.10 Business Architecture In our final year project, three tiers architecture is implemented. It consists of presentation tier, application tier and data tier. In the presentation tier or known as top layer, we will have all the user device such as PCs and mobile devices which implement the graphical user interface and display the system information. In the application tier or middle layer, we will install the Online Restaurant Management System in the application server and database will be in the data tier. The users interact with the system in the presentation tier by sending request through the interface or receive result from the application tier. Application tier will be in-charge of all processing and request from client while data tier is responsible to store all the data or information about the restaurant. Three-tier architecture ensures: Data Integrity. The application tier will ensure all the updates from presentation tier are valid data before it update to the database. Therefore, this architecture can improve the data integrity and reduce the risk of client application corrupting the database data. Security. Three-tier application is more secure because the client does not get access to the database directly. Thus, the client will not obtain unauthorized data or modified the data in the database easily. Maintainability. Each of the tiers is independent layer, this allow us make changes easily without affecting any other tier. For example, any changes on the user interface will not resulting changes on the application tier. Therefore, it makes the maintenance work become easier.

Online Restaurant Management System

14

Online Restaurant Management

Chapter 1 : System Planning

1.11 System Architecture

Diagram 1.10.1 ORMS System Software Architecture In Online Restaurant Management System (ORMS), Microsoft SQL Server database will directly attach to web application. To make all mobile applications and the web application access the same data, we use (WCF) Windows Communication Foundation to expose all operations for mobile application. To form a service oriented environment, all mobile applications will be consuming the service for any features that need communication with the shared database. Other benefits of using WCF as the bridge for the communication is this technology does support integration to non-windows based application, which mean the future expansion of system to Android and IOS platform can be done at minimum effort.

Online Restaurant Management System

15

Online Restaurant Management

Chapter 1 : System Planning

1.12 Network Architecture

Diagram 1.11.1 ORMS System Network Architecture The system will operate under both internal and external networks. Restaurant customers can access to the website using their personal devices while restaurant staff can connect to company network and server resources via Internet. One broadband Internet connection will be shared within the area of restaurant by setting up a wireless access point and internal network using a switch. We will set up a server for restaurant web application, email and database which connected to the ADSL modem. The internal network includes the sharing of Internet connection, printer and server resources. Mobile ordering can be done in the restaurant by connecting the server via a wireless access point.

Online Restaurant Management System

16

1.13 Project Schedule

Diagram 1.13.1 ORMS Project Management Gantt Chart

17

1.14 Project Team and Organization Lim Sau Jian

Ooi Wen Jie

Mobile application: Customer  Food menu  Food order  Food preparing status  Profile setting Mobile application: Captain  Order Management  Table Management Web Services  All WCF methods

Web Application  Customer maintenance  Menu maintenance  Food order  Payment  Reservation  Kitchen  Report Database  All Database design

1.15 Methodology Used The methodology that practiced in this project development is System Development Life Cycle or known as SDLC. SDLC is a conceptual model that widely used in project management which describes the stages involved in an information system development project start from the initial phase through the maintenance phase of the completed system. The common development phases in SDLC are system planning, requirement analysis, system designing, system implementation, deployment and maintenance. Although there are many other approaches available for selection, however SDLC is still more suitable to our development condition. In general, an SDLC methodology practicing the following steps: 1. The existing system is evaluated to identify the deficiencies by interviewing the system user or consulting with the support personnel. 2. The new system requirement and solution to overcome the identified deficiencies are defined to act as an improvement for the new system. 3. The new system is designed. Plans are created to address the physical construction, hardware requirement, operating systems, programming and security issues. 4. The new system is then developed. The new components and programs must be obtained and installed. Users of the system will be provided training in its use, and all aspects of performance must be tested thoroughly. A necessary adjustment is made at this stage to meet the user requirement. 18

Online Restaurant Management

Chapter 1 : System Planning

5. The system is put into use. The new system can phased in according to application or location, and the old system gradually replaced. In some other cases, it is more costeffective if shut down the old system and replaced by the new system. 6. Once the new system is up and running, it should be closely evaluated by the development team. Maintenance must be available all the times to overcome the problems met. Users of the system will be kept up-to-date on the latest modifications and procedures.

1.16 Chapter Summary

Basically, this chapter served to summarize the initial phase of the project development which is focused on the introductions of the system and the planning of the project development.

Besides, in this chapter also describe the project objectives and aim to provide a better direction of the services the system should provide and problem that the system should overcome. At the same time, project scope and project schedule are provided in order to allow the user to have the preview on the overall structure of the project development and the estimated duration to complete the overall project development. Development environment, operation environment, system architecture as well as network architecture is described to provide better understanding to ensure that the final system can be developed and operate in a smooth manner. At last, a Gantt Chart is provided by the deliverable submission deadline to allow us to organize the project task properly and to ensure utilization of time during project development.

Project

19

Online Restaurant Management

Chapter 1 : System Planning

Chapter 2 Requirements Analysis

Project

20

Online Restaurant Management System

Chapter 2 : Requirement Analysis

2.

Requirements Analysis

2.1

Introduction

In this chapter, it will discuss about the system requirement specification which is the functional and non-functional requirements to provide a clear direction to the user what services does the new system provide. Besides, UML diagrams such as Use Case Diagram, Activity Diagram, Business Level Activity Diagram, Sequence Diagram as well as Collaboration Diagram are provided to allow the user to better understanding of the system workflow.

2.2

Fact Gathering

Generally, there are many fact finding techniques that are available to be used by the system analyst to gather the information for the system requirement. It is important for the system analyst to understand the needs of the client so that it would not bring up any conflict during the implementation stage. The user requirement can be identified through the common fact finding techniques which is interview, questionnaire and observation. 2.2.1 Interview The interview is one of the face-to-face fact-gathering techniques that widely used by a system analyst to gather information from the user or client and the interviewee will respond to the questions asked which include open-ended and closed-ended and the answer will be documented. The interviewer will prepare an Interview Plan before the interview is carried out which clearly identified the objectives, time and venue, the interviewee and the predefined questions.

2.2.2 Questionnaire Questionnaires are of the research technique that can be applied in fact finding for system projects where the users of the system are given a list of questions noted in the questionnaires to be filled up and returned to the system analyst after completion. Questionnaires are a useful fact-finding technique when the system analysts wish to gather information from a large number of potential users due to time frame limitation. The reason is it is impossible for the system analyst to interview each individual to gather all information needed. Project

21

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Questionnaires are divided into two types: Open-Response Based and Closed-Response Based. Open-Response Based questionnaires are normally used to gather information where the information are essential and important features of the system while Close-Response Based questionnaire is used to collect factual information about the system.

2.2.3 Observation Observation is a powerful tool for information gathering regarding the current system. The system analyst can experience the usage of the system rather than describe and hearing from the interviewees. The system analyst can experience the perspective and better understanding the system procedures and the requirements needed to use the system. Besides, the system analyst can observe the current Restaurant Management System processes or procedures to understand the business flow/ needs and make necessary improvement.

Project

22

Online Restaurant Management System

2.3

Chapter 2 : Requirement Analysis

Functional Requirement

Module: Membership Maintenance

Diagram 2.4.1 Membership Maintenance User Requirement 

This system must allow users to add new member, update‟s member details, delete and search for existing member details.

System Requirement 1.0 Add new member (Member Registration)  The system must allow the user to enter new member details.  The system must allow the user to enter desirable username.  The system must validate the details enter by user such as IC Number, Phone Number, Email and so on.  If the user enters invalid member details, an error message will be prompt and user needs to re-enter the invalid details.  If the member details are valid, the system will prompt a confirmation message.  If user clicks on confirm button, the system will display a successful message, store the details into database and an email will be sent.

2.0 Edit member details (Member Profile)  The system shall display the searching result based on member login credentials.  If the member details cannot be matched in the database, the system will prompt an error message.

Project

23

Online Restaurant Management System

Chapter 2 : Requirement Analysis

 The system shall allow the user to make changes in the current data displayed on screen such as address, phone and etc.  The system will validate the information that edits by users.  If the user enters invalid information, the system will prompt an error message and user needs to reenter the information.  If the member details are valid, the system will prompt a confirmation message.  If user clicks on confirm button, the system will display a successful message and updates the details in the database.

3.0 Search member details  The system must allow the user to enter a specific input such as the username for searching purpose.  The system shall display the searching result if found in database.  If the member details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.

4.0 Delete member  The system must allow the user to enter a specific input such as the username for searching purpose.  The system shall display the searching result if found in database.  If the member details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system shall allow the user to delete the selected member membership.  The system shall prompt a confirmation message when the user clicks on the delete button.  The system must be able to update the member status from the database, prompt a successful message and send an email to deleted member email.

Project

24

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Menu Maintenance

Diagram 2.4.2 Menu Maintenance User Requirement 

This system must allow users to add new items, update‟s item details and search for existing item details.

System Requirement 1.0 Add new item  The system must allow the user to enter new item details.  The system must be able to generate a new item ID.  The system must validate the details enter by the user.  If the user enters invalid item details, an error message will be prompt and user needs to re-enter the invalid details.  If the item details are valid, the system will prompt a confirmation message.  If user clicks on confirm button, the system will display a successful message and store the details into the database.

2.0 Search item details  The system must allow the user to enter a specific input such as an item ID for searching purpose.  The system shall display the searching result if found in database.  If the item details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.

Project

25

Online Restaurant Management System

Chapter 2 : Requirement Analysis

3.0 Edit item details  The system must allow the user to enter a specific input such as an item ID for searching purpose.  The system shall display the searching result if found in database.  If the item details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system shall allow the user to make changes in the current data displayed on screen such as address, phone and etc.  The system will validate the information that edits by users.  If the user enters invalid information, the system will prompt an error message and user needs to reenter the information.  If the item details are valid, the system will prompt a confirmation message.  If user clicks on confirm button, the system will display a successful message and updates the details in the database.

Project

26

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Food Order

Diagram 2.4.3 Food Order User Requirement 

The system allows user to add new order details, update order details, remove an order, check and search for existing order details.

System Requirement 1.0 Add new order  The system must allow the user to enter new order details.  The system must be able to generate a new order ID.  The system will prompt a confirmation message when the user clicks on “Confirm” button.  If user clicks on confirm button, the system will display a successful message and store the details into the database.  The system shall create a new payment details for each new order stored.  The system will display the order details on kitchen screen.

2.0 Search / View order  The system must allow the user to enter a specific input such as order ID for searching purpose.  The system shall display the searching result if found in database.  If the item details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.

Project

27

Online Restaurant Management System

Chapter 2 : Requirement Analysis

3.0 Edit order details  The system must allow the user to enter a specific input such as order ID for searching purpose.  The system shall display the searching result if found in database.  If the entered details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system shall allow the user to add-in additional order details into the order displayed on screen.  The system will update the details in database when user makes changes on the item details.  The system shall also update the order details screen in the kitchen and also the payment for that order.  The system shall allow the user to make changes in the order display on screen.  The system prohibited user to make changes on the item list states that are shown “Preparing” or “Served”, only items with status “Queuing” can make changes.

4.0 Remove order  The system must allow the user to enter a specific input such as order ID for searching purpose.  The system shall display the searching result if found in database.  If the item details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to choose which item to delete.  The system prohibited user to make changes on the item list states that are shown “Preparing” or “Served”, only items with status “Queuing” can be make delete.  The system will prompt an error message if the user deletes the item status that shown “Preparing” or “Served”.  The system shall prompt a confirmation message when the user clicks on the delete button.

Project

28

Online Restaurant Management System

Chapter 2 : Requirement Analysis

 The system must be able to delete the order record from the database and prompt a successful message.  The system shall also update the order details screen in the kitchen and also the payment for that order.

5.0 Check order status  The system must allow the user to enter a specific input such as order ID for searching purpose.  The system shall display the searching result if found in database.  If the item details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.

Project

29

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Reservation

Diagram 2.4.4 Reservation User Requirement 

The system must be able to verify the customer membership, allow user to select seats and time slot availability, update the reservation, send out reservation notification and also remove reservation from the database.

System Requirement 1.0 Verify Membership  The system must allow the user to enter a specific input such as member username for searching purpose.  The system shall display the searching result if found in database.  If the member details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system prohibits customer that is not member to make reservation.

2.0 Select seat & time slot  The system shall display all table status on the screen.  After verification of customer status is successful, the system will display the seat and time slot availability on the screen.  The system shall allow the user to choose the time slot for reservation.  The system shall allow the user to choose the seat for reservation.

Project

30

Online Restaurant Management System

Chapter 2 : Requirement Analysis

3.0 Update Reservation  If the criteria choose by user is not available, the system will prompt an error message.  The system shall allow the user to reselect the reservation details.  If the time slot and seat choose by user is valid, a confirmation message will be prompt on the screen.  If user clicks on confirm button, the system will display a successful message and store the reservation in the database.

4.0 Reservation notification  The system will retrieve the reservation details from the database.  The system will send out a short message service notification to the customer that makes the reservation when the staff clicks on send button.

5.0 Remove Reservation  The system must allow the user to enter a specific input such as member username for searching purpose.  The system shall display the searching result if found in database.  If the member details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system shall allow the user to choose the reservation record to delete.  The system shall prompt a confirmation message when the delete button is clicked.  If the reservation is successfully removed, the system shall update the reservation details in the database.

Project

31

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Payment

Diagram 2.4.5 Payment User Requirement 

This system must allow customers to make their fee payment via online (PayPal) or cash payment. This system must also generate a receipt upon the completion of payment.

System Requirement 1.0 Identify Payment Type  The system must allow the user to enter a specific input such as table number, order ID for searching purpose.  The system shall display the searching result if found in database.  If the payment details cannot be matched in the database, the system will prompt an error message.  The system shall allow the user to reenter the searching details.  The system will run 2.0 Calculate Payment function.  The system shall allow the user to choose which types of payment the customer wants to carry out.  If the user chooses cash payment, the system will run 3.0 Calculate Balance function.  If the user chooses payment via online, the customer shall be able to access to their PayPal account via this module.  The system will prompt a warning message if the wrong ID / password is entered for accessing customer Paypal account.

Project

32

Online Restaurant Management System

Chapter 2 : Requirement Analysis

 The customer shall be able to make their payment via this system after customer access to their Paypal account successfully.  If Paypal method is selected and the customer Paypal amount is not enough to clear the payment, the system shall cancel the transaction and prompt an unsuccessful message.  The system shall be able to update the customer payment status after the payment is made.  If the payment is successfully made, the system will run 4.0 Generate receipt function. 2.0 Calculate Payment  The system will retrieve the order details from the database.  The system will identify the customer membership status for discount purpose.  The system will calculate the total payment for that order.  The system will display the total payment to be paid on screen.

3.0 Calculate Balance  The system shall allow the user to enter the cash amount paid by the customer.  The system will compare the cash amount received with the actual amount of payment.  The system will prompt an error message if the cash amount paid is lesser than the actual amount of payment.  The system will calculate the balance if the cash amount paid is greater than the actual amount of payment  The system will display the total balance on the screen.  The system will update the customer payment details.  The system will run 4.0 Generate Receipt function.

4.0 Generate Receipt  The system shall be able to retrieve the successful paid payment details from the database.  The system shall allow the user to choose want to print the receipt or export the receipt to softcopy.

Project

33

Online Restaurant Management System

Chapter 2 : Requirement Analysis

5.0 Generate Bill  The system must allow the user to enter a specific input such as table number, order ID for searching purpose.  The system will display the searching payment result on the screen.  The system shall allow the user to print the bill for showing to the customer.  If the payment details cannot be matched in the database, the system will prompt an error message.

Project

34

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Report

Diagram 2.4.6 Report User Requirement 

This system must allow users to select 5 choices of report type and print out the report.

System Requirement 1.0 Identify report type  The system shall allow user to choose the report type such as Daily Sales report, Unattended Reservation Report, Member Registration Report, Top 5 Customer Report and Top 5 Sales Report.  The system shall allow user to select the parameter to generate reports such as start date and end date.  The system will validate the parameter select by the user.  The system will prompt an error message if the parameter selected is not valid.

2.0 Retrieve database  The system will retrieve the information based on the details select by the user.

3.0 Generate report  The system will display a report on the screen.  The system shall allow the user to print the report.  The system shall allow the user to export the report to softcopy.

Project

35

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Module: Kitchen Maintenance

Diagram 2.4.7 Kitchen Maintenance User Requirement 

This application must allow the user to manage the food preparing list and the food ordered will be arranged according to the algorithm used to improve the efficiency of food preparing.

System Requirement 1.0 Display Food  This application will retrieve the order details from the database.  This application will display the ordered food to prepare on the screen.

2.0 Filter List  This application shall allow user to select the type of filter list “Queue” or “Dequeue”.  If “Dequeue” filter type is chosen, the kitchen preparing screen will display the food ordering list based on food status and the order taken time only.  If “Queue” filter type is chosen, the kitchen preparing screen will display the food ordering list based on the food status and merge the same type of food item that orders intervals are between 5 minutes.

3.0 Edit Food  This application shall display the food ordered list on screen.  This application shall allow user to change the food status such as from “Queuing” to “Preparing”.

Project

36

Online Restaurant Management System

2.4

Chapter 2 : Requirement Analysis

Non-Functional Requirement

Usability Usability quality attributes measures the degree of how satisfaction of the user when they use the system in term of meeting their requirements, intuitive to use and easy to navigate (MSDN, n.d.). The Online Restaurant Management System must be able to meet the end users requirements so that the end users can carry out their work effectively and will not resist the system. The Restaurant Mobile Application must be designed in a user familiar way so that the mobile users can use it intuitively without excessive training or guidance required. Availability Availability quality attributes measures the percentages of system downtime over a predefined period of time (MSDN, n.d.). It can be defined as the proportion time which the system is operating and data are available as needed. ORMS is an online system and therefore it is important to ensure that the system is highly available for its end-user such as restaurant staff when they need it for the restaurant business transaction. In other words, the staffs must be able to access the system all the time and obtain the services or information that they want. Conceptual integrity Conceptual integrity quality attributes defining the consistency and coherence among the components or modules designed (MSDN, n.d.). It is important to maintain the consistency among the modules designed as the Online Restaurant Management System (ORMS) is made up from 7 modules. If consistency does not practice, it would require a longer time for the technician to carry out system maintenance and system upgrade due to different programmer for each module will have a different variable declaration for the same specific input and coding styles. Understandability Understandability quality attributes measures the degrees of the project team‟s understanding towards the system‟s purpose and requirements at the end of the initiation phase (Anon., 2009). The duration of completing the ORMS project is a three month project which is a tight schedule. It is important for the project team understand the problem that proposed by the client and come out with solutions that does not need to change the business nature of the client. Besides, it also prevents any frequent changes in the project during the development of the client.

Project

37

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Portability Portability quality attributes measure the ability of the system to operate in different computing environments (Computer Hope, n.d.). The Online Restaurant Management System is an online system that will be using web hosting services which allows the restaurant staff access to the system through any web browser from any computing devices at any time with Internet availability. Interoperability Interoperability quality attributes measures the ability of two or more systems to communicate and cooperate at runtime by exchanging information and use the information exchanged for their operations (MSDN, n.d.). In this project, Online Restaurant Management System and Restaurant Mobile Application will be implemented. It is important to ensure that both of the system can communicate to each other and exchanging information as the orders that taken from Restaurant Mobile Application will be displayed in the kitchen module of Online Restaurant Management System.

Project

38

Online Restaurant Management System

2.5

Chapter 2 : Requirement Analysis

Overview Use Case Diagram

Overview Use Case Diagram of Online Restaurant Management System

Diagram 2.5.1 Overview Use Case Diagram of ORMS

Project

39

Online Restaurant Management System

2.6

Chapter 2 : Requirement Analysis

Detail Use Case Diagram and Use Case Description

Membership Maintenance Detail Use Case Diagram

Diagram 2.6.1 Membership Maintenance Detail Use Case Diagram

Membership Maintenance Use Case Description Use Case Name : Membership Maintenance Actors : Staff Brief Description: This use case describes how a staff can record their member profile, update, delete and edit their profile. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Membership Maintenance‟ button to enter the page.

System Response 2. The system will display maintenance interface.

3. User decides whether they want to add, search, edit or delete the member‟s profile.

Project

40

the

Online Restaurant Management System

Chapter 2 : Requirement Analysis

If the user wants to add a new member profile S-1 : add new member is performed.

If the user wants to search a member profile S-2 : search member is performed.

If the user wants to edit a member profile S-3 : edit member is performed.

If the user wants to delete a member profile S-4 : delete member is performed.

Sub Flows: S-1: Add Member 1. The system will display a membership form. 2. The user will enter the member details. 3. The system will validate the detail entered. 4. If valid, the new member is inserted into the membership database. S-2: Search Member 1. The user will enter the keyword required for searching a particular member. 2. The system will search the particular member record based on the keyword and display in proper format.

S-3 : Edit Member 1. The user will enter the keyword required for searching a particular member. 2. The system will search the particular member record based on the keyword and display in proper format. 3. The staff can edit the member detail and click on submit button. 4. The system will validate the updated detail. 5. If valid, the system will update the member detail in the database. S-4 : Delete Member 1. The user will enter the keyword required for searching a particular member. 2. The system will search the particular member record based on the keyword and display in proper format. 3. The Staff can delete the member detail by click on the delete button. 4. The system will prompt a confirmation message. 5. If the user clicks on confirm button, the system will delete the member detail from the database.

Project

41

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Alternate Flows: S-1, 3a1: If user enter an invalid member details, the system prompt an error message and goes back to Step 2 of S-1. S-2, 1a1: If user enters an invalid keyword for searching the member detail, the system will prompt an error message and goes back to Step 1 of S-2. S-3, 1a1: If user enters an invalid keyword for searching the member detail, the system will prompt an error message and goes back to Step 1 of S-3. S-3, 3a1: If user enter an invalid updated member details, the system prompt an error message and goes back to Step 3 of S-3. S-4,1a1: If user enters an invalid keyword for searching the member detail, the system will prompt an error message and goes back to Step 1 of S-4.

Project

42

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Menu Maintenance Detail Use Case Diagram

Diagram 2.6.2 Membership Maintenance Detail Use Case Diagram

Menu Maintenance Use Case Description Use Case Name : Menu Maintenance Actors : Staff Brief Description: This use case describes how a staff can add, update, delete and edit their menu detail. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Menu Maintenance‟ button to enter the page.

System Response 2. The system will display maintenance interface.

3. User decides whether they want to add, search, edit or delete the member‟s profile. If the user wants to add a new menu record S-1 : add new menu is performed.

Project

43

the

Online Restaurant Management System

Chapter 2 : Requirement Analysis

If the user wants to search a menu record S-2 : search menu is performed. If the user wants to edit a menu record S3 : edit menu is performed.

Sub Flows: S-1: Add Menu 1. The system will display a menu form. 2. The user will enter the menu details. 3. The system will validate the detail entered. 4. If valid, the new menu record is inserted into the menu database. S-2: Search Menu 1. The user will enter the keyword required for searching a particular menu record. 2. The system will search the particular menu record based on the keyword and display in proper format. S-3 : Edit Menu 1. The user will enter the keyword required for searching a particular menu record. 2. The system will search the particular menu record based on the keyword and display in proper format. 3. The staff can edit the menu detail and click on submit button. 4. The system will validate the updated detail. 5. If valid, the system will update the menu detail in the database. Alternate Flows: S-1, 3a1: If user enter an invalid menu details, the system prompt an error message and goes back to Step 2 of S-1. S-2, 1a1: If user enters an invalid keyword for searching the menu record, the system will prompt an error message and goes back to Step 1 of S-2. S-3, 1a1: If user enters an invalid keyword for searching the menu record, the system will prompt an error message and goes back to Step 1 of S-3. S-3, 3a1: If user enter an invalid updated menu detail, the system prompt an error message and goes back to Step 3 of S-3.

Project

44

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Food Order Detail Use Case Diagram

Diagram 2.6.3 Food Order Detail Use Case Diagram

Food Order Use Case Description Use Case Name : Food Order Actors : Staff Brief Description: This use case describes how a staff can add, edit, remove an order and check the order detail. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Food Order‟ button to enter the page.

System Response 2. The system will display the food ordering interface.

3. User decides whether they want to add, edit, remove or check the order detail. If the user wants to add a new order S-1 : add new order is performed. If the user wants check an order S-2 :

Project

45

Online Restaurant Management System

Chapter 2 : Requirement Analysis

check order is performed.

If the user wants to edit an order S-3 : edit order is performed.

If the user wants to remove an order S-4 : remove order is performed.

Sub Flows: S-1: Add Order 1. The system will display a menu list with ordering form. 2. The user will enter the order details. 3. The system will validate the detail entered. 4. If valid, the new order is inserted into the order database and new payment is created in the payment database. S-2: Check Order 1. The user will enter the keyword required for searching a particular order detail. 2. The system will search the particular order detail based on the keyword and display in proper format. S-3 : Edit Order 1. The user will enter the keyword required for searching a particular order detail. 2. The system will search the particular order detail based on the keyword and display in proper format. 3. The staff can edit the order detail and click on submit button. 4. The system will validate the updated detail. 5. If valid, the system will update the order detail and payment detail in the database. S-4 : Remove Order 1. The user will enter the keyword required for searching a particular order detail. 2. The system will search the particular order detail based on the keyword and display in proper format. 3. The Staff can remove the order detail by click on the delete button. 4. The system will prompt a confirmation message. 5. If the user clicks on confirm button, the system will delete the order detail from the database and void the payment detail too.

Project

46

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Alternate Flows: S-1, 3a1: If user enter an invalid order details, the system prompt an error message and goes back to Step 2 of S-1. S-2, 1a1: If user enters an invalid keyword for searching the order detail, the system will prompt an error message and goes back to Step 1 of S-2. S-3, 1a1: If user enters an invalid keyword for searching the order detail, the system will prompt an error message and goes back to Step 1 of S-3. S-3, 3a1: If user enter an invalid updated order details, the system prompt an error message and goes back to Step 3 of S-3. S-4,1a1: If user enters an invalid keyword for searching the order detail, the system will prompt an error message and goes back to Step 1 of S-4.

Project

47

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Reservation Detail Use Case Diagram

Diagram 2.6.4 Reservation Detail Use Case Diagram

Reservation Use Case Description Use Case Name : Reservation Actors : Staff Brief Description: This use case describes how a staff can add, delete, search a reservation and check for the reservation detail. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Reservation‟ button to enter the page.

System Response 2. The system will display the reservation interface. 4. The system will validate the existence of the member ID.

3. User will enter the member ID. 5. User decides whether they want to add, search, edit or delete the member‟s profile. Project

48

Online Restaurant Management System

Chapter 2 : Requirement Analysis

If the user wants to add a new reservation S-1 : add reservation is performed. If the user wants to search a reservation detail S-2 : search reservation is performed.

If the user wants to delete a reservation record S-3 : delete reservation is performed.

Sub Flows: S-1: Add Reservation 1. The system will display a reservation form. 2. The system will retrieve the seat and time slot detail from the database. 3. The user will enter the reservation detail. 4. The user will select the seat and time slot that is available. 5. The system will validate the reservation detail. 6. If valid, the new reservation is inserted into the reservation database. 7. The system will send a SMS notification to the user. S-2: Search Reservation 1. The user will enter the keyword required for searching a particular reservation detail. 2. The system will search the particular reservation detail based on the keyword and display in proper format. S-3 : Delete Reservation 1. The user will enter the keyword required for searching a particular reservation detail. 2. The system will search the particular reservation detail based on the keyword and display in proper format. 3. The Staff can delete the reservation detail by click on the delete button. 4. The system will prompt a confirmation message. 5. If the user clicks on confirm button, the system will delete the reservation detail from the database. Alternate Flows: S-1, 5a1: If user enter an invalid reservation details, the system prompt an error message and goes back to Step 3 of S-1. S-2, 1a1: If user enters an invalid keyword for searching the reservation detail, the system will prompt an error message and goes back to Step 1 of S-2. S-3, 1a1: If user enters an invalid keyword for searching the member detail, the system will prompt an error message and goes back to Step 1 of S-3.

Project

49

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Payment Detail Use Case Diagram

Diagram 2.6.5 Payment Detail Use Case Diagram

Payment Use Case Description Use Case Name : Payment Actors : Staff Brief Description: This use case describes how a staff can generate bill, receipt and carry out payment transaction. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Payment‟ button to enter the page. 3. User decides whether they want to generate bill, receipt or make payment transaction. If the user wants to generate bill S-1 : generate bill is performed.

Project

50

System Response 2. The system will display the payment interface.

Online Restaurant Management System

Chapter 2 : Requirement Analysis

If the user wants to make payment S-2 : make payment is performed. If the user wants to generate receipt S-3 : generate receipt is performed. Sub Flows: S-1: Generate Bill 1. The user will enter the table ID. 2. The system will retrieve the ordering detail and payment detail from the database based on the table ID. 3. The system will display the billing information. 4. The user will click on generate bill button. 5. The system will print the bill. S-2: Make Payment 1. The system will identify the payment method selected by user. 2. The staff needs to enter PIN code to access customer‟s PayPal account. 3. PayPal system, the external entity transfer amount and update customer‟s balance. 4. The system will update the payment status. S-3 : Generate Receipt 1. The user will enter the table ID. 2. The system will validate the latest payment status based on the table ID. 3. The system will retrieve the payment history based on the table ID. 4. The system will display the receipt information. 5. The user will click on generate receipt button. 6. The system will generate the receipt. Alternate Flows: S-1, 1a1: If user enters an invalid table ID, the system prompt an error message and goes back to Step 2 of S-1. S-2, 2a2: If user enters the insufficient amount for the payment transaction, the system will prompt an error message and goes back to Step 1 of S-2. S-2, 3a1: PayPal system, the external party system will validate the username and password, if the password and username mismatch, it will goes back to Step 2 of S-2. S-2, 3a2: If the customer PayPal account balances are insufficient for the payment, the transaction will be cancel and back to Step 1 of S-2. S-3, 1a1: If user enters an invalid table ID, the system prompt an error message and goes back to Step 2 of S-1. S-3, 2a1: If the payment status is unpaid, the system will prompt an error message and goes back to Step 1 of S-3.

Project

51

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Report Detail Use Case Diagram

Diagram 2.6.6 Report Detail Use Case Diagram Report Use Case Description Use Case Name : Report Actors : Staff Brief Description: This use case describes how a staff can view and generate the report. Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Report‟ button to enter the page.

System Response 2. The system will display the report interface.

4. User will select the report criteria.

3. The system will display the report criteria selection.

8. User will decide whether to print the report or not to print the report.

4. The system will validate the report criteria selected.

If user wants to print the report S-1: Print Report is performed.

Project

52

5. The system will retrieve the information from the database based on the report criteria selected.

Online Restaurant Management System

Chapter 2 : Requirement Analysis

6. The system will generate the report. 7. The system will display the report information in proper format. Sub Flows: S-1: Print Report 1. The user will click on print button. 2. The system will prompt a confirmation message whether to print the report. 3. If user clicks on confirm button, the system will print the report.

Alternate Flows: 4a1: If the report criteria selected by user is invalid, the system will prompt and error message and goes back to Step 4.

Project

53

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Kitchen Detail Use Case Diagram

Diagram 2.6.7 Kitchen Detail Use Case Diagram

Kitchen Use Case Description Use Case Name : Kitchen Maintenance Actors : Staff Brief Description: This use case describes how a staff can view the food list and update the food status Pre-condition: The Staff is logged-in into the system. Normal Flow of Events : Actor Actions 1. User clicks on „Kitchen Maintenance‟ button to enter the page.

System Response 2. The system will display maintenance interface.

4. User decides whether they want to filter the food list or edit the food status. If the user wants to filter the food list S1 : filter food list is performed. If the user wants to edit food status S-2 : edit food status is performed.

Project

54

the

3. The system will display the existing food list.

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Sub Flows: S-1: Filter Food List 5. The system will filter and rearrange the existing food list. 6. The system will redisplay the food list. S-2: Edit Food Status 3. The user click on the edit button. 4. The system will update the selected food record and update the database.

Project

55

Online Restaurant Management System

2.7

Chapter 2 : Requirement Analysis

Business Level Activity Diagram

Business Level Membership Maintenance Activity Diagram

Diagram 2.7.1 Business Level Membership Maintenance Activity Diagram

Business Level Menu Maintenance Activity Diagram

Diagram 2.7.2 Business Level Menu Maintenance Activity Diagram

Project

56

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Business Level Food Order Activity Diagram

Diagram 2.7.3 Business Level Food Order Activity Diagram

Business Level Reservation Activity Diagram

Diagram 2.7.4 Business Level Reservation Activity Diagram

Project

57

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Business Level Payment Activity Diagram

Diagram 2.7.5 Business Level Payment Activity Diagram

Business Level Report Activity Diagram

Diagram 2.7.6 Business Level Report Activity Diagram

Project

58

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Business Level Kitchen Activity Diagram

Diagram 2.7.7 Business Level Kitchen Activity Diagram

Project

59

Online Restaurant Management System

2.8

Chapter 2 : Requirement Analysis

Detailed Activity Diagram

Membership Maintenance Detail Activity Diagram

Diagram 2.8.1 Membership Maintenance Detail Activity Diagram

Project

60

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Menu Maintenance Detail Activity Diagram

Diagram 2.8.2 Menu Maintenance Detail Activity Diagram

Project

61

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Food Order Detail Activity Diagram

Diagram 2.8.3 Food Order Detail Activity Diagram

Project

62

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Reservation Detail Activity Diagram

Diagram 2.8.4 Reservation Detail Activity Diagram

Project

63

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Payment Detail Activity Diagram

Diagram 2.8.5 Payment Detail Activity Diagram

Project

64

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Report Detail Activity Diagram

Diagram 2.8.6 Report Detail Activity Diagram

Project

65

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Kitchen Detail Activity Diagram

Diagram 2.8.7 Kitchen Detail Activity Diagram

Project

66

2.9

Sequence Diagram

Membership Maintenance Sequence Diagram

Diagram 2.9.1 Membership Maintenance Sequence Diagram

67

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Menu Maintenance Sequence Diagram

Diagram 2.9.2 Menu Maintenance Sequence Diagram

Project

68

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Food Order Sequence Diagram

Diagram 2.9.3 Food Order Sequence Diagram

Project

69

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Reservation Sequence Diagram

Diagram 2.9.4 Reservation Sequence Diagram

Project

70

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Payment Sequence Diagram

Diagram 2.9.5 Payment Sequence Diagram

Project

71

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Kitchen Sequence Diagram

Diagram 2.9.6 Kitchen Sequence Diagram

Project

72

Online Restaurant Management System

Chapter 2 : Requirement Analysis

2.10 Collaboration Diagram Membership Maintenance Collaboration Diagram

Diagram 2.10.1 Membership Maintenance Collaboration Diagram

Project

73

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Menu Maintenance Collaboration Diagram

Diagram 2.10.2 Menu Maintenance Collaboration Diagram

Project

74

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Food Order Collaboration Diagram

Diagram 2.10.3 Food Order Collaboration Diagram

Project

75

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Reservation Collaboration Diagram

Diagram 2.10.4 Reservation Collaboration Diagram

Project

76

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Payment Collaboration Diagram

Diagram 2.10.5 Payment Collaboration Diagram

Project

77

Online Restaurant Management System

Chapter 2 : Requirement Analysis

Kitchen Collaboration Diagram

Diagram 2.10.5 Payment Sequence Diagram

Project

78

2.11 Chapter Summary

Basically, this chapter discuss on the requirement analysis phase which including the fact finding technique, system requirements and related UML Diagrams. A complete and detail requirement must be available before proceeding to the system design stages to ensure that the developer does understand on the needs and expectation of the user. The requirement analysis first starts with 3 type of fact finding technique which is interviews, questionnaire and observation which allow us to have a better understanding on the demanding system workflow or procedures. Besides, all functional requirements for each module and nonfunctional requirement of the system is well described to prevent any user conflict in the later stage.

Furthermore, 5 types of UML Diagram which is Use Case Diagram, Activity Diagram, Business Level Activity Diagram, Sequence Diagram and Collaboration Diagram are drawn based on the information gathered. All of these diagrams are drawn using IBM Rational Software Architect and served to provide description between the interaction of system user and the system under a specific condition to complete a task.

79

Online Restaurant Management System

Chapter 3 : System Design

Chapter 3 System Design

Project

80

Online Restaurant Management System

3.

System Design

3.1

Introduction

Chapter 3 : System Design

This chapter will be discussing on how the overall system is designed in term of the database design with data dictionary, layout sketching design and screen layout design. This chapter is crucial to the project development life cycle as it plays an important role in project implementation and testing stage.

3.2

Final Class Diagram

Diagram 3.2.1 Final Class Diagram

Project

81

Online Restaurant Management System

3.3

Chapter 3 : System Design

Data Dictionary

Table Name: Member Field Name

Data Type

Data Description

Key

UserName

Nvarchar(50)

Member login username

PK

Name

Nvarchar(50)

Member name

IC

Nchar(14)

Member IC

Gender

Nchar(7)

Member Gender

Phone

Nchar(12)

Member Phone Number

Email

Nchar(50)

Member Email Address

Address

Nvarchar(50)

Member Housing Address

City

Nvarchar(50)

Member City

State

Nvarchar(50)

Member State

Postcode

Nvarchar(5)

Member Postcode

DateJoined

Date

Date of Registration

ValidStatus

Nvarchar(20)

Membership status

ConfirmStatus Nvarchar(20)

Confirmation

status

Reference

for

registration ImagePath

Nvarchar(Max) Path for member profile image

OrderID

Nchar(15)

To ensure each member having FK only 1 order at a visit

Password

Project

Nchar(12)

Use to login to the system

82

ResOrder

Online Restaurant Management System

Chapter 3 : System Design

Table Name: Menu Field Name

Data Type

Data Description

Key

MenuID

Nchar(10)

Menu Unique ID

MenuItemName

Nvarchar(50)

Menu name

MenuItemDescription

Nvarchar(50)

Menu description

Category

Nvarchar(50)

Menu category

UnitPrice

Decimal(18,2)

Item selling price per unit

Status

Nvarchar(20)

Item available status

ImagePath

Nvarchar(Max)

Path for menu item image

Data Type

Data Description

Reference

PK

Table Name: Payment Field Name

Key

PaymentID

Nchar(15)

Payment Unique ID

PaymentStatus

Nvarchar(50)

Payment status

TotalBeforeDiscount

Decimal(18,2)

Amount to pay before discount

TotalAfterDiscount

Decimal(18,2)

Amount to pay after discount

PaymentAmount

Decimal(18,2)

Amount to be pay

PaymentMethod

Nvarchar(50)

Payment method

PaymentDate

Date

Date of the payment

ReceiptID

Nvarchar(50)

Receipt

reference

Reference

PK

for

the

payment PaymentGeneratedDate

Date

Date payment generated

PaymentExpiredDate

Date

The latest date for the payment

TransactionID

Nvarchar(30)

Transaction

reference

for

PayPal UserName

Project

Nvarchar(50)

Member unique username

83

FK

Member

Online Restaurant Management System

Chapter 3 : System Design

Table Name: Reservation Field Name

Data Type

Data Description

Key

ReservationID

Nchar(10)

Reservation Unique ID

PK

UserName

Nvarchar(50)

Member unique username

FK

Phone

Nchar(12)

Member phone number

Time

Time(5)

Reservation time

Date

Date

Reservation date

Status

Nvarchar(50)

Status of the reservation

Pax

Nvarchar(2)

Number of person

AlertStatus

Nvarchar(50)

SMS status

Remark

Nvarchar(Max) Remark message for reservation

Reference

Member

Table Name: ResOrder Field Name

Data Type

Data Description

OrderID

Nchar(15)

Order Unique ID

OrderType

Nvarchar(50)

Customer order type

TableID

Nchar(10)

Customer sitting table

Pax

Int

Number of customer

Date

Date

Date of customer order

TimeIn

Time(7)

Time of customer order

TimeOut

Time(7)

Time of customer payment

PaymentID

Nchar(15)

Order unique payment

TotalInitialPrice

Decimal(18,2)

Customer total order item initial price

TotalAfterDiscount Decimal(18,2)

Project

Amount to pay after discount

84

Key

Reference

PK

FK

ResTable

FK

Payment

Online Restaurant Management System

Chapter 3 : System Design

Table Name: ResOrderDetail Field Name

Data Type

Data Description

Key

Reference

OrderID

Nchar(15)

Order unique ID

Composite Key ResOrder

MenuID

Nchar(10)

Menu unique ID

Composite Key Menu

Index

int

Unique ordering sequence

PK

Quantity

Int

Number of item ordered

Status

Nvarchar(50)

Status of ordered item

InitialPrice

Decimal(18,2)

Initial price for ordered item

TimeCooked

Time(7)

Time of order item prepared

KitchenIndex

Int

Use for kitchen department to filter food list

Table Name: ResTable Field Name

Data Type

Data Description

TableID

Nchar(10)

Table unique ID

TableDescription

Nvarchar(50)

Description for the table

MaximumSeat

int

Maximum seat for the table

Status

Nvarchar(50)

Status of the table

OrderID

Nchar(10)

Order unique ID

CallingFromlient

Nvarchar(50)

Used for requesting billing

Key

Reference

PK

FK

ResOrder

Table Name: Staff Field Name

Data Type

Data Description

StaffID

Nchar(20)

Staff unique ID

Position

Nvarchar(20)

Position of the staff

Password

Nvarchar(20)

Use to login to the system

Project

85

Key PK

Reference

Online Restaurant Management System

3.4

Chapter 3 : System Design

Normalization

Third Normal Form(3rd NF) Member(UserName, Name, IC, Gender, Phone, Email, Address, City, State, PostCode, DateJoined, ValidStatus,ConfirmStatus, ImagePath, OrderID*, Password)

Menu(MenuID, MenuItemName, MenuItemDescription, UnitPrice, ImagePath, Category, Status)

Payment(PaymentID, PaymentAmount,

PaymentStatus,

PaymentMethod,

TotalBeforeDiscount,

TotalAfterDiscunt,

PaymentDate, ReceiptID, PaymentGeneratedDate,

PaymentExpiredDate, TransactionID, UserName*)

Reservation(ReservationID, UserName*, Phone, Time, Date, Pax, Status, AlertStatus, Remark)

ResOrder(OrderID, OrderType, TableID*, Pax, Date, TimeIn, TimeOut, PaymentID*, TotalInitialPrice, TotalAfterDiscount)

ResOrderDetail(OrderID*, MenuID*, Index, Quantity, Status, InitialPrice, TimeCooked, KitchenIndex)

ResTable(TableID, TableDescription, MaximumSeat, Status, OrderID*, CallingFromClient)

Staff(StaffID, Position, Password)

Project

86

Online Restaurant Management System

3.5

Chapter 3 : System Design

Screen Design (Sketch Layout)

Membership Maintenance Sketch Layout

Diagram 3.5.1 Membership Maintenance Sketch Layout

Project

87

Online Restaurant Management System

Chapter 3 : System Design

Menu Maintenance Sketch Layout

Diagram 3.5.2 Menu Maintenance Sketch Layout

Project

88

Online Restaurant Management System

Chapter 3 : System Design

Food Order Sketch Layout

Diagram 3.5.3 Food Order Sketch Layout

Project

89

Online Restaurant Management System

Chapter 3 : System Design

Reservation Sketch Layout 1

Diagram 3.5.4 Reservation Sketch Layout 1

Project

90

Online Restaurant Management System

Chapter 3 : System Design

Reservation Sketch Layout 2

Diagram 3.5.5 Reservation Sketch Layout 2

Project

91

Online Restaurant Management System

Chapter 3 : System Design

Payment Sketch Layout

Diagram 3.5.6 Payment Sketch Layout

Project

92

Online Restaurant Management System

Chapter 3 : System Design

Report Sketch Layout

Diagram 3.5.7 Report Sketch Layout

Project

93

Online Restaurant Management System

Chapter 3 : System Design

Kitchen Sketch Layout

Diagram 3.5.8 Kitchen Maintenance Sketch Layout

Project

94

Online Restaurant Management System

3.6

Chapter 3 : System Design

Screen Design

Home Page Screen Design

Diagram 3.6.1 Home Page Screen Design This is the Home Page of the Online Restaurant Management System. On this page, it will show the static information about the restaurant which is Dizzy Restaurant.

Project

95

Online Restaurant Management System

Chapter 3 : System Design

About Page Screen Design

Diagram 3.6.2 About Page Screen Design This is the About Page of ORMS. On this page, it will provide the static information such as people‟s testimony, history about the restaurant and so on.

Project

96

Online Restaurant Management System

Chapter 3 : System Design

Gallery Page Screen Design

Diagram 3.6.3 Gallery Page Screen Design This is the Gallery Page. On this page, it will show the static menu image and menu description that is available in the restaurant.

Project

97

Online Restaurant Management System

Chapter 3 : System Design

Registration Page Screen Design

Diagram 3.6.4 Registration Page Screen Design This is Registration Page. On this page, public users are able to register themselves as a part of the restaurant system user. A confirmation email will be sent to the user email with the login credential. The system will be able to store the member profile and information securely.

Project

98

Online Restaurant Management System

Chapter 3 : System Design

Term & Condition Screen Design

Diagram 3.6.5 Term & Condition Screen Design This is Term & Condition Page, it will show the term and condition to sign up as the member of the system. It will list down as clear as possible to protect the member data as well as the benefit of the restaurant.

Project

99

Online Restaurant Management System

Chapter 3 : System Design

Contact Us Screen Design

Diagram 3.6.6 Contact Us Screen Design This is Contact Page, this allows the non-member user to send a recommendation or feedback to the restaurant management and this page also serves as a communication channel for the restaurant to non-member user. Besides, it also provides the contact information and location information to the user.

Project

100

Online Restaurant Management System

Chapter 3 : System Design

Staff View Member Screen Design

Diagram 3.6.7 Staff View Member Screen Design This is Staff View Member Page which allows the staff to search for a member‟s details. The staff will need to enter the customer username; if it's found in the database, then the information will be displayed according to the field provided.

Project

101

Online Restaurant Management System

Chapter 3 : System Design

Staff Remove Membership Screen Design

Diagram 3.6.8 Staff Remove Membership Screen Design This is a Staff Remove Membership page which allows the staff to remove the membership status of a particular member. The staff will need to enter the customer username to verify the member existence. If a membership removal is a must to the particular member, the staff will need to enter the reason in the text area provided and an email with removal reason will be sent to the member.

Project

102

Online Restaurant Management System

Chapter 3 : System Design

Staff Add Menu Screen Design

Diagram 3.6.9 Staff Add Menu Screen Design This is Staff Add Menu Page which allows the staff dynamically adds in new menu item to the restaurant. When a new item is offered in the restaurant, the staff can add in the new menu item with the information such as menu name, description, unit price and etc.

Project

103

Online Restaurant Management System

Chapter 3 : System Design

Staff Edit Menu Screen Design

Diagram 3.6.10 Staff Edit Menu Screen Design This is Staff Edit Menu Page which allows the staff to make modification on the existing menu information such as unit price, description, name and also the menu image.

Project

104

Online Restaurant Management System

Chapter 3 : System Design

Staff Add Order Screen Design

Diagram 3.6.11 Staff Add Order Screen Design This is Staff Add Order Page which allows the staff to make an order for taking the orders from customers. A menu will be shown on the left side while the information requires the staff to enter is placed on the right side.

Project

105

Online Restaurant Management System

Chapter 3 : System Design

Staff Edit Order Screen Design

Diagram 3.6.12 Staff Edit Order Screen Design This is Staff Edit Order Page which allows the staff to make modification of the existing order. The modification can be like adding or removing an ordered item, but must fulfil the condition such as the food are still not in preparing.

Project

106

Online Restaurant Management System

Chapter 3 : System Design

Staff Kitchen Screen Design

Diagram 3.6.13 Staff Kitchen Screen Design This is Staff Kitchen Page which will only be used by the kitchen staff. This page will show the order list on the existing order and item that required the kitchen department to prepare. The kitchen staff is provided with the option to filter and update the status of item list displayed.

Project

107

Online Restaurant Management System

Chapter 3 : System Design

Staff Add Reservation Screen Design

Diagram 3.6.14 Staff Add Reservation Screen Design This is Staff Add Reservation Page which allows the staff to make reservations for the restaurant member. The staff is required to enter the member username to verify their existence and then only enter the reservation detail in the field provided.

Project

108

Online Restaurant Management System

Chapter 3 : System Design

Staff Edit Reservation Screen Design

Diagram 3.6.15 Staff Edit Reservation Screen Design This is Staff Edit Reservation Page which allows the staff to help the member to update their reservation information. This page also allows the staff to search for the upcoming reservation on the selected date. The staff can also send SMS reminder to the member through this page.

Project

109

Online Restaurant Management System

Chapter 3 : System Design

Staff Update Table Reservation Screen Design

Diagram 3.6.16 Staff Update Table Reservation Screen Design This is Staff Update Table Reservation Page which allows the staff to reserve a table for the upcoming reservation. Green color will be indicating free, the red color will indicate seated and yellow color will be indicates reserved.

Project

110

Online Restaurant Management System

Chapter 3 : System Design

Staff Make Payment Screen Design

Diagram 3.6.17 Staff Make Payment Screen Design This is Staff Payment Page which allows the staff to carry out payment transaction. The amount of the payment will be auto calculated. Besides, the payment method is divided into 2 which is cash payment and PayPal payment. If customer chooses cash payment, then the staff will require to enter the amount receive, else if PayPal payment is selected then it will redirect to the PayPal payment page.

Project

111

Online Restaurant Management System

Chapter 3 : System Design

PayPal Success Screen Design

Diagram 3.6.18 PayPal Success Screen Design This is PayPal Success Page which will be directed from PayPal payment page upon the payment is successfully made. The information will be displayed on this page will be the transaction ID of the PayPal payment which allow the customer to trace back the payment paid.

Project

112

Online Restaurant Management System

Chapter 3 : System Design

PayPal Failed Screen Design

Diagram 3.6.19 PayPal Failed Screen Design This is PayPal Failed Page which will be directed from PayPal payment page upon the payment is canceled or failed. The information will be displayed on this page will be the payment ID, payment amount and also provided a button to redirect back to the Payment Page.

Project

113

Online Restaurant Management System

Chapter 3 : System Design

Member Edit Profile Screen Design

Diagram 3.6.20 Member Edit Profile This is Member Edit Profile Page which allows the member to make changes in their information. Besides, they are also allowed to change their profile picture, password and etc.

Project

114

Online Restaurant Management System

Chapter 3 : System Design

Member Make Reservation Screen Design

Diagram 3.6.21 Member Make Reservation Screen Design This is Member Make Reservation Page which allows the member to make reservation by themselves through the reservation form provided. The information of the member will be automatically retrieved when the member come to this page. However, they are still allowed to make changes in the information. They required to enter the reservation details and clicking on the confirmation button.

Project

115

Online Restaurant Management System

Chapter 3 : System Design

Staff Generate Report Screen Design

Diagram 3.6.22 Staff Generate Report Screen Design This is Staff Report Page which allows the staff to generate or download the report from the system. The staff is provided with 5 options of the report, which is Member Registration Report, Unattended Reservation Report, Top 5 Customer Report, Top 5 Sales Report and Daily Sales Report. The staff can also specify the duration period of the report which select the from date and to date.

Project

116

Online Restaurant Management System

3.7

Chapter 3 : System Design

Report Template Design

Member Registration Report

Diagram 3.7.1 Member Registration Report This is Member Regisration Report which show the member that register themselves between the duration period specify by the staff. The purpose of this report is that the Online Restaurant Management System is open to public, the staff does not know who register to use the system. So by generating this report, it allowed the staff to have an information about who is registered on their system.

Project

117

Online Restaurant Management System

Chapter 3 : System Design

Unattended Reservation Report

Diagram 3.7.2 Unattended Reservation Report This is an Unattended Reservation Report which allows the staff to know which member having a high unattended reservation number. The purpose of this report is that only member of the system is allowed to make a reservation, if a member make too many false reservations, it will make the staff to reserve a table for a reservation which will not be attending, so it will affect the business performance. The staff can use this report to determine which member‟s membership status should be removed.

Project

118

Online Restaurant Management System

Chapter 3 : System Design

Top 5 Customer Report

Diagram 3.7.3 Top 5 Customer Report This is Top 5 Customer Report which will display the top 5 spending member between the duration periods specify by the staff. This report allowed the staff to know which 5 members having a high spending at the restaurant and can send them a voucher to thank them.

Project

119

Online Restaurant Management System

Chapter 3 : System Design

Top 5 Sales Report

Diagram 3.7.4 Top 5 Sales Report This is Top 5 Sales Report which allow the staff to know which top 5 product are the most selling in the duration period specified by the staff. This report allowed the restaurant management to have an idea that which product is more popular in their restaurant and can make requests to have extra stock of that product to prevent leakage of that product.

Project

120

Online Restaurant Management System

Chapter 3 : System Design

Daily Sales Report

Diagram 3.7.5 Daily Sales Report This is Daily Sales Report which allow the management to know the daily performance of the particular day. If the sales on that day do not reach the expectations, they can figure out solutions to prevent the same situation happen on the upcoming days.

Project

121

Online Restaurant Management System

3.8

Chapter 3 : System Design

Core System Flow Design

Order Request handler This section will discuss about how RapidCaptain will respond to a self-ordering request from RapidOrder.

Handler of Self-Order Event

Diagram 3.8.1 Overview Kitchen Preparing List Sorting

Discussion Handling of self-order request involved both RapidOrder and RapidCaptain activity. Selfordering will be requested by RapidOrder while RapidCaptain will approve or cancel the selfordering request.

1. Whenever a RapidOrder wish to do a new order, it must send a ordering request by invoking WCF method, requestTable(tableID). Eg. requestTable(A). Immediately, a DispatcherTimer is start to constantly check on Table A status.

Project

122

Online Restaurant Management System

Chapter 3 : System Design

2. RapidCaptain will detect the status changes on restaurant table by periodically invoking WCF method, getAllStatus(). Detected requesting status on Table A and prompt notification on system interface until the request is respond. 3. RapidCaptain will approve/cancel the request by invoking WCF method, ResponseRequest(tableID). Eg. ResponseRequest(A) 

Approve request caused A status changed from “Requesting” to “Seated.”



Cancel request caused B status changed from “Requesting” to “Free”

4. RapidOrder will detect the status changes on Table A by constantly invoke WCF method, getStatus(A). DispatcherTimer immediately stop and two possible result are: 

Table A status is “seated”, orderID is generated and allowed to self-ordering



Table A status is “free” and RapidOrder have to try again

Intelligent Food Sorting in Kitchen Module This section will discuss about how changes in order detail will caused notification in kitchen interface on web application. The order sequence is follow by order A -> order B.

Kitchen Preparing List Sorting Diagram

Diagram 3.8.2 Overview Kitchen Preparing List Sorting

Project

123

Online Restaurant Management System

Chapter 3 : System Design

Diagram 3.8.3 Kitchen Preparing List Sorting

Without sorting result # 1 2 3 4 5 6

Food M01 M02 M03 M01 M02 M03

Status Cooking Queuing Queuing Queuing Queuing Queuing

Quantity 2 2 1 1 1 1

Order A A A B B B

Status Cooking Queuing Queuing Queuing

Quantity 2 3 2 1

Order A A-2,B-1 A-1,B-1 B

With sorting result # 1 2 3 4

Project

Food M01 M02 M03 M01

124

Online Restaurant Management System

Chapter 3 : System Design

Discussion In Kitchen Module, there will be a constant check implemented to check the changes made in the kitchen index of order detail. When the value of the kitchen index has been modified such as 1 indicating new item added, 2 indicating item status updated and 3 indicating item is deleted, it will prompt a message box to inform the kitchen staff. Besides, there will an Intelligent Food Sorting for queuing item implemented in Kitchen Module too. The condition to be merged is that the item ordered are the same item that in queuing status but is taken from different order and most important is that the time taken for both order taken time are not difference more than 5 minutes. If the above does not meet, then the ordered food will be shown in separate list.

For example, Order A is taken on 10:00am and having item of M01-Cooked, M02-Queued and M03-Queued. Meanwhile Order B is taken on 10:03am and having item M01-Queued, M02-Queued and M03-Queued. With the Intelligent Food Sorting, the entire item with Queued status will be taken to compare with each other and merged together if the condition meets. The Order B M02-Queued and M03-Queued will be merging with Order A M02Queued and M03-Queued because both of the order time taken difference is not more than 5 minutes. The reason why Order B M01-Queued and Order A M01-Cooked is because of the Order A M01-Cooked is already in cooking status, only food item with Queue will be compare and merged.

Project

125

Online Restaurant Management System

3.9

Chapter 3 : System Design

Chapter Summary

This chapter summarizes out the details of system design which including data design, screen design and report design. The project data designs are presented in the class diagram, third normalization table as well as a data dictionary. Data dictionary will contain the information such as attribute name, data type, description, key type and reference table of all database tables used in the system.

Furthermore, screen layout sketch design and screen design is practiced to ensure that the design screen or user interface do meet the requirement that gathered at previous stages. Besides, it is a good practiced that we designing the user interface based on the diagrams that drawn on the previous stage as it is more efficient in meeting requirement of the proposed system. Lastly, 5 types of report design is created to serve the needs of the restaurant management or for business purposes.

Project

126

Online Restaurant Management System

Chapter 4 : Programming

Chapter 4 Programming

Project

127

Online Restaurant Management System

4.

Programming

4.1

Introduction

Chapter 4 : Programming

This chapter will be providing a description of the critical programming code that used in developing the system. The main language that we used to develop the Online Restaurant Management System is Asp.Net C#. However, PayPal API, SMS API and JQuery were also being used in the development to enhance the functionality and visibility of the entire system.

4.2

Critical Coding Within System

Real Time Notification var soundObject = null; function generate(layout, id) { if (soundObject != null) { document.body.removeChild(soundObject); soundObject.removed = true; soundObject = null; } soundObject = document.createElement("embed"); soundObject.setAttribute("src", "notify.wav"); soundObject.setAttribute("hidden", true); soundObject.setAttribute("autostart", true); document.body.appendChild(soundObject); setTimeout(function () { var n = noty({ text: 'Table ' + id + 'ask for billing. Do you want to response ? ', type: 'alert', dismissQueue: true, layout: layout, theme: 'defaultTheme', buttons: [ { addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {

Project

128

Online Restaurant Management System

Chapter 4 : Programming

$noty.close(); noty({ dismissQueue: true, force: true, layout: layout, theme: 'defaultTheme', text: 'Please print the bill and proceed to customer', type: 'success' }); window.open("RealTimeNotificationResponse.aspx?id=" + id, "_blank"); } }, { addClass: 'btn btn-danger', text: 'Cancel', onClick: function ($noty) { $noty.close(); noty({ dismissQueue: true, force: true, layout: layout, theme: 'defaultTheme', text: 'Unfortunately, you have ignored this notification', type: 'error' }); } } ] }); console.log('html: ' + n.options.id); }, 800); }

Diagram 4.2.1 Sample Code for Real Time Notification

This Real Time Notification code is used in the Staff Master Page. When the client used the Restaurant Mobile Application and request for billing, the Real Time Notification Code Behind will trigger the code above and prompt a message box with sound object to alert the staff which table is requesting for billing. If the staff response “Ok” to the message, it will redirect to another page and billing information of the table will be generated.

Project

129

Online Restaurant Management System

Chapter 4 : Programming

Real Time Notification Code Behind protected void Refresh_Load(object sender, EventArgs e) { consMenu = new SqlConnection(connStr); consMenu.Open(); cmdSelectTable = new SqlCommand("SELECT * FROM ResTable WHERE CallingFromClient='yes'", consMenu); SqlDataAdapter da = new SqlDataAdapter(cmdSelectTable); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { String id = dt.Rows[i]["TableID"].ToString(); ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "generate", "generate('top','" + id + "');", true); cmdUpdateTable = new SqlCommand("Update ResTable set CallingFromClient='' WHERE TableID=@id", consMenu); cmdUpdateTable.Parameters.AddWithValue("@id", id); cmdUpdateTable.ExecuteNonQuery(); } } consMenu.Close(); refreshEveryNanoSecond.Value = GetLatestTick().ToString(); }

Diagram 4.2.2 Real Time Notification (Code Behind) This Real Time Notification Code Behind will run in every NanoSecond to check the database to determine whether the dine-in customer has requested for billing. If the condition is met which is retrieving a value “Yes” from the RestaurantTable database table, then it will trigger the Real Time Notification Function show on Diagram 4.2.1 and update the “Yes” value to NULL. If no value “Yes” is obtained, it will not trigger the Real Time Notification Function.

Project

130

Online Restaurant Management System

Chapter 4 : Programming

SMS Code Behind protected void sendNotificationSMS() { // http://isms.com.my/sms_api.php string receiver = "0164550987"; string msgContent = "Hi Mr/Ms, we are pleased to remind you that you have made a reservation to Dizzy Restaurant which dated on" + tempdate + " " + time + ". We are happy to serve you."; Uri myUri = new Uri("http://isms.com.my/isms_send.php?un=abc&pwd=123456&dstno=6" + receiver + "&msg=" + msgContent + "&type=1&sendid=60198972233"); WebRequest myWebRequest = WebRequest.Create(myUri); WebResponse myWebResponse = myWebRequest.GetResponse(); StreamReader reader = new StreamReader(myWebResponse.GetResponseStream()); string s_ResponseString = reader.ReadToEnd(); }

Diagram 4.2.3 SMS Code Behind The SMS Code Behind shows the function of sending SMS. This function is used in Reservation module which allows the staff to send the SMS act as a reminder to the member that has made a reservation for that particular day. This SMS API is provided by the ISMS Company that located in Penang. When this function is triggered, it will create a URI which including the API Link, Username, Password, SMS Receiver Number and Message content. The URI will be used to create the WebRequest and which will be responded to send the SMS.

Project

131

Online Restaurant Management System

Chapter 4 : Programming

Zopim Live Chat window.$zopim || (function (d, s) { var z = $zopim = function (c) { z._.push(c) }, $ = z.s = d.createElement(s), e = d.getElementsByTagName(s)[0]; z.set = function (o) { z.set. _.push(o) }; z._ = []; z.set._ = []; $.async = !0; $.setAttribute('charset', 'utf-8'); $.src = '//v2.zopim.com/?1i7ZzL7ea2RlBEUi3RLAzy4WDSnxFByL'; z.t = +new Date; $. type = 'text/javascript'; e.parentNode.insertBefore($, e) })(document, 'script');

Diagram 4.2.4 Zopim Live Chat This Zopim Live Chat is a dashboard that allows the restaurant staff to manage the live chat session with the system user. This Zopim Live Chat API allowed the instant messaging chat box being implemented in the Member Master Page or every page that the member can access. The code above is managed by JavaScript. However, in order for the restaurant staff to respond to the live chat session, they are required to login in the dashboard in Zopim Main Website.

Generate Bill Code Behind using iTextSharp.text; using iTextSharp.text.pdf; protected void generateBill() { String payid = txtPaymentid.Text; String receiptID = "R" + txtPaymentid.Text.Substring(1); String datetime = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss"); String tabid = ""; String pax = ""; String paymentamount = ""; String tbdiscount = ""; String discount = txtDiscount.Text; if (discount.ToString() == "") {discount = "-"; } consPayment = new SqlConnection(connStr); consPayment.Open(); cmdPayment = new SqlCommand("Select r.Pax, r.TableID, p.PaymentAmount, p.TotalBeforeDiscount From ResOrder r, Payment p WHERE r.PaymentID=@id AND r.PaymentID=p.PaymentID", consPayment); cmdPayment.Parameters.AddWithValue("@id", payid); dtrSelectPayment = cmdPayment.ExecuteReader(); if (dtrSelectPayment.Read()) { tabid = dtrSelectPayment["TableID"].ToString(); pax = dtrSelectPayment["Pax"].ToString(); paymentamount = dtrSelectPayment["PaymentAmount"].ToString();

Project

132

Online Restaurant Management System

Chapter 4 : Programming

tbdiscount = dtrSelectPayment["TotalBeforeDiscount"].ToString(); } dtrSelectPayment.Close(); string path = path = Server.MapPath("Payment_Receipt"); var doc1 = new Document(new iTextSharp.text.Rectangle(300f, 800f)); PdfWriter.GetInstance(doc1, new FileStream(path + "/" + receiptID + ".pdf", FileMode.Create)); doc1.Open(); cell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right table.AddCell(cell); PdfPCell cell2 = new PdfPCell(new Phrase("11-12-10, BL Avenue")); cell2.Colspan = 3; cell2.Border = PdfPCell.NO_BORDER; cell2.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right table.AddCell(cell2);

PdfPCell btm1 = new PdfPCell(new Phrase(" ")); btm1.Colspan = 3; btm1.Border = PdfPCell.BOTTOM_BORDER; btm1.HorizontalAlignment = 0; //0=Left, 1=Centre, 2=Right table.AddCell(btm1); table.AddCell(""); table.AddCell("SubTotal:"); table.AddCell(tbdiscount);

doc1.Add(table); doc1.Close(); String temppath = "Payment_Receipt/" + receiptID + ".pdf";

Response.Write(string.Format("window.open('{0}','_blank');", temppath)); } }

Diagram 4.2.5 Generate Bill Code Behind Diagram 4.2.5 shows the code that use to generate Bill to customer upon request. The generate Bill code will be using the iTextSharp Library to create a PDF and append the information into the PDF created. After that, the created Bill PDF will be opened by using the Response.Write code.

Project

133

Online Restaurant Management System

Chapter 4 : Programming

PayPal API Code Behind protected void paypal_transaction() { string redirecturl = ""; redirecturl += "https://www.sandbox.paypal.com/cgibin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString(); redirecturl += "&item_name= ORMS Payment"; redirecturl += "&amount=" + txtTotalAmount.Text; redirecturl += "¤cy_code=MYR"; redirecturl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString(); redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString(); Response.Redirect(redirecturl); } WebConfig

Diagram 4.2.6 PayPal API This code shows the PayPal API which allows the customer of the restaurant to carry out payment through PayPal. In order to use PayPal API, we required to add the code above in the Web Config file. When the PayPal method is selected, it will redirect to the PayPal Payment page with the information included in the Redirect URL. In order to redirect back to the system from PayPal Payment Page, it will be control of the code added in appSettings (Failed URL/SuccessURL).

Project

134

Online Restaurant Management System

Chapter 4 : Programming

Preview Report Code Behind private void preview() { int count = 0; string reportPath = "", sql = "", spath = ""; ReportDocument staffReport; staffReport = new ReportDocument(); reportPath = Server.MapPath("~/Report/CrystalReport1.rpt"); string type = ddlType.Text; if (type.Equals("Member Registration Report")) { if (txtfromdate.Text.Length < 1 || txttodate.Text.Length < 1) { Response.Write(@"alert('Please specify from & to date');"); } else { String date1 = txtfromdate.Text; String date2 = txttodate.Text; DateTime fromdate = Convert.ToDateTime(date1); DateTime todate = Convert.ToDateTime(date2); int result = DateTime.Compare(fromdate, todate); if (result > 0) { Response.Write(@"alert('ToDate cannot greater than FromDate!');"); } else { spath = "~/Report/MemberRegistrationReport.pdf"; reportPath = Server.MapPath("~/Report/MemRegistration.rpt"); sql = "SELECT m.UserName,m.Name, m.Phone, m.Email FROM Member m WHERE m.ValidStatus='Valid' AND (DateJoined >= ' " + date1 + "') AND (DateJoined = ' " + date1 + "') AND (DateJoined
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF