Question
Write a JavaFX application that models a jar of coins. The application has attributes representing the number of quarters, number of dimes, number of nickels,
Write a JavaFX application that models a jar of coins. The application has attributes representing the number of quarters, number of dimes, number of nickels, and number of pennies. The application creates a GUI to allow the user to add coins to anyone of the coin categories in the jar. The application calculates and displays the total amount in the jar when a button is pressed. The GUI includes the following:
Four radio buttons for selecting one of the coin categories.
Text field to allow the user to enter the number of coins of a selected category to be added to the jar.
A labelled button when pressed the total amount of coins in the jar will be displayed in dollar notation with two significant digits after the decimal point.
A text object to display the total amount of coins.
Text objects to display the current contents of the jar in each coin category.
An example of the GUI configuration and its functionalities are shown in the following snapshots. Case (a) shows the initial configuration, case (b) shows the situations after the selection of nickels and entering 12 in the text field, and case (c) shows the output after pressing the button. Note: See the example in Listings 5.16 and 5.17.
There is an answer on chegg already, but it doesn't actually work properly. If you could just edit that one so it worked properly or something that would be great. Thanks
Coins Panel Coins Jer Panel Total Value in Dollars Total Value in Dollars Quarters 0 Total 0.00 Quarters 14 Total 0.00 Dimes Nickles 12 (b ) Total value in Dollars Total: $4.10 Quarters Dime: Nickles 14 0 12 (c)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started