首页 > > 详细

C++辅导 Assignment 2 Number Blocks Game解析C/C++编程


Introduction



Checkmate,,

,(),

10/29/2017 COMP2011 Assignment 2: Number Blocks Game
1/2
Assignment 2: Number
Blocks Game
MENU
Introduction
Description
Download
Submission and Deadline
FAQ
FAQ updated: 24/10/2017
19:13pm
INTRODUCTION
from
In this assignment you are asked to implement a game simulating the toddler toy shown above. The game inventor,
Kevin, invented this game with his son and daughter. The idea of this game is that two players take turn to put a
block into a 10­unit by 10­unit game board. If a player fails to put any block into the game board, the player loses.
If all blocks are fitted in the game board, the game ties.
The objective of this assignment is to provide an opportunity for students to practise recursion and char array.
Therefore, all tasks in this assignment should only be completed using recursion. You are not allowed to use any
loops (for­loop, while­loop, do­while) nor more advanced memory management techniques or data structures like
stack or queue anywhere in the functions you are asked to complete. String class is also not allowed.
There are four tasks; read the instructions carefully before you start. You must finish this assignment with the
provided skeleton in the pa2.cpp file. Create a standard Eclipse C++ project (MinGW gcc or MacOSX g++) and add
the pa2.cpp file to it. Your task is to complete all the missing function implementations in the source file. The source
Web view Printable view Course homepage ++ Font size ‐‐ Font size
COMP2011
Introduction to Object­Oriented Programming
10/29/2017 COMP2011 Assignment 2: Number Blocks Game
2/2
file is fully documented and it describes the exact requirements that you have to complete for each function. You
should seek clarification from the TA via facebook, email, or in person if you have any doubt about the
specification.
For submission details, please refer to the Submission and Deadline page.
TIPS
You should read this tips after you have read the other parts of the assignment, including the skeleton
code. We put it here to avoid that you miss it accidentially. Make sure you do:
Have a return statement on every possible return path of your function. Sometimes your
function will behave properly even if you have missed a return statement. Our experience told
us it does not work when we grade it.
Check array out­of­bound properly. There are four walls in the game board and it sometimes
might also work even if your boundary checking code is wrong. Again, our experience told us it
does not work when we grade it.
Do not write any code in the main function. You are required to complete four required
functions and you can create some helper functions (which contain no loops) as well. However,
you cannot write any code in the main function. Any code in the main function will be discarded
when we grade it.
Submit only the pa2.cpp but not a zip, exe. We don’t grade submissions with incorrect formats.
Submit your program at least one hour before the assignment is due. The traffic (and your luck)
will be very bad in the last hour before due time. You can submit an assignment multiple times
and we grade only the last one.
slide for tutorial session
Page maintained by Kevin Wang | Course homepage

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!