JMU
logoDukeDash.png
Software Requirements Specification: TripSetter


Introduction
The TripSetter application is given a current speed measured in mi/hr, a trip distance measured in ft, and a trip duration measured in hr and displays the equivalent current speed in km/hr and the trip speed in both km/hr and mi/hr.
Existing Components

The Text class (that you used in PA1) contains functions that can be used to convert from a String to a number.

The Dashboard class (that you used in Part d of PA1) contains functions that can be used to display the current speed and trip speeds. In addition to the setSpeed() function that you have already used, it contains the following function:

setTripSpeed() is passed two double values. The first is the speed measured in km/hr and the second is the speed measured in mi/hr. This functions does not return anything (i.e., it is void).

Requirements of New Components

The system must satisfy the following physical requirements: Definition

PR-1 The application must be named TripSetter

The system must satisfy the following operational requirements: Definition

OR-1 Command-line argument 0 must contain a String representation of the current speed in mi/hr, which may contain a decimal point.

OR-2 Command-line argument 1 must contain a String representation of the trip distance in ft, without a decimal point.

OR-3 Command-line argument 2 must contain a String representation of the trip duration in hr, which may contain a decimal point.

OR-4 The application must use the Converter class for all conversions of units (e.g., from mi/hr to km/hr, from ft to mi).

OR-5 Command-line argument 1 must be converted to an int. (That is, it must not be converted to a double.)

OR-6 The application must pass the setSpeed() function in the Dashboard class the current speed in km/hr (calculated from command-line argument 0).

OR-7 The application must pass the setTripSpeed() function in the Dashboard class the trip speed in km/hr and the trip speed in mi/hr (calculated from command-line arguments 1 and 2).

Copyright 2013