Question: USE JAVA LANGUAGE. Assignment > Distance Converter Your assignment is to create a Distance Conversion app as described below. App Requirements The app should allow
USE JAVA LANGUAGE.
Assignment > Distance Converter Your assignment is to create a Distance Conversion app as described below. App Requirements The app should allow the user to select either Miles-to-Kilometers or Kilometers-to-Miles conversions. Conversion is selected using Radio Buttons. Miles-to-Kilometers should be the default if there is no saved preference. User the following formulae for conversion: o Miles to Kilometers: Mi * 1.60934 Example: 25mi * 1.60934 = 40.2 km o Kilometers to Miles: Km * 0.621371 Example: 60km * 0.621371 = 37.3 mi
- The distance value (the value to be converted) should be entered by the user. Values can be positive or negative. Only numeric whole or decimal values should be allowed.
- Pressing the Convert button should clear the input field, generate the converted distance value and display it on the screen. All converted values should be displayed out to 1 decimal place only.
- All conversion operations and their results should be added to the history a list of converted values. The history of converted values must be scrollable and displayed with the most recent conversions at the top of the list. o Examples: Mi to Km: 75.0 120.7 Km to Mi: 125.25 74.7
- Note for the arrow you can use 2 equals and the greater-than symbol: ==>
- Pressing the Clear button will clear the conversion history.
- The Constraint Layout must be used. You need a separate Landscape layout for this assignment. The app must look and act consistently in either portrait or landscape orientation. No data content should be lost upon rotation (i.e., the current conversion, the current calculated results, and the conversion history should be maintained upon rotation). Concepts and practices discussed in class and presented in course materials must be followed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
