Create a new Java Application project named Euchre allowing Netbeans IDE to create the main class called Euchre.java
Update main() method to do the following:
1. Call static method System.out.println() output to the console "Welcome to Euchre!"
2. Call static method JOptionPane.showMessageDialog() using the method signature that receives two arguments; the first argument should be null, the second argument should be explicit text "Let's Play Euchre!"
3. Instantiate an instance of class Game calling the no-argument constructor
Add the following:
1. A constant for the number of AI players set to the value of 3
2. A constant for the number of cards in a Euchre deck set to the value of 24
3. A constant for the number of cards each player is dealt set to the value of 5
4. A constant for the number of rounds in a hand set to the value of 5
5. An enumeration for the color of cards so it includes: RED and BLACK
6. An enumeration for the suit of cards so it includes: CLUBS, DIAMONDS, HEARTS, SPADES
7. An enumeration for the face value of cards so it includes: NINE, TEN, JACK, QUEEN, KING, ACE
Extend class Player.java
Implement methods inherited from class Player:
1. public Card playCard();
2. public void makeTrump();
1. Add member variables (Hint: you will have to explicitly import each enumeration, example: import constants.Constants.Color; ):
a. Data type enumeration Face to represent the face value of the card
b. Data type enumeration Suit to represent the suit of the card
c. Data type enumeration Color to represent the color of the card
2. Generate getters/setters for member variables
1. Add member variable
a. Data type Set< Card> to represent the deck of cards
2. Generate getter/setter for member variables
1. Add member variables
a. Data type enumeration Suit to represent the trump suite of Euchre
b. Data type class Player to represent the lead player for each hand
c. Data type class Player to represent the dealer for each hand
d. Data type class Player to represent which player won the current trick/hand
e. Data type int to represent the current round of the game
f. Data type ArrayList< Team> to represent the two teams of the game
g. Data type class Deck to represent the deck of cards for the game
h. Data class Scanner to get information from the user
2. Generate getters/setters for the member variables
3. Write a custom constructor that
a. Has no parameters
b. Calls method createTeams() which will be defined within this class
c. Calls method outputTeams() which will be defined within this class
4. Write method createTeams() that
a. Has no parameters
b. Has return type void
c. Instantiate the member variable of type ArrayList< Team>
d. Instantiates two instances of class Team
i. one for TeamOne
ii. one for TeamTwo
iii. set names for each team as appropriate
iv. add each instance to the ArrayList< Team> member variable
e. Instantiate the member variable of class Scanner passing "System.in" as the argument to the constructor
f. Using System.out.println() static method, prompt the user for the human player's name
g. Instantiate an instance of class String set equal to the reference object of class Scanner using its method .next()
h. Instantiate an instance of class HumanPlayer
i. Call method .setName() on the reference object of class HumanPlayer passing the value stored in the variable from step g. above
j. Add the reference object of class HumanPlayer to the instance of class Team representing Team One
k. Write a for loop to generate three AiPlayer instances
i. Generate a unique name for each AiPlayer and call method .setName() passing the unique name as an argument
ii. Add one AiPlayer instance to the instance of class Team representing Team One
iii. Add the other two AiPlayer instances to the instance of class Team representing Team Two
5. Write method outputTeams() so that
a. It has no parameters
b. Has a return type of void
c. Uses an enhanced for loop to loop through the collection of member variable of type ArrayList< Team>
1. Calls method outputTeam() in class Team
Extend class Player.java
Implement methods inherited from class Player:
1. public Card playCard();
2. public void makeTrump();
Add method signatures:
1. public Card playCard();
2. public void makeTrump();
1. Declare abstract class Player so that it implements interface IPlayer
2. Add member variables:
a. Data type String to represent player name
3. Generate getters/setters for the member variables
4. Declare abstract the methods inherited from interface IPlayer
a. public abstract Card playCard();
b. public abstract void makeTrump();
1. Add member variables
a. Data type ArrayList< Player> to represent a team
b. Data type int to represent the team’s score
c. Data type int to represent the team’s tricks taken for each hand
d. Data type String to represent the team’s name
2. Generate getters/setters for the member variables
3. Write a custom constructor that instantiates the member variable ArrayList< Player>
4. Write method outputTeams() so that
a. It has no parameters
b. Has a return type of void
c. Outputs the current Team’s name
d. Uses an enhanced for loop to loop through the collection of class Team’s member variable ArrayList< Player>
i. Outputs the current Player's name
Create package userinterface