App01 Distance Converter - LeoJuster/ConsoleApps15 GitHub Wiki

App01: Distance Converter

Description

This App allows the user to convert distances measured in one unit of distance into another unit of distance, for example, it will convert a distance measured in miles into the same distance measured in feet.

Features Stage 1

The application should:-

  1. Output a heading with the name of the application and the name of the programmer.
  2. Input any valid distance measured in miles
  3. Convert that distance into feet
  4. Output the equivalent distance in feet The input and output should accept numbers that include the decimal point, and this app can use the fact that 1.0 miles are exactly 5280 feet.

Features Stage 2

The application should:-

  1. Output a heading with the name of the application and the name of the programmer.
  2. Input miles and convert it to feet.
  3. Input feet and convert it to miles
  4. Input miles and convert them to metres This app can use the fact that 1.0 miles contain 1609.34 metres

Features Stage 3

The Application should:

  1. Output a heading with the name of the application and the name of the programmer.
  2. Prompt the user to select which unit to convert from (Miles, Feet or Metres)
  3. Prompt the user to select which unit to convert to (Miles, feet or Metres)
  4. Convert the from distance entered into the to distance using the selected units.
  5. Output the distance in the to distance units.

Design: UML Activity Diagram

Stage 1

Activity Diagram

Stage 3

Activity Diagram

Design: UML Class Diagram (10 Marks)

App01 Class Diagram App01 Class Diagram

Testing: ScreenShots (16 Marks)

Screen Shot

Unit Testing (24 Marks)

Unit Testing

This screenshot needs replacing by the students own unit testing

Testing: Black Box (30 Marks)

Valid Data

Test No Proposed Test Data Entered Expected Result Actual Result Comments
01 Miles to Feet miles = 1.0 5280 5280 ok
02 Miles to Feet miles = 2.0 10560 10560 ok
03 Feet to Miles feet = 5280 1.0 1.0 ok
04 Feet to Miles feet = 10560 2.0 2.0 ok
05 Miles to Metres miles = 1.0 1609.34 1609.34 ok
06 Miles to Metres miles = 1.0 3218.69 3218.69 ok
07 Metres to Miles metres = 1609.34 1.0 1.0 ok
08 Miles to Metres metres = 3218.69 2.0 2.0 ok
09 Metres to Feet metres = 1.0 3.28084 3.28084 ok
10 Metres to Feet metres = 2.0 6.56168 6.56168 ok
11 Feet to Metres feet = 3.28084 1.0 1.0 ok
12 Feet to Metres feet = 6.56168 2.0 2.0 ok

Invalid Data

Test No Proposed Test Data Entered Expected Result Actual Result Comments
01 Invalid distance miles = 1.0m Error Message No Error Message Sends me straight back into code
02 Invalid unit choice = 55 Error Message No Error Message Sends me straight back into code
03 Invalid number choice = "miles" Error Message No Error Message Sends me straight back into code

Evaluation (20 Marks)

The student should add five limitations or useful extensions that could be added to the application

  1. My Application is limited to only Miles, Metres and Feet when there are many other metrics.
  2. The addition of other measurements could be a good improvement.
  3. Another improvement could be making the application more interactive for instance, instead of entering numbers to select measurements, you could simply click.
  4. Also, for some number you have to enter to convert, I noticed it needed a decimal place and sometimes the user may not remember to add one. So, making it so that a single number can stand-alone may be more efficient.
  5. One more limitation could be that the programme itself is not engaging enough and may not attract people users, due to its lack of design and aesthetics.