Question: Creating the UI for Yahtzee in JAVA - Please execute the instructions in the table userInterface package Includes these classes created: GameUi, LowerSectionUi, PlayerUi, RollUi,

Creating the UI for Yahtzee in JAVA - Please execute the instructions in the table

userInterface package

Includes these classes created: GameUi, LowerSectionUi, PlayerUi, RollUi, ScoreCardUi, UpperSectionUi, YahtzeeUi

GameUi.java

1. Extend class JPanel

2. Declare member variables: JLabel round, JLabel gameTurn, JLabel logo, A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

LowerSectionUi.java

1. Extend class JPanel

2. Declare member variables: JLabel round, ArrayList categories or seven individual JButtons for the categories of the lower section, ArrayList scores or seven individual JLabels for the score of the categories of the lower section, JLabel totalLower; JLabel totalUpper; JLabel grandTotal; A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

PlayerUi.java

1. Extend class JPanel

2. Declare member variables: JLabel playerName; JLabel playerScore; A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

RollUi.java

1. Extend class JPanel

2. Declare member variables: ArrayList dice or five individual JButtons for the dice, JButton roll; A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

ScoreCardUi.java

1. Extend class JPanel

2. Declare member variables: JLabel grandTotal; LowerSectionUi lowerUi; UpperSectionUi upperUi; A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

UpperSectionUi.java

1. Extend class JPanel

2. Declare member variables: ArrayList categories or seven individual JButtons for the categories of the lower section, ArrayList scores or seven individual JLabels for the score of the categories of the lower section, JLabel total; JLabel bonus; JLabel totalScore; A layout manager

3. Override default no-argument constructor; it should call method initComponents();

4. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

YahtzeeUi.java

1. Declare member variables: GameUi gameUi; PlayerUi playerUi; RollUi rollUi; ScoreCardUi scoreCardUi; JFrame frame; JMenuBar menuBar; JMenu game; JMenuItem exit; JMenuItem newGame; JPanel rightPanel; A layout manager

2. Override default no-argument constructor; it should call method initComponents();

3. Define method initComponents (); it should do the following: void return type, empty parameter list, instantiate instances of the member variables, add UI components to the class

Note: All other classes in Yahtzee already completed (core, constants, yahtzee packages) - Constants, Aiplayer, Die, Game, HumanPlayer, IPlayer, LowerSection, Player, Roll, ScoreCard, UpperSection, Yahtzee

Creating the UI for Yahtzee in JAVA - Please execute the instructions

Yahtzee! Count and add only aces Count and add only twos Count and add only threes Count and add only fours Count and add only fives Count and add only sixes ces Twos Yahtzee 0/13 Threes Fives Name Sixes TOTAL SCORE BONUS TOTAL of Upper Section 0 If total score is 63 or over 2 3 of a kind Add total of all dice 4 of a kind Add total of all dice Full house Score 25 Small straight Large straight YAHTZEE Score 30 Score 40 Score 50 Roll Dice Chance Score total of all 5 dice YAHTZEE BONUS Score 100 TOTAL of Upper Section TOTAL of Lower Section GRAND TOTAL 0 Yahtzee! Count and add only aces Count and add only twos Count and add only threes Count and add only fours Count and add only fives Count and add only sixes ces Twos Yahtzee 0/13 Threes Fives Name Sixes TOTAL SCORE BONUS TOTAL of Upper Section 0 If total score is 63 or over 2 3 of a kind Add total of all dice 4 of a kind Add total of all dice Full house Score 25 Small straight Large straight YAHTZEE Score 30 Score 40 Score 50 Roll Dice Chance Score total of all 5 dice YAHTZEE BONUS Score 100 TOTAL of Upper Section TOTAL of Lower Section GRAND TOTAL 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!