Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DESCRIPTION HiLo is a card game where a card is dealt and the player has to guess whether the next card that is dealt will

DESCRIPTION

HiLo is a card game where a card is dealt and the player has to guess whether the next card that is dealt will be higher or lower than the first card. A card is first dealt on the left hand side. Then, a guess as to whether the next card dealt will be higher or lower is indicated, using the radio buttons in the centre. On clicking the 'Deal Second Card' button, another card is dealt on the right hand side. If the card dealt is in accordance with the guess of the user, then the user wins. Five consecutive, correct guesses constitute an overall game win. A new game is begun using the menu by selecting the 'New Game' item. Note that for the purpose of comparing cards, only the face of the card matters. The suit, i.e, whether Hearts, Spades, Clubs, etc., is unimportant. A second card of equal face value is considered a lose for the purposes of this game.

REQUIREMENT (JAVAFX)

Create a project called 'CardsHiLoGUI'. Create a main interface for the application. Remember to create a ToggleGroup for the radio buttons and set the ToggleGroup for each button to ensure mutual exclusivity. At application startup, the card images are populated with default cards. Use comments in your code to explain your approach in relation to the GUI construction. Add a menu bar and 'File' menu. The 'File' menu should contain the items 'New Game', 'Shuffle' and 'Exit'. Implement these menu items fully. Add a 'Help' menu with an 'About' item to show your student name and number in a dialog. Create classes for 'Card' and 'DeckOfCards' to help manage the game. The Cardclass should include methods such as 'isEqual( )', 'isLower( )', 'isHigher( )' and'toString( )'. DeckOfCards should include methods such as 'dealTopCard( )','isEmpty( )' and 'shuffle( )'. Provide one or more constructors as appropriate for each class. Implement dealing of each card, determination of a win/lose and user feedback in a label. Store wins and inform the user of an overall game win on achieving 5 consecutive, correct guesses. Add a progress bar and progress indicator to indicate progress towards 5 consecutive wins leading to an overall game win. Provide appropriate feedback on achieving an overall game win. Use a stylesheet to apply an attractive look and feel to the application.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions