The general purpose is assessment of the following learning outcomes:
1.Perform software development tasks using the techniques of Automated Testing, Continuous Integration and Test Driven Programming
2.Use Ant, JUnit and Eclipse both individually and jointly as tools for Automated Testing, Continuous Integration and Test Driven Programming with the main stress on JUnit testing and test driven programming with Eclipse.
The goal of this assignment is working on an initial (partial) implementation of a game "Hangman" in the style of Test Driven Programming in Java by using Unit Testing with JUnit4 in the framework of Eclipse. Two compatible Java files are given to you: a source file Hangman.java and JUnit4 test case HangmanTest.java, both implemented partially and Hangman.java also containing some bugs.
You will need to finish/correct this implementation and testing framework. All tests should succeed and the game should be functioning well. The game "Hangman" is described as follows:
The computer chooses a word (the "word-to-be-guessed"), and displays a star sign * for each letter in the word (the *-form of the word). The remainder of the game proceeds in rounds (a round is an attempt at guessing a letter in the word): In each round, the user inputs a letter. If that letter occurs in the word, then every occurrence of that letter in the word is shown (i.e., the letter is written instead of the *) and the round is over. If the letter does not occur in the word or is chosen repeatedly, the user loses a life and the round is again over.
Play continues in this way until either
After each round, the user has the option of quitting or playing another round. If quitting, the number of rounds played is shown.
You can download the (correctly implemented compiled version of) Java class MyHangman.class into a directory of your choice and execute it using the command
java MyHangman
It has a slightly different name. You will work with Hangman.java, HangmanTest.java and their compiled classes.