Hello i have recently started to learn java from book "Introductory Java" by David Parsons and i got stuck on exercises trying to go back all way and can't find how to do the exercise but even tho i would like to see how it should look like so maybe it will stuck in my mind if someone can help with that would really appreciate
Exercises:
1. Create a class called 'counter' to represent the type of counter used to play board games. It should have attributes to represent its colour and the number of the square it is currently on. It should have methods to set and return its colour. It should also have a method to move to a given position on the board using an integer parameter and another method to return its current position. The counter should begin on square zero(i.e., off the board) and its default colour should be white.
2. Create a class called 'BoardGame'. This class should create two counters of different colours. For each counter, use a dice object to move it with four throws of the dice. Display the various positions of the two counters as they are moved.
3. Many games insist that the player throw a six before being allowed to start. Use an 'if' statement to write a start BoardGame class that checks if the counters have thrown a six on the dice. To avoid too much tedious code, give each counter only two throws, and display whether or not either has thrown a six(and is therefore able to start). If a counter throws a six on its first go, move the counter on its second throw.