Activity (Goal is to make a graphical Ui for a yahtzee game)(Box layout is what
ID: 671363 • Letter: A
Question
Activity (Goal is to make a graphical Ui for a yahtzee game)(Box layout is what I was trying to use)(The game itself is already made, but I am having trouble with the Ui part)
Yahtzee class
Add creating an instance of class YahtzeeUi
userInterface package
Create class GameUi
Create class LowerSectionUi
Create class PlayerUi
Create class RollUi
Create class ScoreCardUi
Create class UpperSectionUi
Create class YahtzeeUi
GameUi.java
Extend class JPanel
JLabel round
JLabel gameTurn
JLabel logo
A layout manager
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
LowerSectionUi.java
Extend class JPanel
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
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
PlayerUi.java
Extend class JPanel
JLabel playerName;
JLabel playerScore;
A layout manager
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
RollUi.java
Extend class JPanel
ArrayList dice or five individual JButtons for the dice
JButton roll;
A layout manager
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
ScoreCardUi.java
Extend class JPanel
JLabel grandTotal;
LowerSectionUi lowerUi;
UpperSectionUi upperUi;
A layout manager
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
UpperSectionUi.java
Extend class JPanel
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
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
YahtzeeUi.java
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
Override default no-argument constructor; it should call method initComponents();
void return type
empty parameter list
instantiate instances of the member variables
add UI components to the class
Activity (Goal is to make a graphical Ui for a yahtzee game)(Box layout is what I was trying to use)(The game itself is already made, but I am having trouble with the Ui part)
Yahtzee class
Add creating an instance of class YahtzeeUi
userInterface package
Create class GameUi
Create class LowerSectionUi
Create class PlayerUi
Create class RollUi
Create class ScoreCardUi
Create class UpperSectionUi
Create class YahtzeeUi
GameUi.java
Extend class JPanel
Declare member variables:JLabel round
JLabel gameTurn
JLabel logo
A layout manager
Override default no-argument constructor; it should call method initComponents();
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
Extend class JPanel
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
Override default no-argument constructor; it should call method initComponents();
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
Extend class JPanel
Declare member variables:JLabel playerName;
JLabel playerScore;
A layout manager
Override default no-argument constructor; it should call method initComponents();
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
Extend class JPanel
Declare member variables:ArrayList dice or five individual JButtons for the dice
JButton roll;
A layout manager
Override default no-argument constructor; it should call method initComponents();
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
Extend class JPanel
Declare member variables:JLabel grandTotal;
LowerSectionUi lowerUi;
UpperSectionUi upperUi;
A layout manager
Override default no-argument constructor; it should call method initComponents();
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
Extend class JPanel
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
Override default no-argument constructor; it should call method initComponents();
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
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
Override default no-argument constructor; it should call method initComponents();
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
Explanation / Answer
Hi i am unable to copy whole code in this editor.
To execute this program you need to create and copy .java files in a folder and need to execute , please execute below lines at your command line.
It is crossed 65,000 characters.
Please provide your mail address or other alternative to give code.
Command 1:
javac Die.java DieFaces.java ExFrame.java MousePressListener.java DiceComponent.java Yahtzee.java YahtzeeScore.java
Command 2:
java Yahtzee
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.