The University of Birmingham
Object Oriented Programming Assignment 2 – Text Based Game
*Rules*
1. For each class refer to its corresponding test to verify field and method naming conventions.
2. Although there are many ways to construct an application, you are required to adhere to the rules stipulated below (to achieve marks).
3. If variable names are not stipulated, you can use your own names for variables. This shows that you have written the application (we will check for plagiarism).
4. For Assignment 2 you MAY import additional Java packages in your project, but only those that are part of the standard Java library (e.g., java.util, java.io, etc.). Using third-party libraries or packages not included with the standard JDK is NOT permitted.
5. Do NOT change or modify files included in the "test", "lib" or "out" folders.
6. Do NOT modify the template code. However, you are allowed to create your own methods or classes if they are needed.
7. You MUST complete this assignment independently – Do NOT discuss or share your code with others, and Do NOT use ChatGPT! Any cheating behaviour will result in a zero score for this module and will be subject to punishment by the University.
8. It is *STRONGLY ADVISED AGAINST* utilizing any translation software (such as Google Translate) for the translation of this document.
9. The jUnit tests included in the skeleton code are basic and only scratch the surface in evaluating your code. Passing these tests does not guarantee a full mark.
10. Wrong file structure leads to a substantial penalty. Make sure you have followed the Submission Instructions on the Assignment 2 Canvas page.
11. Make sure you have pushed the version of your code that you want marked to gitlab.
12. Make sure you keep your video recording to the time limit. Any videos longer that 7 minutes will be penalised and videos over 10 minutes will receive zero. DO NOT compress your video in SIZE or TIME.
13. Late submissions are accepted only for 24 hours after the deadline and are penalised at 5% of the final assessment mark.
1 Process For Assignment 2
Make sure you follow the process as outlined below. Assignment 2 has a different structure and a somewhat different approach to Assignment 1:
1. Clone the repo for assignment2. (If you haven’t yet accessed gitlab.cs.bham.ac.uk do so ASAP.)
2. Download and unzip the docs.zip JavaDoc file to your own device. In the root folder open the IndexAll.html file. Read through all the package, class, method and field definitions and descriptions.
3. Complete each class in the src folder as defined in the docs.
4. The suggested order for completing classes is:
(a) All classes in org.uob.a2.gameobjects. (b) All classes in org.uob.a2.commands.
(c) All classes in org.uob.a2.parser.
(d) All classes in org.uob.a2.utils.
(e) The Game.java class.
5. For each class:
(a) Complete the required code (methods and attributes).
(b) Run your code using the run.sh command, ensuring it compiles without errors.
(c) Test your code using the test.sh command. You will have errors at first but they should hopefully decrease as you progress.
(d) git add, git commit, and git push your code.
6. Keeping testing after each class is implemented until everything is working.
7. Add the required new features:
(a) Display a map.
(b) Adding a score. You can decide on the rules for how the scoring works but you need to clearly explain it in the video and game.
(c) Combining items.
2 Introduction
In this assignment, you are tasked with updating the Zork style text based game from Assignment 1(https://en.wikipedia.org/wiki/Zork). Please note that it is likely that you will need to start from scratch due to the redesign of the game, but you ARE allowed to reuse your story and and puzzles from Assignment 1.
The game is played by the user entering in various commands (e.g. "move south", "look room", "get key", "use key on chest"), to which the game responds with text based output (e.g. "You pick up the rusty key").
3 Mark allocations
You will receive marks based on two aspects of the game: Firstly, the results of run- ning the test.sh command. We will run our own version of these tests once you have submitted. This command will test each class and method (detailed as in the provided docs.zip and in Tasks 1 - 6). You need to implement all the classes and methods as described in the docs as well as any required for your new features.
Secondly, you will need to submit a screen recording showing you playing the game and discussing the code. Your screen recording needs to have the following:
• Show your face and your student card.
• Play through the game once showing all the rooms, puzzles and an example of each of the expected commands.
• Show and briefly explain the code in your Game.java file.
• Show and briefly explain your required new features.
• Show and briefly explain anything else that you did beyond the normal scope of the assignment. This includes any additional features you’ve added.
The screen recording must be shorter than 7 minutes. You can use a text-to-speech app if you do not want to record your own voice.
咨询 Alpha 小助手,获取更多课业帮助