CM50258 Principles of Programming Java Mastermind
1 Introduction
This document provides the specification for the reassessment/deferred assessment coursework: Mastermind. Questions regarding the coursework can be emailed to maew20@bath.ac.uk. Please check Moodle for the deadline for submissions of this reassessment/deferred assessment.
2 The Mastermind Game
Mastermind is a classic board game for two players, a codemaker and codebreaker. A full description can be found on
https://en.wikipedia.org/wiki/Mastermind_%28board_game%29
For this piece of coursework, you are asked to design and implement a simple Mastermind Game such that:
1. The user is able to specify the number (between 3-8) of colours in the game 2. The user is able to specify the number (between 3-8) of pegs being hidden
1
3. The game can be played by
(a) one human codemaker and one human codebreaker
(b) one computer-based codemaker and one human codebreaker
(c) one computer-based codemaker and one computer-based codebreaker 4. The game can be saved and re-started.
5. The game provides a simple text-based interface to your system.
You are also required to include with your program files, a README file explain- ing how to use your program and what features it has.
This basic system is marked out of 70 where
• 25 marks are allocated for a running the system which handles correct input (this includes correct saving and restoring of games)
• 30 marks for the design and program structure, which includes class de- sign, documentation, decomposition, abstraction, generalisation, variable and method naming and data-encapsulation.
• 10 marks for the robustness of the code
• 5 marks for a README file
The remaining 30 marks are for the implementation of
• An intelligent computer-driven codebreaker: to demonstrate that you can develop a slightly more complicated algorithm. This algorithm does not have to so sophisticated that you can never beat it but it should do more than randomly guess the code.
2
3 Assessment 3.1 Conditions
The coursework will be conducted individually. Attention is drawn to the Uni- versity rules on plagiarism. While software reuse (with referencing the source) is permitted, we will only be able to assess your contribution.
3.2 Marking
The marking criteria are outlined above. In summary, the key issues for marking the code will be: compiling, running with expected input, robustness (handling incorrect user input), class design, proper use of data encapsulation and decom- position, and the algorithms being used. You stand to loose marks for repeated or badly structured or documented code. Marks will also be deducted for ill-named variables or methods or for inconsistent indentation. Remember that 5 marks are allocated to the README file.
In cases where it is not clear from the assignment how it should be marked, you may be called on to explain or demonstrate your program. Such cases include but are not limited to suspected plagiarism
4 Submission Instructions
The deadline for this coursework is available on Engage – please check this date and time and upload you solution before the deadline.
Your program solutions should be a zip file that can be extracted to a directory with the name Mastermind-yourusername. The directory should contain the files necessary to compile and run your code. Importantly, the main method should be in a class called Mastermind.java. Before you upload your solution, make sure that the zip file contains all necessary files and creates the correct directory. Please double check that you have submitted the right files on Engage, with the content that you want to be marked. You are responsible for checking that you are submitting the correct material to the correct assignment.
3