CPSC 120 -- Assignment #3

MasterMind!!

Phase 1 due Friday Nov. 10
Phase 2 due Friday Nov 17

MasterMind is a code-breaking game invented in the early 1970’s by Mordechai Meirovitz. The object of the game is to guess a sequence of four colors that has been selected by the computer. For this assignment, you will create JAVA classes that implement a Mastermind board, a Mastermind player and a program that plays the game.

You will need to create the following files:

MMPlayer.java This code is responsible for modeling a Mastermind player. It should have the following characteristics:

MMBoard.java This code is responsible for modeling a Mastermind board. It should have the following characteristics:

MasterMind.java This is the main program that unites the players with the boards. It consists of a menu with 5 options (in a loop that lets the user keep choosing options until he/she chooses the quit option):

Implementation Details

Download the files MasterMind.java, MMBoard.java and MMPlayer.java from the course web page. These java files contain the shell for each of the classes described on the previous page.

Phase I of this assignment is to complete steps 1 and 2 above. Phase II of this assignment is to complete steps 3-5 above.

Academic Integrity Reminder!!! Programming assignments are to be your own work (this includes Phase I of this assignment). You may get help on the specifics of the assignment from no one except the instructor. You may not show your program to anyone or look at anyone else's program or share ideas with anyone about how to write the program.

Hand in by Nov 17: A printed copy of your program files Tar all the files in your project subdirectory (the .class, .html, and .java files) and email the .tgz file to ingram@roanoke.edu with a subject of cpsc120 project3.