Question: This should be done using JavaFX. Please keep the program as simple as possible. No other requirements are needed other than the ones listed. Estimate

 This should be done using JavaFX. Please keep the program as

This should be done using JavaFX. Please keep the program as simple as possible. No other requirements are needed other than the ones listed.

Estimate the amount of time a person has slept in their life (roughly). Write a Java application that will input a person's name, age, and a typical number of hours he/she sleeps per night. Valid input could be: Joe Smith 28 7.5 From that data, calculate: 1. The number of hours the person has slept during his/her life o age * 365 * hours slept each night 2. The number of days the person has slept during his/her life o Answer from #1 divided by 24 3. The number of years the person has slept during his/her life o Answer from #2 divided by 365 NOTE: You are estimating the values above. For example, your age is based upon your last birthday. Do not worry about days since a person's last birthday. For this assignment: Use text field objects for input areas. Use label objects as headings and labels which describe an adjacent text field. Use label objects for output areas (one for each of the three items above). Use buttons to perform actions (like calculate, exit, etc.). Your panel will include two button objects: 1. Calculate - This button will take the input from the text fields objects, convert the input to numeric values and store in variables, calculate the total hours, days, and years slept, and display the results in label objects (3) in the panel. 2. Exit - This button will close the application. You can use Platform.exit(); and System.exit(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!