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 can be done in pairs (2 people in each group). If you want to work on your own, the points will be divided by two. If the group work does not go smoothly, let the instructor know about it.
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).
During the evaluation, one of the group members (chosen randomly by the instructor) presents the whole project. All group members get the same points. The points are calculated using the formula: L*S, where
- L is the correctness of the project (max 5 points);
- S is the presentation (max 1 point);
The project can be presented only during the practice sessions on 20th of March or 3rd of April.
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.
- Game 15. Place on a 4x4 grid 15 stones. One cell will be empty. Move the stones so that the numbers would be ordered.
- 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.
- Tic-Tac-Toe.
- Calculator.