.

Wednesday, June 5, 2019

Puff And Fresh Restaurant Billing System Computer Science Essay

Puff And Fresh eating ho office apexing System Computer Science EssayPuff and Fresh is a popular Restaurant where a large yield of Customers Visited. It is very important to deem a successful Billing frame for the Restaurant. Currently the Restaurant has manual electric womanhoodge placement which has many faults when maintain the Bills. Therefore it is good to maintain a computerize system to reduce the faultings 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 topicsThe documentation has gainly defined the above topics and there importance of the system. All requirements waste been reas wholenessd out(a) and proper conclusions throw been made.1. IntroductionPuff and Fresh is a Restaurant. At present Puff and Fresh maintain manual Billing system and they make a computerize approach to maintain Bills. Puff and Fresh shows the customer the different breakf ast items offered by the restaurant. Allow the customer to select much than one item from the menu. Calculate and bell ringer the bill.It is required to develop a C++ application that could Print Menu Item, Price, Amount etcThe program is needed to pick out a drug user interface which contains the functionalities such as inserting image of adults and barbarianren. Choosing the menu and gradeing the menu. Creating the bill and move 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 success adequatey.Basic fact decision 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 refreshed has day-after-day customers. The Bil ls are stored in file cabinets 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 consume and suffer be a tiresome task.Maintaining records in files over account details require a lot of space and those records may be dishonored or misused due to the poor security measures the Restaurant has taken.Since there are a lot of files to be carry ond, Puff and fresh has needed to handle accounts informations. 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 action.3. Solution for the problem.The preliminary investigation has granted a clear idea about the problem the Puff and Fresh is currently facing. It is clear that the Restaurant needs a co mputerized 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 tote up of adults. This reduces the work of the staff by preventing manual entry of the number and so it prevents errors.Entering no of peasantrens The computerized system is created to identify the amount of childrens. 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 news defend and the users have to reckon a password to log into the system. This prev ents unauthorized users logging into the system.4. Flow coalts and pseudo codes for the system.4.1Request give-and-take functionPseudo codeRequest Password () fair sex passwordChar enter PasswordOpen file passwordRead from file passwordStructPrint user idPrint password model introduce enter id discover input enter passwordIf enter id and password = id and password is true thenPrint user authenticated wring enter to login the programElsePrint no such login information you entered user id of password invalid please try againEnd ifClose fileWhileEnter user id and password = administrator, passwordEnd whileReturn4.2 Printing main menuPseudo codeMeals ()Print pleasant to puff and fresh breakfast billing systemPrint item no menu item pricePrint 1 string hoppers Rs65.00Print 2 egg sandwich Rs15.00Print 3 thosai with chutney Rs18.50Print 4 parata Rs10.50Print 5 sausage bun Rs30.00Print 6 slant roll Rs25.00Print 7 plain tea Rs10.00Print 8 coffee tree Rs15.00Print 9 tea Rs20.00Print 10 fruit juice Rs22.50End4.3 Main menuPseudo codeMeals ()Print welcome to puff and fresh breakfast billing systemPrint item no menu item pricePrint 1 string hoppers Rs65.00Print 2 egg sandwich Rs15.00Print 3 thosai with chutney Rs18.50Print 4 parata Rs10.50Print 5 sausage bun Rs30.00Print 6 fish roll Rs25.00Print 7 plain tea Rs10.00Print 8 coffee Rs15.00Print 9 tea Rs20.00Print 10 fruit juice Rs22.50Do whilePrint enter number of adultsGet input number of adultsPrint enter number of childrenGet input number of childrenDo whilePrint adultPrint please enter your ordersGet input menu number Print please enter amount of orderGet input amount orderPrint would you like to enter more orders (Y/N)Get input y or nIfInput yPrint please enter your ordersElsePrint childrenPrint please enter your ordersGet input menu number Print please enter amount of orderGet input amount orderPrint would you like to enter more orders (Y/N)Get input y or nIf input y scar please enter your ordersElsePrint puff a nd fresh billing systemPrint adults/children amount totalPrint would you like to continue (y/n)? IfInput get yReturnMain menuElseExit5. mind files used in the program. hold//for input and output libraryinclude// for string data typesinclude//for look and sorting (standerd library)include//for mathematicsinclude// for string data typesinclude// for header files console input/outputs5.1 User defined functions used in the the program retell price10 = 65.00 , 15.00 , 18.50 , 10.50 , 30.00 , 25.00 , 10.00 , 15.00 , 20.00 , 22.50 //prices of the itemsdouble mealTaxPrices10 // prices of the tax prices of the mealsint adultNumber,childNumber// number of adults and childern unfilled scoreMeals()// fuction to release the mealsvoid orderMeals()// function to order the mealsdouble orderFor braggy()// function to order for adultsdouble orderForChildren()// function to order for childernvoid get_password()// function to get the passwordstatic struct account accounts = //user names and passw ords of the programvoid get_password ( char *pwd, int size )//function to get the paswwordsint main ()//fucntion to main6. Coding of the Puff and fresh Billing System// +++++++++++++ Puff and Fresh billing System ++++++++++++include//for input and output libraryinclude// for string data typesinclude//for search and sorting (standerd library)include//for mathematicsinclude// for string data typesinclude// for header files console input/outputs// Declaring Functionsdouble price10 = 65.00 , 15.00 , 18.50 , 10.50 , 30.00 , 25.00 , 10.00 , 15.00 , 20.00 , 22.50 //prices of the itemsdouble mealTaxPrices10 // prices of the tax prices of the mealsint adultNumber,childNumber// number of adults and childernvoid signMeals()// fuction to print the mealsvoid orderMeals()// function to order the mealsdouble orderForAdult()// function to order for adultsdouble orderForChildren()// function to order for childernvoid get_password()// function to get the password//arrays for the passworddefine FIE LD_SIZE 25define length(array) ( sizeof (array) / sizeof (array)i )struct account char *idchar *passwordstatic 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 arrangeint ifor ( i = 0 i if ( stricmp ( uid, accountsi.id ) == 0 strcmp ( pwd, accountsi.password ) ==0 ) interpret 1return 0void get_password ( char *pwd, int size )//function to get the paswwordsint i = 0int chwhile ( i if ( ch == b ) if ( i = 0 ) printf ( b%cb, )ielse putchar ( * )pwdi++ = (char)chpwdi = int main ()//fucntion to mainsystem (cls)//to clear the screensystem (color 0c)//This function help to change color in command promptchar uidFIELD_SIZEchar pwdFIELD_SIZE//print the Loginprintf(t -n)//print this accountprintf(t ********** acceptable to Puff and Fresh Restaurant **********n)//print this lineprintf(t -nnnn)//print this lineprintf(Login by keying in your details below -nn)//print this lineprintf ( User ID )//print this linefflush ( stdout )if ( fgets ( uid, sizeof uid, stdin ) = NULL ) char *newline = strchr ( uid, n )if ( newline = NULL )*newline = printf ( Password )//print this linefflush ( stdout )get_password ( pwd, sizeof pwd )if ( is_authorized ( uid, pwd ) )//If entered the correct data then this meseage will display.printf(nnt n)else//If entered wrong then this error meseage will display and exit.printf(nnttt)printf(nntn)system(pause)return main ()getchar()printMeals()char response = y//print this in the main menu asking number of adults and number of chilrdrenprintMeals()while(response == y response == Y)printf( please enter number of adults )//print this linescanf(%d,adultNumber)printf( please enter number of children)//print this linescanf(%d,childNumber)orderMeals()printf(n would you like to continue(y/n))//print this linescanf(n%c,response)//in the bill this will printprintf(n ******************** THANK YOU FOR COMING *********************** *n)//print this lineprintf( 20********************** PLEASE VISIT US NEXT TIME **************************20 n)//print this linesystem(pause)return 0void printMeals()//fuction to print mealschar codesystem(cls)//to clear the screensystem (color f3)//This function help to change color in command promptprintf( Puff and fresh Copyright (C)2010 Tuwan.nn) //print this lineprintf( 20=======================================================================20n) //print this lineprintf( 20********************* WELCOME TO PUFF AND FRESH ***********************20n) //print this lineprintf( 20********************* Breakfast Billing System ***********************20n) //print this lineprintf( 20=======================================================================20nnn) //print this lineprintf( tt Below is the menue20nn) //print this lineprintf( tt Item NotMenu ItemttPricen) //print this lineprintf( tt 22*******************************22nn) //print this lineprintf( tt 1- tString HoppersttRs.65.50n) //print this lineprintf( tt 2-ttEgg SandwitchttRs.15.00n) //print this lineprintf( tt 3- tThosai with ChutneytRs.18.50n) //print this lineprintf( tt 4- tParatatttRs.10.50n) //print this lineprintf( tt 5- tSausages BunttRs.30.00n) //print this lineprintf( tt 6- tFish RollttRs.25.00n) //print this lineprintf( tt 7- tPlain TeattRs.10.00n) //print this lineprintf( tt 8- tCoffeetttRs.15.00n) //print this lineprintf( tt 9- tTeatttRs.20.00n)//print this lineprintf( tt 10- tFruit JuicettRs.22.50n)//print this lineprintf(n)void orderMeals() //function to print order mealsdouble totalPriceForAdult, totalPriceForChildrendouble allPayment,discountprintf( tt**** aim MENUE****n) //print this linetotalPriceForAdult = orderForAdult()totalPriceForChildren = orderForChildren()allPayment = totalPriceForAdult + totalPriceForChildren system(cls)//to clear the screensystem (color f4)//This function help to change color in command promptprintf(t 20==================================================20)//p rint this lineprintf(n tt 22****** WELCOME TO PUFF AND FRESH ******22 n)//print this lineprintf( tt*********** Breakfast Billing System ************ n)//print this lineprintf( t 20=============================================================20nn)//print this lineprintf( ttAdult/ChildttAmountttTotal Pricen)//print this lineprintf( ttadultsttt%dtt%5.2fn,adultNumber,totalPriceForAdult)//print adult amount and the price of the adultprintf( ttchildrentt%dtt%5.2fn,childNumber,totalPriceForChildren)//print child amount and the price of the childprintf( ttTotal billtttt%5.2fn,allPayment )//print the toal bill//arithmetic of the billif(allPayment discount=((allPayment * 0.5)/100)else if(allPayment= 10 allPaymentdiscount=((allPayment * 1)/100)else if(allPayment= 20 allPaymentdiscount=((allPayment * 1.5)/100)else if(allPayment= 30 allPaymentdiscount=((allPayment * 2.0)/100)elsediscount= ((allPayment * 5.0)/100)printf( ttTotal bill after discounttt%5.2fnn,allPayment-discount)//print total bi ll anfter discountprintf( t No 234, peradeniya road, Kandy. Tel- 081-2345678nn)//print this linedouble orderForAdult() //fuction to print orders for adultint menuOption,i,amountchar response = ydouble totalPerPerson = 0.0,totalAllPerson = 0.0double tax = 5.0if(adultNumber printf(n )elseprintf(*tadultsn)//print this linefor(i=0iprintf( adult %d please enter your ordersn,i+1)//print this linewhile(response == y response == Y)printf( please enter your option)//print this linescanf(%d,menuOption)if(menuOption10)printf( sorry we dont have this order nagain )//print this linecontinueprintf( please enter your amount of order)//print this linescanf(%d,amount)totalPerPerson = totalPerPerson + (amount * pricemenuOption 1 )//total price of a personprintf( Would you like to enter more orders(y/n))//print this linescanf(n%c,response)printf(n)totalAllPerson += totalAllPerson + totalPerPerson//arithmetictotalPerPerson = 0.0response = yreturn totalAllPerson + ((totalAllPerson * tax) / 100)//arith meticdouble orderForChildren()//fuction to print orders for childint menuOption,i,amountchar response = ydouble totalPerChild = 0.0,totalAllChildren = 0.0double tax = 5.0,oneOrderif(childNumber printf(n)elseprintf(*tChildrenn)//print this linefor(i=0iprintf( child %d please enter your ordersn,i+1)//print this linewhile(response == y response == Y)printf( please enter your option)//print this linescanf(%d,menuOption)if(menuOption10)printf( sorry we dont have this order nagain )//print this linecontinueprintf( please enter your amount of order)//print this linescanf(%d,amount)oneOrder = (pricemenuOption 1 * 60)/100 //this one order for a child with discount %60 of one order of adulttotalPerChild = totalPerChild + (amount * oneOrder) //total price of a personprintf( Would you like to enter more orders(y/n))//print this linescanf(n%c,response)totalAllChildren += totalAllChildren + totalPerChildresponse = ytotalPerChild = 0.0printf(n)return totalAllChildren + ((totalAllChildren * tax) / 100)//arithmetic//***************************************END*****************************************//7. Advantages and Disadvantages of Puff and Fresh billing systemAdvantages of Puff and Fresh billing systemIt is a Windows ground systemThe program is easy to learn.Developing or modifying code is much easier and fasterRestricted to a limited number of usersYou can have a fully functional and the user interface elements are quite powerful.Improved securityDisadvantages of Puff and Fresh billing systemTake time to implementDifficult to use in non-Windows environments.Viruses can infect.8. Data dictionaryVariable nameData typeDescriptionaccountstructThe struct assigned to the accountsUser idcharVariable to hold the passwordpasswordcharThe shifting holding the evaluate for the prove passwordNo of adultsCharThe variable holding the value for the confirm number of adultsNo of childrencharThe variable holding the value for the confirm number of children recompensedoubleThe variable holding the value of paymenttotaldoubleThe variable holding the value of totaldiscountdoubleThe variable holding the value of discounttaxdoubleThe variable holding the value of taxMenu optionIntThe variable holding the value of menu optionMealscharThe variable holding the value for the confirm meals9. rise cases of the system.Checking the User ID and PasswordTestTest emblemExpected OutcomeActualOutcome1.1Type in an incorrect User ID ill-judgedError inwardness displayedError inwardness displayed1.2Type in the correct Password.ErroneousError message displayedError message displayed1.3Type in an correctUser IDErroneousError message displayedError message displayed1.4Type in an incorrect PasswordErroneousError message displayedError message displayed1.5Type in an correctUser IDNormalLogging into the system message displayedLogging into the system message displayed1.6Type in an correct PasswordNormalLogging into the system message displayedLogging into the system message displayedSe lecting options from the Main Menu ( Entering options using main menu Adult and children)AdultTestTest TypeExpected OutcomeActualOutcome2.1Type in an incorrect option.ErroneousError message displayedError message displayed2.2Type in the correct optionNormalOption becomes available.Option becomes available.Selecting options from the Main Menu ( Entering options using main menu Adult and children)ChildrenTestTest TypeExpected OutcomeActualOutcome2.1Type in an incorrect option.ErroneousError message displayedError message displayed2.2Type in the correct optionNormalOption becomes available.Option becomes available.10. Report about the programWhen chording this program Puff and Fresh Billing system I had to face lots of difficulties like syntax errors, semantic errors and compiling errors. Such as when we misspelled a word it becomes a syntax error. For example u can hit below screenshot.If there is an error in logic it becomes a logical error. When we compile the chord the compiling c hord show the error. You can see an example below.(A logical error)11. RecommendationsImplementing a security system to allow access to only authorized individualiseds.Take regular backups of all the player records.Conducting a user training and support plan to train the staff at Puff and Fresh.Update the system in the future adding new features.Implement a system where the player can order Items online.Create a centralized database thereby the same data is accessible from any location.Security from viruses computer viruses could be a major problem therefore reliable antivirus software could be installed. This software could be updated on a regular basis and the employees should be trained to use it.Keep the passwords updated that is the users should change their passwords on a regular basis.Install Malware and spyware guards to protect the system from being hacked.12. ConclusionThe documentation includes all necessary information on the structure and the cryptography of the progr am created for Puff and Fresh Billing system. Creating the program was an overwhelming task that required a lot of analyzing, research work and personalized skills. Below is a list of problems that had to be faced while creating the program.Understanding the problem and coming up with the most suitable solutions.Using the correct logics and the coding that would work best according to the requirements.Making proper use of the data types and variables such as structs and arrays.Understanding the errors that occur when using such data types and determination solutions to overcome those errors.Creating user-defined functions and passing parameters successfully.Creating proper user interface.Creating proper messages for input and output.Understanding the situations where displaying of error messages are needed and successfully creating them.Above problems have been successfully study and correct solutions have been given in this assignment.Creating this report had been a great experi ence and a lot of facts have been learned since the required tasks have been given in a challenging manner. Tasks such as creating a system to a restaurant, needed research work as well as personal skills. Creating proper error messages was a very tiring task that consumed a lot of time. The program has been created successfully with proper error messages displaying at proper situations. secondary measures had to be taken when using arrays and enumerators to prevent run-time errors. Even though there were no logical or syntax errors, using arrays inside struct created errors with the memory and finding out those errors was a difficult task.13. Gantt chart14. ReferenceMalik, D.S, I. (1999). C++ Programming programmed Design Including Data Structures. Second Edition, Thompson Course technology, pp.269-294.DaniWeb.LLC, 2003 2010, Viewed on 25th of August 2008, http//www.daniweb.com/forums/thread141983.htmlExperts substitution LLC 2009, viewed on 18th of August 2010, http//www.experts exchange.com/Programming/Languages/CPP/Q_2163.htmlAbout, Inc. About and About.com,2010, viewed on 24th of August 2010,http//en.allexperts.com/q/C-1040/Storing-Info-Files.htmLectures tutes and notes of c++.Exhedra Solutions, Inc, 1997-2010, viewed on 24th of August 2010, http//www.planetsourcecode.com/vb/default.asp?lngWId=3Experts Exchange LLC 2010, viewed on 15th of August 2010, http//www.expertsexchange.com/Programming/Languages/CPP/Q_2163.html

No comments:

Post a Comment