CCN2042 18-19 Semester 2 – Group Project 1CCN2042 Computer ProgrammingGroup Project – Cooking Game(Due: 23:59, 18 Apr 2019 (week 12 before Easter))Expected Learning Outcomes familiarise themselves with at least one high level language programming environment. develop a structured and documented computer program.understand the fundamentals of object-oriented programming and apply it in computerprogram development. apply the computer programming techniques to solve practical problems.IntroductionIn this assignment, you are going to develop the Cooking Game, a game that runs in thecommand line environment. The player needs to rapidly prepare and serve the burgers withina time limit.This is a group assignment. You need to form a group with 5 to 6 students and write aWin32 Console Application program called CookGame.cpp. The requirements are listedbelow.System RequirementsR0 When the program starts, the console should display a welcome message, and thenthe Game Menu of the program. User can enter the options of the correspondingactions (see R1 to R6 below).Welcome Message designed by your group*** Game Menu ***[1] Start Game[2] Settings[3] Burger Menus[4] Instructions[5] Credits[6] Exit*****************Option (1 - 6): CCN2042 18-19 Semester 2 – Group Project 2R1 [1] Start Game When the user inputs 1 in the Game Menu, the game starts with the current gamesettings (see R2). Initially, the order list will be shown in the console. Each order contains the followinginformation:1. Type of burgers (See R1.2)2. Cooking status (See R1.3)3. Remaining time (in form of m’ss”) The initial number of orders will be randomly generated, and limited to the maxnumber of order set in the game settings. All the burgers’ initial status is preparing, and the remaining time is 40 seconds(time limit can be set in the game settings, see R2). The initial score is 10. A sample game starts as follow, where the order list is randomly generated:*** Order list ***Order #1: Cheese burger, preparing, 0’40”Order #2: Beef burger, preparing, 0’40”Order #3: Cheese burger, preparing, 0’40”Order #4: mushroom burger, preparing, 0’40”Order #5: salmon burger, preparing, 0’40”-----------------------------------------------Score: 10Enter [U] for update, [Q] for Quit, or [1-5] for order: Player can input the order number to process the order. Player can input ‘u’ or ‘U’ to refresh the order list for updating the information (i.e.cooking status and remaining time) of all orders. Player can input ‘q’ or ‘Q’ to quit the current game and return to the game menu.R1.1 Order list The orders will be shown with the type of burgers, cooking status and the remainingtime. The order list may not be in chronological order, such as:Order #1: Cheese burger, preparing, 040Order #2: Beef burger, cooking, 035Order #3: Cheese burger, cooking, 020Order #4: mushroom burger, ready to serve, 009Order #5: salmon burger, preparing, 038Order #6: salmon burger, preparing, 040 CCN2042 18-19 Semester 2 – Group Project 3R1.2 Type of burgers There are five types of burgers with different ingredients in a specific order anddifferent cooking time (in second):Type of burgers Ingredients orders Cooking timeCheese burger Bread, cheese, beef, lettuce, bread 10Beef burger Bread, cheese, tomato, beef, lettuce, bread 10Mushroom burger Bread, cheese, beef, mushroom, bread 15Veggie burger Bread, tomato, egg, lettuce, bread 10Salmon burger Bread, cheese, beef, salmon, bread 15 There are eight types of ingredients, symbols are shown as follow:Ingredients Symbol Ingredients SymbolBread B/b Tomato T/tCheese C/c Mushroom M/mBeef F/f Egg E/eLettuce L/l Salmon S/sR1.3 Cooking StatusEach burger has to go through 3 statuses to complete: preparing, cooking andready to serve.Status: preparing The initial status of a burger is preparing. Player can input the order number to choose the order with status preparing.Then the “Process Order” page will be shown, for example:*** Process Order ***Order # : 1Burger : Cheese BurgerStatus : preparingRemaining Time : 153Burger Ingredient List: [B]read, [C]heese, Bee[f], [L]ettuce, [B]readBurger Key List : bcflbPlease choose [U] for update, [R] for return, ortype correct key list to start cooking: Player can input ‘u’ or ‘U’ to refresh the remaining time of the order. Player can input ‘r’ or ‘R’ to return to the order list. Player needs to type the correct order of ingredient symbols as specified in R1.2. Forexample, cheese burger as shown above, player needs to input: bcflbCCN2042 18-19 Semester 2 – Group Project 4 If the input is incorrect, an error message is displayed. Then the “Process Order”page is refreshed with updated remaining time. And the player needs to input again. If the input is correct, the system returns to the order list. The status of that order ischanged to cooking. Player can continue to choose other orders to process.Status: cooking When the burger is in the cooking status, the player has to wait until it is done.Concurrently, the player can choose other order to process. If the player chooses the order with status cooking, message should be promptedto the player to let him/her know that the burger is not yet done. Each burger needs to be cooked with the cooking time specified in R1.2. For example,cheese burger needs to be cooked for 10 seconds. If the burger is cooked, the status of the burger will be changed from cooking toready to serve.Status: ready to serve Player can choose the order with status ready to serve. Then the burger will be served and the order will be removed from the order list. 10marks will be awarded.R1.4 Time limit There is a time limit for each order, which is the same for all types of burger and canbe set in the game settings (see R2). The orders need to be served before the time limit is reached. The remaining time shown in the order list will be updated every time the order list isrefreshed, e.g. player inputs ‘u’ or ‘U’ to update the order list, an order is served, orthe program returns from the “process order” page. If the player failed to serve the burger within the time limit, the order will be removedfrom the order list. 5 marks will be deducted.R1.5 New order generation New orders (can be more than one order) may be added to the order list whenever theorder list is refreshed, e.g. player inputs ‘u’ or ‘U’ to update the order list, an order isserved, or the program returns from the “process order” page. New orders are generated randomly with a certain probability (upon your design). CCN2042 18-19 Semester 2 – Group Project 5R1.6 Game rules / Scoring When the game starts, the player will initially have 10 marks. If the order is served on time, 10 marks will be awarded. When the order cannot be served within theCCN2042作业代写、R编程设计作业代写、代做R实验作业、代做Computer Programming作业 帮做Has time limit, 5 marks will be deducted. The game finishes when the score the player, and the program returns to the Game Menu.R1.7 Quit the gamePlayer can input ‘q’ or ‘Q’ in the order list page to quit the game. If this happens, thesystem should prompt for player’s confirmation. If the player inputs ‘y’ or ‘Y’, thegame ends and the system returns to the Game Menu. If the player inputs ‘n’ or ‘N’,the game continues at its current status. Other input is not acceptable and the systemshould ask the player to confirm again.R2 [2] SettingsWhen the user inputs 2 in the Game Menu, the console displays the Settings Menuwith current setting. User can enter the options of the corresponding actions (see R2.1to R2.3 below).*** Settings Menu ***[1] Time limit [40 sec][2] Max number of orders [5][3] Return to Game Menu*********************Option (1 - 3):After each setting is done, the system should remain at the Setting Menu until the userchooses option 3 to return.R2.1 [1] Time limit (default: 40 seconds)When the user inputs 1 in the Settings Menu, the console displays the current gamesetting of time limit for the orders, and prompts for the user input of the new value.Note that the time limit is in the unit of second and should not be greater than 300seconds (5 mins).After the setting is updated, the new setting should be displayed and the systemreturns to the Settings Menu. CCN2042 18-19 Semester 2 – Group Project 6R2.2 [2] Max number of orders (default: 5 orders)When the user inputs 2 in the Settings Menu, the console displays the current gamesetting of the max number of order, and prompts for the user input of the new value.Note that acceptable max number of order is 1 to 50.After the setting is updated, the new setting should be displayed and the systemreturns to the Settings Menu.R2.3 [3] Return to Game MenuWhen the user inputs 3 in the Settings Menu, the system returns to the Game Menu.R3 [3] Burger MenuWhen the user inputs 3 in the Game Menu, the console displays the Burger Menu.User can enter the options of the corresponding actions (see R3.1 to R3.3 below).**** Burger Menu *****[1] Types of Burger[2] Ingredient Symbols[3] Return to Game Menu*********************Option (1 - 3):After a particular information is displayed, the system should remain at the BurgerMenu until the user chooses option 3 to return.R3.1 [1] Types of BurgerDisplay all types of burger, their ingredients and the cooking time (see R1.2). Thenthe system returns to the Burger Menu.R3.2 [2] Ingredient SymbolsDisplay all ingredients and the corresponding symbols (see R1.2). Then the systemreturns to the Burger Menu.R3.3 [3] Return to Game MenuWhen the user inputs 3 in the Burgers Menu, the system returns to the Game Menu. CCN2042 18-19 Semester 2 – Group Project 7R4 [4] InstructionsThe system displays the instructions for playing the Cooking game. After displayingthe instruction, the system returns to the Game Menu.R5 [5] CreditsThe system displays the personal particulars (e.g. student name, student ID, class,tutorial group, etc.) of the group members. After displaying the information, thesystem returns to the Game Menu.R6 [6] ExitWhen the user inputs this option, the system prompts for user’s confirmation. If theuser inputs ‘y’ or ‘Y’, the program terminates. If the user inputs ‘n’ or ‘N’, the systemreturns to the Game Menu. Other input is not acceptable and the system should askthe user to confirm again.Other General RequirementsR7 Meaningful guidelines should be printed to assist with user’s input. Whenever anoption is selected, meaningful messages should be displayed.R8 Suitable checking on user’s input is expected. Appropriate error messages should beprinted whenever unexpected situation happens, e.g., invalid input, input out-of-range,etc.R9 The use of functions (in addition to main function) and classes are expected in yourprogram. Appropriate comments should be added in your source code file.R10 Creativity and Critical Thinking: other features that you find useful (such as the“intelligence of computer player”) or can enhance the user experience can also beimplemented.SubmissionSource File: Each group has to submit one source code file (i.e., CookGame.cpp) thatimplements this group project.Peer-to-peer Evaluation: Each student has to fill in and submit the peer-to-peer evaluationform (i.e., CCN2042_P2P_Evaluation.docx) for your group. CCN2042 18-19 Semester 2 – Group Project 8All submission should be done through Moodle by 23:59, 18 April 2019. Late submission issubject to 20% deduction in your final marks for each day (including public holidays andSundays). No late submission is allowed 4 days after the due date.Grading criteriaAspects PercentageProgram correctness(Follow ALL instructions, marks deduction on errors found)70%Program design(Appropriate use of functions, use of class, modularity, etc.)10%Program standard(Use of variable names, indentation, line spacing, clarity, comments, etc.)5%Algorithm design(Use of reasonable algorithms and data structures)5%User-friendliness(Clear guidelines to users, messages to users, etc.)5%Creativity and critical thinking(Additional useful features)5%Total (Group Mark) 100% (max)Note: the length of your program does not affect the grading of the assignment. However,appropriate use of loops and functions are expected to avoid too many repeated codes in yourprogram, which contributes to the program design score of this assignment.Individual mark is determined by both group mark (80%) and individual contribution (20%),where individual contribution is directly proportion to the average marks given by groupmembers in the peer-to-peer evaluation form.Marks deductionMarks will be deducted if the program fails to be compiled. The deduction is from 5 to 20marks, depending on how serious the syntax error is. Note that if the program containsunacceptably too many serious syntax errors, your program will score 0 marks.Syntax errors also lead to failure in the program correctness if the function cannot be tested.So please make sure that your program can be compiled successfully before your submission. CCN2042 18-19 Semester 2 – Group Project 9TipsTo refresh the console screen, you may use the following windows platform commandappropriately in your program:system(cls); // Clear everything on the screensystem(pause); // Wait until user pressing any key to continueTo handle unexpected input error (e.g. input a character to an integer variable), you may usethe following code appropriately in your program:cin.ignore(); // Discard the content in the input sequencecin.clear(); // Reset the input error status to no error** Ensure the originality of your work. Plagiarism in any form is highly prohibited. **- End -转自:http://www.7daixie.com/2019041550451908.html