Friday, April 5, 2019

Puff And Fresh Restaurant Billing System Computer Science Essay

gust And Fresh eatery flush schema Computer Science Essay poove and Fresh is a popular Restaurant where a large spot of Customers Visited. It is very important to have a successful electric cleaning womange carcass for the Restaurant. before long the Restaurant has manual flush constitution which has m any faults when maintain the Bills. Therefore it is good to maintain a computerize system to reduce the errors and to reduce the tiresome guardianship system.This living contains information on how the cathexis system has been created. Facts are discussed under the following topicsThe documentation has marchly confined the above topics and there immensity of the system. All requirements have been reasoned out and proper conclusions have been made.1. Introduction make 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 item s offered by the restaurant. bear the customer to select more than one item from the carte du jour. Calculate and crisscross the bill.It is required to go up a C++ application that could scar Menu percentage point, Price, Amount etcThe design is required to have a utilizer inter pillow slip which contains the percentagealities such as inserting number of adults and boorren. Choosing the circuit board and dressing the board. Creating the bill and chump the bill.The conduct of this assignment is to present the knowledge the students have gathered this module C ++ programming. The assignment is divided into their several(prenominal) sections, and each section has its own objectives, which are to be achieved successfully.Basic fact finding techniques have been followed and the explorative investigation has been conducted to find out the problems faced by Puff and Fresh Restaurant. The current manual billing system consists of errors mentioned beneath.Puff and fresh ha s daily customers. The Bills are stored in files and when the administration needs to access a particular bill, they have to manu exclusivelyy go through the files and find it. This is often time consuming and locoweed be a tiresome problem.Maintaining records in files over account details require a deal 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 informations. This is an additive cost. And also the ottoman 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 disposed(p) 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 charrm 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 measure of adults. This reduces the wrench of the staff by preventing manual en take heed of the number and so it prevents errors.Entering no of childrens 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 straddles this program can identify the betoken orders without any errors.The system is word of honor protected and the users have to take down a news to log into the system. This prevents wildcat users logging into the system.4. Flowcharts and pseudo codes for the system.4.1Request discussion regionPseudo codeRequest Password ()Char passwordChar destroy PasswordOpen file passwordRead from file passwordStruct target user id chump passwordGet introduce enter idGet input enter passwordIf enter id and password = id and password is true thenPrint user authenticated press enter to login the programElsePrint no such login information you entered user id of password invalid enchant try again supplant ifClose fileWhileEnter user id and password = administrator, passwordEnd while pass by4.2 Printing main menuPseudo codeMeals ()Print welcome to puff and fresh breakfast billing systemPrint item no menu item bellPrint 1 puff 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 deplume Rs25.00Print 7 plain tea Rs10.00Print 8 c offee 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 want to enter more orders (Y/N)Get input y or nIf stimulant 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 scratch please enter your ordersElsePrint puff and fresh billing systemPrint adults/children amount entiretyPrint would you like to continue (y/n)? IfInput get yReturnMain menuElseExit5. Header files used in the program.include//for input and output depository libraryinclude// for string data typesinclude//for search and classification (standerd library)include//for mathematicsinclude// for string data typesinclude// for header files console input/outputs5.1 User defined leans used in the the program forkedd price10 = 65.00 , 15.00 , 18.50 , 10.50 , 30.00 , 25.00 , 10.00 , 15.00 , 20.00 , 22.50 //prices of the items triplex mealTaxPrices10 // prices of the tax prices of the mealsint adultNumber,childNumber// number of adults and childernvoid suckerMeals()// fuction to strike the mealsvoid orderMeals()// function to order the mealsdouble orderForAdult()// function to order for adultsdouble orderForChildren()// function to order for childernvoid get_password()// function to ge t the password tranquil struct account accounts = //user names and passwords 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 chumpMeals()// fuction to yarn-dye the mealsvoid orderMeals()// function to order the mealsdouble orderForAdult()// function to order for adultsdouble orderForChildren()// function to order for childernvoid ge t_password()// function to get the password//arrays for the passworddefine FIELD_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 correctint ifor ( i = 0 i if ( stricmp ( uid, accountsi.id ) == 0 strcmp ( pwd, accountsi.password ) ==0 )return 1return 0void get_password ( char *pwd, int size )//function to get the paswwordsint i = 0int chwhile ( i if ( ch == b ) if ( i = 0 ) writef ( b%cb, )ielse putchar ( * )pwdi++ = (char)chpwdi = int main ()//fucntion to mainsystem (cls)//to clear the screensystem ( seeming 0c)//This function help to change color in manage promptchar uidFIELD_SIZEchar pwdFIELD_SIZE//print the Loginprintf(t -n)//print this get outprintf(t ********** Welcome to Puff and Fresh Restaurant **********n)//print this terminationprintf(t -nnnn)//print this dividing debateprintf(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 willing 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 resolution = 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)//i n 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 to a lower place 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, give the sackprintf( tt**** ORDER 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)//print 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 bill anfter discountprintf( t No 234, peradeniya road, Kandy. Tel- 081-2345678nn)//print this linedouble orderForAdult() //fuction to print orders for adultint menuchoice,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,menu excerption)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 += totalAllPers on + totalPerPerson//arithmetictotalPerPerson = 0.0response = yreturn totalAllPerson + ((totalAllPerson * tax) / 100)//arithmeticdouble 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 based systemThe program is easy to learn.Developing or modifying code is much easier and fasterRestricted to a special number of usersYou can have a fully functional and the user interface elements are kinda powerful.Improved securityDisadvantages of Puff and Fresh billing systemTake time to implement catchy to use in non-Windows environments.Viruses can infect.8. Data dictionaryVariable nameData type commentaryaccountstructThe struct assigned to the accountsUser idcharVariable to hold the passwordpasswordcharThe shifting holding the value for the nourish passwordNo of adultsCharThe variable holding the value for the confirm number of adultsNo of childrencharThe variable holding the value for the confirm number of childrenpaymentdoubleThe 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. run cases of the system.Checking the User ID and Password evidenceTest sheathExpected OutcomeActualOutcome1.1 attribute in an incorrect User ID ill-considered delusion contentedness displayed actus reus substance displayed1.2Type in the correct Password.Erroneous fallacy 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 th e system message displayed1.6Type in an correct PasswordNormalLogging into the system message displayedLogging into the system message displayedSelecting 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 sentence structure errors, semantic errors and compiling errors. Such as when we misspelled a word it beco mes a syntax error. For modelling u can see below screenshot.If there is an error in logic it becomes a logical error. When we compile the chord the compiling chord show the error. You can see an example below.(A logical error)11. RecommendationsImplementing a security system to allow access to only authorized personals.Take veritable(a) backups of all the fraud 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. constrain the passwords updated that is the users should change their passwords on a regular basis.Install Malware and spywar e guards to protect the system from being hacked.12. ConclusionThe documentation includes all necessary information on the structure and the coding of the program created for Puff and Fresh Billing system. Creating the program was an overwhelming task that required a lot of analyzing, research work and personal skills. Below is a list of problems that had to be faced while creating the program.Understanding the problem and coming up with the just about 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 finding solutions to cut through 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 c reating them.Above problems have been successfully analyzed and correct solutions have been given in this assignment.Creating this report had been a great experience 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.Alternative 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 2 010, Viewed on 25th of August 2008, http//www.daniweb.com/forums/thread141983.htmlExperts Exchange LLC 2009, viewed on 18th of August 2010, http//www.expertsexchange.com/Programming/Languages/CPP/Q_2163.htmlAbout, Inc. About and About.com,2010, viewed on twenty-fourth 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