Almost done my Java project but I'm getting these syntax errors in my code and have no idea how to fix it.
The class tallies up the points for a game of cribbage here are the instructions:
Counter.java
This class will be used to calculate the number of points from a Cribbage hand.
The class must have the following private variables:
- PowerSet<Card> cardps
- Card starter
The class must have the following public methods:
** public Counter(Card[] hand, Card starter)**: constructor Initialize the starter and use the PowerSet constructor to generate the Power Set
of the cards from the hand (note that the starter card is already included in the
hand array so the Power Set will be based on all 5 cards.
public int countPoints()
- Calculate the number of points for the hand that was sent into the constructor.
Use the Power Set, cardps, to do the calculations so that all the combinations are checked. Refer to the scoring explanations in the Introduction when
implementing this method.
- It is recommended that you implement one or more private helper methods to
help keep the code more organized and clean. For example, you may want
private helper methods for each of the scoring categories, i.e. one for checking if
a given Set sums to 15, another one to check if the given Set forms a run of 3 or
more consecutive cards, etc.