CCN2042 18-19 Semester 2 – Group Project 1
CCN2042 Computer Programming
Group 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 computer
program development.
apply the computer programming techniques to solve practical problems.
Introduction
In this assignment, you are going to develop the Cooking Game, a game that runs in the
command line environment. The player needs to rapidly prepare and serve the burgers within
a time limit.

CCN2042作业代写、R编程设计作业代写、代做R实验作业、代做Computer Programming作业
This is a group assignment. You need to form a group with 5 to 6 students and write a
Win32 Console Application program called CookGame.cpp. The requirements are listed
below.
System Requirements
R0 When the program starts, the console should display a welcome message, and then
the Game Menu of the program. User can enter the options of the corresponding
actions (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 2
R1 [1] Start Game
When the user inputs 1 in the Game Menu, the game starts with the current game
settings (see R2).
Initially, the order list will be shown in the console. Each order contains the following
information:
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 max
number 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: 10
Enter [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 remaining
time. The order list may not be in chronological order, such as:
Order #1: Cheese burger, preparing, 0'40"
Order #2: Beef burger, cooking, 0'35"
Order #3: Cheese burger, cooking, 0'20"
Order #4: mushroom burger, ready to serve, 0'09"
Order #5: salmon burger, preparing, 0'38"
Order #6: salmon burger, preparing, 0'40"
CCN2042 18-19 Semester 2 – Group Project 3
R1.2 Type of burgers
There are five types of burgers with different ingredients in a specific order and
different cooking time (in second):
Type of burgers Ingredients orders Cooking time
Cheese burger Bread, cheese, beef, lettuce, bread 10
Beef burger Bread, cheese, tomato, beef, lettuce, bread 10
Mushroom burger Bread, cheese, beef, mushroom, bread 15
Veggie burger Bread, tomato, egg, lettuce, bread 10
Salmon burger Bread, cheese, beef, salmon, bread 15
There are eight types of ingredients, symbols are shown as follow:
Ingredients Symbol Ingredients Symbol
Bread B/b Tomato T/t
Cheese C/c Mushroom M/m
Beef F/f Egg E/e
Lettuce L/l Salmon S/s
R1.3 Cooking Status
Each burger has to go through 3 statuses to complete: preparing, cooking and
ready 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 # : 1
Burger : Cheese Burger
Status : preparing
Remaining Time : 1'53"
Burger Ingredient List: [B]read, [C]heese, Bee[f], [L]ettuce, [B]read
Burger Key List : bcflb
Please choose [U] for update, [R] for return, or
type 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. For
example, cheese burger as shown above, player needs to input: bcflb
CCN2042 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 is
changed 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 prompted
to 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" to
"ready 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. 10
marks 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 can
be 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 is
refreshed, e.g. player inputs ‘u’ or ‘U’ to update the order list, an order is served, or
the program returns from the “process order” page.
If the player failed to serve the burger within the time limit, the order will be removed
from 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 the
order list is refreshed, e.g. player inputs ‘u’ or ‘U’ to update the order list, an order is
served, 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 5
R1.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 the time limit, 5 marks will be deducted.
The game finishes when the score < 0. If the game finishes, the system should notice
the player, and the program returns to the Game Menu.
R1.7 Quit the game
Player can input ‘q’ or ‘Q’ in the order list page to quit the game. If this happens, the
system should prompt for player’s confirmation. If the player inputs ‘y’ or ‘Y’, the
game 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 system
should ask the player to confirm again.
R2 [2] Settings
When the user inputs 2 in the Game Menu, the console displays the Settings Menu
with current setting. User can enter the options of the corresponding actions (see R2.1
to 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 user
chooses 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 game
setting 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 300
seconds (5 mins).
After the setting is updated, the new setting should be displayed and the system
returns to the Settings Menu.
CCN2042 18-19 Semester 2 – Group Project 6
R2.2 [2] Max number of orders (default: 5 orders)
When the user inputs 2 in the Settings Menu, the console displays the current game
setting 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 system
returns to the Settings Menu.
R2.3 [3] Return to Game Menu
When the user inputs 3 in the Settings Menu, the system returns to the Game Menu.
R3 [3] Burger Menu
When 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 Burger
Menu until the user chooses option 3 to return.
R3.1 [1] Types of Burger
Display all types of burger, their ingredients and the cooking time (see R1.2). Then
the system returns to the Burger Menu.
R3.2 [2] Ingredient Symbols
Display all ingredients and the corresponding symbols (see R1.2). Then the system
returns to the Burger Menu.
R3.3 [3] Return to Game Menu
When the user inputs 3 in the Burgers Menu, the system returns to the Game Menu.
CCN2042 18-19 Semester 2 – Group Project 7
R4 [4] Instructions
The system displays the instructions for playing the Cooking game. After displaying
the instruction, the system returns to the Game Menu.
R5 [5] Credits
The system displays the personal particulars (e.g. student name, student ID, class,
tutorial group, etc.) of the group members. After displaying the information, the
system returns to the Game Menu.
R6 [6] Exit
When the user inputs this option, the system prompts for user’s confirmation. If the
user inputs ‘y’ or ‘Y’, the program terminates. If the user inputs ‘n’ or ‘N’, the system
returns to the Game Menu. Other input is not acceptable and the system should ask
the user to confirm again.
Other General Requirements
R7 Meaningful guidelines should be printed to assist with user’s input. Whenever an
option is selected, meaningful messages should be displayed.
R8 Suitable checking on user’s input is expected. Appropriate error messages should be
printed 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 your
program. 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 be
implemented.
Submission
Source File: Each group has to submit one source code file (i.e., CookGame.cpp) that
implements this group project.
Peer-to-peer Evaluation: Each student has to fill in and submit the peer-to-peer evaluation
form (i.e., CCN2042_P2P_Evaluation.docx) for your group.
CCN2042 18-19 Semester 2 – Group Project 8
All submission should be done through Moodle by 23:59, 18 April 2019. Late submission is
subject to 20% deduction in your final marks for each day (including public holidays and
Sundays). No late submission is allowed 4 days after the due date.
Grading criteria
Aspects Percentage
Program 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 your
program, 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 group
members in the peer-to-peer evaluation form.
Marks deduction
Marks will be deducted if the program fails to be compiled. The deduction is from 5 to 20
marks, depending on how serious the syntax error is. Note that if the program contains
unacceptably 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 9
Tips
To refresh the console screen, you may use the following windows platform command
appropriately in your program:
system("cls"); // Clear everything on the screen
system("pause"); // Wait until user pressing any key to continue
To handle unexpected input error (e.g. input a character to an integer variable), you may use
the following code appropriately in your program:
cin.ignore(); // Discard the content in the input sequence
cin.clear(); // Reset the input error status to no error
** Ensure the originality of your work. Plagiarism in any form is highly prohibited. **
- End -

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

微信:codinghelp

转载于:https://www.cnblogs.com/localjava/p/10719267.html

CCN2042 18-19 Semester 2 – Group Project相关推荐

  1. 蓝桥杯 算法训练 - 连续正整数的和 78这个数可以表示为连续正整数的和,1+2+3,18+19+20+21,25+26+27。   输入一个正整数 n(<=10000)   输出 m 行(n有m

    问题描述 78这个数可以表示为连续正整数的和,1+2+3,18+19+20+21,25+26+27. 输入一个正整数 n(<=10000) 输出 m 行(n有m种表示法),每行是两个正整数a,b ...

  2. 智能化转型战略的成功及强大的运营绩效带动联想18/19财年营业额创历史新高

    全年营业额年比年增长12.5%至510 亿美元,创历史新高 智能化转型战略推动全年税前利润大幅跃升至8.56亿美元,增幅逾4倍,年比年增长459% 全年净利润为5.97亿美元,较去年增长7.86亿美元 ...

  3. ssh The authenticity of host '172.18.19.XXX (172.18.19.XXX)' can't be established.

    用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctrl + c结束 错误是:The authenticity of host '172.18.19.XXX (172.1 ...

  4. ad19四层板实例教程_Altium Designer 18/19 4 层 stm32 主板实战教程

    一.Altium Designer 18/19 4 层 stm32 主板课程详情 本次课程主要针对基础薄弱,专业技能掌握不熟练的在校生.应届毕业生.初入职场就业者.初中级设计工程师等电子技术专业相关人 ...

  5. django错误-You have 18 unapplied migration(s). Your project may not work properly until you apply the

    django错误-You have 18 unapplied migration(s). Your project may not work properly until you apply the ...

  6. 软件构造18~19年选择题小结

    下面是18~19年中部分选择题的小结,有一定的分析过程,因为没有正确答案,可能存在一定的错误,请辩证地看待这些分析! 18年选择题小结 这里重点是比较spec2和spec3的强弱(spec1比spec ...

  7. 解决:You have 18 unapplied migration(s). Your project may not work properly until you apply

    问题描述: You have 18 unapplied migration(s). Your project may not work properly until you apply the mig ...

  8. Mongodb使用之Aggregation聚合查询:.group()/.project()/.and().previousOperation()等api的使用

    最近在项目中遇到了Mongodb在聚合查询上的应用,在这里做一个记录. Spring Data MongoDB 中的聚合框架支持基于以下关键抽象:Aggregation.AggregationDefi ...

  9. C4D R14/15/16/17/18/19/20软件安装包及教程

    软件介绍: 中文名4D电影,外文名CINEMA 4D,研发公司为德国Maxon Computer,特点为极高的运算速度和强大的渲染插件,使用在电影<毁灭战士><阿凡达>中,获得 ...

最新文章

  1. 在IIS7上导出所有应用程序池的方法批量域名绑定(网站绑定)
  2. Python读取excel文件可读取xlsx格式和xls格式可直接读取超链接,读出为字典格式(列表套字典),处理合并单元格的问题
  3. 在安卓上安装java_如何在Android上安装JavaCV并使用FrameGrabber
  4. window 如何查看tomcat 实时日志_如何处理生产环境Tomcat的catalina.out日志?
  5. 【带着canvas去流浪(13)】用Three.js制作简易的MARVEL片头动画(下)#华为云·寻找黑马程序员#
  6. dts数据库迁移工具_5分钟学会如何玩转云数据库组件(迁移,审计,订阅)
  7. JQuery选择器中含有冒号的ID处理差异的分析
  8. (转)Vue-初步了解vue-router的三要素:路由map 、路由视图、路由导航
  9. 细胞亚器互作之细胞代谢调节液泡与线粒体的接触位Cellular Metabolism Regulates Contact Sites between Vacuoles and Mitochondria
  10. 安卓rom制作教程_【固件更新】SkyMi蛋黄官改ROM最新开发版 12款机型更新
  11. 五子课堂---第一课(连珠基础一)
  12. 24X24 黑体简体中文点阵字库
  13. AccessibilityService辅助功能的研究及实现自动抢红包功能
  14. css背景图与html插入img的区别,css背景图与html插入img的区别
  15. 计算机如何提高开机速度?
  16. 【PPT】PPT倒计时动画的制作方法 5.4.3.2.1...
  17. Cisco ❀ IPV4协议数据报头部
  18. Warshall算法代码实现
  19. 这样用 lerna 也太爽了吧!
  20. R语言与克朗巴哈alpha系数

热门文章

  1. Win7英文版安装中文软件乱码的问题
  2. fcntl函数 和 ioctl函数
  3. php导航默认选中,html中关于select标签如何设置默认选中的选项详解
  4. zblog在线投稿php,简单免费的ZBLOGPHP投稿插件
  5. 1.Redis实战—短信登录
  6. 1. 爬下12306--从0到1
  7. 浙江省初中计算机知识点,浙江省科学中考复习知识点归纳.docx
  8. simulink rtw
  9. 2021高考珠海一中成绩查询,2021年珠海高考状元名单公布,珠海高考状元学校资料及最高分...
  10. Swift 3.0 打开手机手电筒