Starting from:
$35

$29

Assignment 1 Temperature Converter Solution

Your assignment is to create a Temperature Conversion app as described below.

App Requirements

    • The app should allow the user to select either Fahrenheit-to-Celsius or Celsius-to-Fahrenheit conversions. Conversion is selected using Radio Buttons. Fahrenheit-to-Celsius should be the default if there is no saved preference.

    • User the following formulae for conversion:
    o F to C:  (F – 32.0) / 1.8Example (75F):  (75.0 – 32.0) / 1.8 = 23.9C
o    C to F:  (C * 1.8) + 32    Example (15C):  (15.0 * 1.8) + 32.0 = 59F

    • The temperature 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 a Convert button should generate the converted temperature 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:
            ▪ F to C: 75.0 ➔ 23.9

            ▪ C to F: 15.0 ➔ 59.0

    • 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.










© Christopher Hield
1 of 3
CS 442 Mobile Applications

Development (Android Section)

    • The below are examples of how the app should look (in both orientations):


Selected Conversion

User Input Field



















Results Output Field

History Area



Selected Conversion


User Input Field


















Results Output Field


History Area


© Christopher Hield
2 of 3
CS 442 Mobile Applications

Development (Android Section)



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!











© Christopher Hield
3 of 3

More products