Disclaimer: This essay is provided as an example of work produced by students studying towards a computer science degree, it is not illustrative of the work produced by our in-house experts. Click here for sample essays written by our professional writers.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.

Puff And Fresh Restaurant Billing System Computer Science Essay

Paper Type: Free Essay Subject: Computer Science
Wordcount: 888 words Published: 01 Jan 2015

Reference this

Puff and Fresh is a popular Restaurant where a large number of Customers Visited. It is very important to have a successful Billing system for the Restaurant. Currently the Restaurant has manual billing system which has many faults when maintain the Bills. Therefore it is good to maintain a computerize system to reduce the errors and to reduce the tiresome Billing system.

This documentation contains information on how the Billing system has been created. Facts are discussed under the following topics:

The documentation has clearly defined the above topics and there importance of the system. All requirements have been reasoned out and proper conclusions have been made.

1. Introduction

Puff and Fresh is a Restaurant. At present Puff and Fresh maintain manual Billing system and they need a computerize approach to maintain Bills. Puff and Fresh shows the customer the different breakfast items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and Print the bill….

It is required to develop a C++ application that could Print Menu Item, Price, Amount etc……The program is needed to have a user interface which contains the functionalities such as inserting number of adults and children. Choosing the menu and ordering the menu. Creating the bill and print the bill.

The aim of this assignment is to present the knowledge the students have gathered this module; ‘C ++ programming’. The assignment is divided into their respective sections, and each section has its own objectives, which are to be achieved successfully.

Basic fact finding techniques have been followed and the preliminary investigation has been conducted to find out the problems faced by Puff and Fresh Restaurant. The current manual billing system consists of errors mentioned below.

Puff and fresh has daily customers. The Bills are stored in files and when the administration needs to access a particular bill, they have to manually go through the files and find it. This is often time consuming and can be a tiresome task.

Maintaining records in files over account details require a lot of space and those records may be damaged or misused due to the poor security measures the Restaurant has taken.

Since there are a lot of files to be handled, Puff and fresh has needed to handle accounts information’s. This is an additional cost. And also the puff and fresh has to spend on paper and other stationary that are needed to store the billing system.

A full feasibility study has been conducted and its results show that a computerized system for Puff and fresh is economically, legally and technically feasible to implement.

3. Solution for the problem.

The preliminary investigation has given a clear idea about the problem the Puff and Fresh is currently facing. It is clear that the Restaurant needs a computerized system to run and manage the Bill process.

Prototyping life cycle model been chosen as the appropriate life cycle model to be used to implement the system. Results from the E-R diagrams and the data flow diagrams have given an idea about the entities and their relationships.

The new computerized system has been designed and created in a manner to solve all the problems the Restaurant is currently facing.

Entering no of adults: The computerized system is created to identify the amount of adults. This reduces the work of the staff by preventing manual entry of the number and so it prevents errors.

Entering no of children’s: The computerized system is created to identify the amount of children’s. This reduces the work of the staff by preventing manual entry of the number and so it prevents errors.

Requesting orders: this program can identify the request orders without any errors.

The system is password protected and the users have to enter a password to log into the system. This prevents unauthorized users logging into the system.

4. Flowcharts and pseudo codes for the system.

4.1Request Password function

Pseudo code

Request Password ()

Char password

Char enter Password

Open file “password”

Read from file password

Struct

Print “user id”

Print “password”

Get input enter id

Get input enter password

If enter id and password = id and password is true then

Print “user authenticated press enter to login the program”

Else

Print “no such login information you entered user id of password invalid please try again…”

End if

Close file

While

Enter user id and password! = administrator, password

End while

Return

4.2 Printing main menu

Pseudo code

Meals ()

Print “welcome to puff and fresh breakfast billing system”

Print “item no” “menu item” “price”

Print “1 string hoppers Rs65.00”

Print “2 egg sandwich Rs15.00”

Print “3 thosai with chutney Rs18.50”

Print “4 parata Rs10.50”

Print “5 sausage bun Rs30.00”

Print “6 fish roll Rs25.00”

Print “7 plain tea Rs10.00”

Print “8 coffee Rs15.00”

Print “9 tea Rs20.00”

Print “10 fruit juice Rs22.50”

End

4.3 Main menu

Pseudo code

Meals ()

Print “welcome to puff and fresh breakfast billing system”

Print “item no” “menu item” “price”

Print “1 string hoppers Rs65.00”

Print “2 egg sandwich Rs15.00”

Print “3 thosai with chutney Rs18.50”

Print “4 parata Rs10.50”

Print “5 sausage bun Rs30.00”

Print “6 fish roll Rs25.00”

Print “7 plain tea Rs10.00”

Print “8 coffee Rs15.00”

Print “9 tea Rs20.00”

Print “10 fruit juice Rs22.50”

Do while

Print “enter number of adults”

Get input number of adults

Print “enter number of children”

Get input number of children

Do while

Print “adult”

Print “please enter your orders”

Get input menu number <10

Print “please enter amount of order”

Get input amount order

Print” would you like to enter more orders (Y/N)”

Get input y or n

If

Input y

Print “please enter your orders”

Else

Print “children”

Print “please enter your orders”

Get input menu number <10

Print “please enter amount of order”

Get input amount order

Print” would you like to enter more orders (Y/N)”

Get input y or n

If input y print “please enter your orders”

Else

Print “puff and fresh billing system”

Print “adults/children amount total”

Print “would you like to continue (y/n)? “

If

Input get y

Return

Main menu

Else

Exit

5. Header files used in the program.

#include//for input and output library

#include// for string data types

#include//for search and sorting (standerd library)

#include//for mathematics

#include// for string data types

#include// for header files console input/outputs

5.1 User defined functions used in the the program

double price[10] = {65.00 , 15.00 , 18.50 , 10.50 , 30.00 , 25.00 , 10.00 , 15.00 , 20.00 , 22.50 }; //prices of the items

double mealTaxPrices[10]; // prices of the tax prices of the meals

int adultNumber,childNumber;// number of adults and childern

void printMeals();// fuction to print the meals

void orderMeals();// function to order the meals

double orderForAdult();// function to order for adults

double orderForChildren();// function to order for childern

void get_password();// function to get the password

static struct account accounts[] = { //user names and passwords of the program

void get_password ( char *pwd, int size )//function to get the paswwords

int main ()//fucntion to main

6. Coding of the Puff and fresh Billing System

// +++++++++++++ Puff and Fresh billing System ++++++++++++

#include//for input and output library

#include// for string data types

#include//for search and sorting (standerd library)

#include//for mathematics

#include// for string data types

#include// for header files console input/outputs

// Declaring Functions

double price[10] = {65.00 , 15.00 , 18.50 , 10.50 , 30.00 , 25.00 , 10.00 , 15.00 , 20.00 , 22.50 }; //prices of the items

double mealTaxPrices[10]; // prices of the tax prices of the meals

int adultNumber,childNumber;// number of adults and childern

void printMeals();// fuction to print the meals

void orderMeals();// function to order the meals

double orderForAdult();// function to order for adults

double orderForChildren();// function to order for childern

void get_password();// function to get the password

//arrays for the password

#define FIELD_SIZE 25

#define length(array) ( sizeof (array) / sizeof (array)[i] )

struct account {

char *id;

char *password;

};

static struct account accounts[] = { //user names and passwords of the program

{ “Administrator”, “password” },

{ “Tuwan”, “icbt” }

};

int is_authorized ( const char *uid, const char *pwd )//password is correct

{

int i;

for ( i = 0; i < length ( accounts ); i++ ) {

if ( stricmp ( uid, accounts[i].id ) == 0 &&

strcmp ( pwd, accounts[i].password ) ==0 )

{

return 1;

}

}

return 0;

}

void get_password ( char *pwd, int size )//function to get the paswwords

{

int i = 0;

int ch;

while ( i < size – 1 && ( ch = getch() ) != ‘r’ ) {

if ( ch == ‘b’ ) {

if ( i != 0 ) {

printf ( “b%cb”, ‘ ‘ );

–i;

}

}

else {

putchar ( ‘*’ );

pwd[i++] = (char)ch;

}

}

pwd[i] = ‘

Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this essay and no longer wish to have your work published on UKEssays.com then please click the following link to email our support team:

Request essay removal

Related Services

Our academic writing and marking services can help you!

Prices from

£99

Approximate costs for:

  • Undergraduate 2:2
  • 1000 words
  • 7 day delivery

Order an Essay

Related Lectures

Study for free with our range of university lecture notes!

Academic Knowledge Logo

Freelance Writing Jobs

Looking for a flexible role?
Do you have a 2:1 degree or higher?

Apply Today!