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.
- Be aware, we will have one more group work (on graphics and manipulations with data structures). You can continue working in the same groups (or you can switch the groups).
Requirements
- 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 2.
- If the group work does not go smoothly, let the instructor know about it. The change of group is possible only after the first group work is done.
- During the evaluation, one of the group members (chosen randomly by the instructor) presents the whole project. The grade is calculated using the formula: L*S, where
- L is the correctness of the project (max 5 points);
- S is the presentation (max 1 point);
- NB! all group members get the same grade.
- The program must be written by the group members.
- The program should not be too complicated (consult with the instructor).
- The project can be presented only during the practice sessions on 23rd of March or 6th of April.
The program...
- 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 info 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 info, 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 executed.
- 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 main 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 matches at a time in turns. The player who takes the last match has lost the game.
- Game 15. Place on the 4x4 grid 15 stones (integers). 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.