Group Work 1
The main objective of the group work is to reinforce the skills obtained during the first five sessions and to prepare for the first test.
The group work must be done in pairs (2 people in each group). Please register your group in Moodle, under Week 4.
If the group work does not go smoothly, let the instructor know about it. The deadline is Week 7 of the course.
Be aware, we will have one more group work (on graphics and manipulations with data structures). The second group work can be done in the same groups (or you can switch the groups).
The program...
- The program must be written by the group members.
- The program should not be too complicated (consult with the instructor).
- The program has to prompt the user for an input (probably repeatedly).
- Use
Scanner
class or the array of the main method for an input. - You can assume that the user enters data in the appropriate format.
- Do not use any graphical interfaces yet!
- Use
- The program should be user-friendly. If the user is expected to enter any data, the program should display an appropriate message/question about it. Probably, it would be useful to display introduction info about the program at first when the program is launched.
- The program must utilise a random number generator (e.g. to test the program or generate some data).
- The program must have several classes (including the client class). The objects must be described in the object classes using appropriate instance fields, constructors,
get
andset
methods and other instance methods. - The program must contain appropriate comments.
Some sample ideas for the project
It would be excellent if you come up with your own idea; otherwise, use one of our own:
- Matches. Generate a random number which represents the number of matches on the table. Two players take one, two or three (max) matches at a time in turns. The player who takes the last match has lost the game.
- Dice. The players throw a dice. During one turn, a player can throw the dice as many times as he wants; the points are summed. However, if the dice shows 1, player's all points are annulled, and the dice is immediately given to the second player. The winner is a player who first gets 91 points.