Description
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.
CS 442 Mobile Applications
Development (Android Section)
© Christopher Hield 2 of 3
• The below are examples of how the app should look (in both orientations):
\
Results Output Field
(read-only)
User Input Field (editable)
Selected Conversion
History Area (read-only)
User Input Field (editable)
Results Output Field (read-only)
Selected Conversion
History Area (read-only)
CS 442 Mobile Applications
Development (Android Section)
© Christopher Hield 3 of 3
Assignment Assistance
Your course TA is available to assist you with your assignment if needed. Questions on assignment
requirements and course concepts can be sent to the instructor.
Submissions & Grading
• Submissions must consist of your zipped project folder (please execute Build =>Clean Project before
generating the zip file). Submissions not following these requirements will be penalized.
o Note: To make your submission zip file smaller, before zipping your project file,
you can remove the “.gradle” folder (found in your project’s root directory), and
remove the “build” folder (found in the “app” folder in your project’s root
directory).
• Submissions should reflect the concepts and practices we cover in class.
• Late submissions will be penalized by 10% per week late. (i.e., from one second late to 1 week late:
10% penalty, from one week late to 2 weeks late: 20% penalty, etc.).
• The following are the key points that will be examined in Project when graded:
o 35% UI Design and Appearance (in both Project and Landscape orientation)
o 25% Input operation
o 25% Conversion & Results Display
o 15% Conversion History
If you do not understand anything in this handout, please ask.
Otherwise the assumption is that you understand the content.
Unsure? Ask!