App 1 Distance Converter - Amir94Mohamed/ConsoleApps 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 is 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 it to metres This app can use the fact that 1.0 miles contains 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.
  6. A Mobile Phone App version of the converter

Design: UML Activity Diagram

Stage 1

Activity Diagram

Stage 3

Activity Diagram

Design: UML Class Diagram (10 Marks)

The student should add a Class diagram of the completed App01 here App01 Class Diagram

This diagram was created in Visual Studio, but it is a feature that must be added during installation (Visual Studio Page). The relationships (associations) must be added using the toolbox. In doing that it adds more code to your classes. Visual Paradigm is better.

Console Testing: Screen Shots (16 Marks)

Console Testing

Rest in folder

Unit Testing (24 Marks)

Unit Testing

This screen shot needs replacing by the students own unit testing

Web App Screen Shots (16 Marks)

WebApp Distance Converter Webapp

A screen shot of the Web App version of the distance converter should be placed here

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 correct
02 Miles to Feet miles = 2.0 10560 10560 correct
03 Feet to Miles feet = 5280 1.0 1 Miles correct
04 Feet to Miles feet = 10560 2.0 2 Miles correct
05 Miles to Metres miles = 1.0 1609.34 1609.34 correct
06 Miles to Metres miles = 2.0 3218.69 3218.69 correct
07 Metres to Miles metres = 1609.34 1.0 1.0 correct
08 Miles to Metres metres = 3218.69 2.0 2.0 correct
09 Metres to Feet metres = 1.0 3.28084 3.28084 correct
10 Metres to Feet metres = 2.0 6.56168 6.56168 correct
11 Feet to Metres feet = 3.28084 1.0 1.0 correct
12 Feet to Metres feet = 6.56168 2.0 2.0 correct

Invalid Data

Test No Proposed Test Data Entered Expected Result Actual Result Comments
01 Invalid distance miles = 1.0m Error Message No error message Continued
02 Invalid unit choice = 55 Error Message Please, choose from the correct choice Continued
03 Invalid number choice = "miles" Error Message Please, choose from the correct choice Continued

Evaluation (20 Marks)

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

  1. First improvement, I would add is that unaccepted input will give the choice of reentering a valid number instead of continuing the project.
  2. Second improvement, Would be the error message for invalid inputs.
  3. Thirdly, I wanted a limited set of input that will prevent unnecessary inputs.
  4. I also want the option to reset the picked choice without restarting the project.
  5. Lastly i could have solved the code for the automated calculations for the unit testing.