Question
JAVA Netbeans Assignment 12: Write a Distance Converter Objectives Use JavaFX to complete a program which solves a problem. Use an ImageView object. Use TextField
JAVA Netbeans Assignment 12: Write a Distance Converter
Objectives
Use JavaFX to complete a program which solves a problem.
Use an ImageView object.
Use TextField objects.
Identify the panels required to create a program based on the image.
Motivation
In this program, you will be creating a distance conversion program. You've probably written one of these in your past classes, but this one will require JavaFX. The emphasis is on the graphical application.
You will need these conversion guides.
1 meter is 39.37 inches.
1 meter is 3.28 feet.
1 meter is 1.09 yards.
Instructions
Name your project FirstnameLastnameAssignmentNumber
Write a program that will display an input field. The input field will take a distance in meters. It will then convert that distance into another distance based on unit which is selected via a radio button. Use the reference image blow.
Tape measure gui image
This will require the following:
An image of a tape measure. It will be included along with this assignment. The tape measure doesn't do anything. I only want you to include an image to demonstrate the ability.
A set of radio button which will be the user's way of selecting the output units of the calculation.
A Label-TextField pair to represent the means by which the user will input data. The user should be able to input any integer or floating-point value, such as 1, 2, or 3.5.
A Label-TextField pair to represent the means by which the program will output the result. The results TextField should have the ability to edit turned off.
A button which will complete the conversion named "Convert".
A title bar which says "Your Name's Distance Conversion". If this does not include your name, you will lose points.
Notes:
The Scene size is 700 pixels wide and 250 pixels tall.
In the image provided, most panes used the "Pos.CENTER" alignment. The panel with the radio button used "Pos.CENTER_LEFT" alignment.
All panes used 20 pixel spacing between children.
All input should be in floating-point format (which means you should be using "double" types for numerical data). In the event that someone types in non-numerical data, you should show a JOptionPane dialog box that says ""Error! Number not understood."
Be sure to test your application with 4 inputs:
2.5 meters into inches should be 98.425 inches.
2.5 meters into feet should be 8.2 feet.
2.5 meters into yards should be 2.725 yards.
2.5 meters when nothing is selected for the units should be 0.
Any non-numerical value (including nothing) in the input field should present a JOptionPane error message.
Documentation
Your source code must include the following documentation:
Your name
The class (CS 2070) and the section number (on ground is 08, online is W1).
The date on which you turned in the assignment.
A short description of the software. Usually a sentence or two is sufficient.
Turning it in.
To turn in your application, find the folder containing your entire project (not the folder with the "java" file), zip it up, and turn it in.
Distance Converter Distance in meters: 2 feet Result: 2.725 yards ConvertStep 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