Java Reference
In-Depth Information
Application 's start method to display a JavaFX app's stage. f) True. g) False. By default a Slider
allows you to select values from 0.0 to 100.0. h) True. i) True.
Exercises
25.3 ( Scrapbooking App) Find four images of famous landmarks using websites such as Flickr.
Create an app similar to the Welcome app in which you arrange the images in a collage. Add text
that identifies each landmark. You can use images that are part of your project or you can specify
the URL of an image that's online.
25.4 (Enhanced Tip Calculator App) Modify the Tip Calculator app to allow the user to enter the
number of people in the party. Calculate and display the amount owed by each person if the bill
were to be split evenly among the party members.
25.5 ( Mortgage Calculator App) Create a mortgage calculator app that allows the user to enter a
purchase price, down-payment amount and an interest rate. Based on these values, the app should
calculate the loan amount (purchase price minus down payment) and display the monthly payment
for 10-, 20- and 30-year loans. Allow the user to select a custom loan duration (in years) by using a
Slider and display the monthly payment for that custom loan duration.
25.6 ( College Loan Payoff Calculator App) A bank offers college loans that can be repaid in 5, 10,
15, 20, 25 or 30 years. Write an app that allows the user to enter the amount of the loan and the
annual interest rate. Based on these values, the app should display the loan lengths in years and their
corresponding monthly payments.
25.7 ( Car Payment Calculator App) Typically, banks offer car loans for periods ranging from two
to five years (24 to 60 months). Borrowers repay the loans in monthly installments. The amount of
each monthly payment is based on the length of the loan, the amount borrowed and the interest
rate. Create an app that allows the customer to enter the price of a car, the down-payment amount
and the loan's annual interest rate. The app should display the loan's duration in months and the
monthly payments for two-, three-, four- and five-year loans. The variety of options allows the user
to easily compare repayment plans and choose the most appropriate.
25.8 ( Miles-Per-Gallon Calculator App) Drivers often want to know the miles per gallon their cars get
so they can estimate gasoline costs. Develop an app that allows the user to input the number of miles
driven and the number of gallons used and calculates and displays the corresponding miles per gallon.
Making a Difference
25.9
( Body Mass Index Calculator App) The formulas for calculating the BMI are
weightInPounds
×
703
BMI
=
------------------------------------------------------------------------------------
heightInInches
×
heightInInches
or
weightInKi
log
rams
BMI
=
---------------------------------------------------------------------------------------
heightInMeters
×
heightInMeters
Create a BMI calculator app that allows users to enter their weight and height and whether they are
entering these values in English or metric units, then calculates and displays the user's body mass
index. The app should also display the following information from the Department of Health and
Human Services/National Institutes of Health so that users can evaluate their BMIs:
BMI VALUES
Underweight: less than 18.5
Normal: between 18.5 and 24.9
Overweight: between 25 and 29.9
Obese: 30 or greater
 
Search WWH ::




Custom Search