A C D E G I L M P R S T

A

AmericanCity - Class in <Unnamed>
The AmericanCity class represents a simple city, where the name of the given city, and the state code are stored in private String instance variables.
AmericanCity() - Constructor for class AmericanCity
Default Constructor for AmericanCity, when called it initializes both the city name and the state code to NOWHERE.

Preconditions: The AmericanCity() constructor is called by a program and the result is assigned either to a variable of type AmericanCity or is passed to another method as a parameter of type AmericanCity.

Postconditions: An AmericanCity object is constructed and memory is reserved for use for that object.
AmericanCity(String, String) - Constructor for class AmericanCity
Second Constructor for AmericanCity, when called it initializes both the city and the stateCode to values provided in the parameter list.

Preconditions: This constructor is called by a program and the result is assigned either to a variable of type AmericanCity or is passed to another method as a parameter of type AmericanCity.

Postconditions: An AmericanCity object is constructed and memory is reserved for use for that object.

C

calcDistance(TripCity) - Method in class TripCity
Method that returns a Double that represents the distance in miles between two TripCity objects.

D

DEGREES_MIN - Static variable in class GeographicCoordinates
The int constant representing the minimum possible value for degrees as used in latitude and longitude representations.

E

EARTH_RADIUS - Static variable in class GeographicCoordinates
The int constant representing the radius of the earth in miles.

G

GeographicCoordinates - Class in <Unnamed>
The GeographicCoordinates class can be used to store and manipulate latitude and longitude data for geographical operations.
GeographicCoordinates() - Constructor for class GeographicCoordinates
Default Constructor for GeographicCoordinates, when called it initializes the degrees and minutes to 0, and the direction to '?'.

Preconditions: The GeographicCoordinates() constructor is called by a program and the result is assigned either to a variable of type GeographicCoordinates or is passed to another method as a parameter of type GeographicCoordinates.

Postconditions: A DistanceMeasurment object is constructed and memory is reserved for use for that object.
GeographicCoordinates(int, int, char) - Constructor for class GeographicCoordinates
Second Constructor for GeographicCoordinates, when called it initializes the degrees, minutes, and direction instance variables to the values provided in the parameter list.

Preconditions: This constructor is called by a program and the result is assigned either to a variable of type GeographicCoordinates or is passed to another method as a parameter of type GeographicCoordinates.

Postconditions: A GeographicCoordinates object is constructed and memory is reserved for use for that object.
getCity() - Method in class AmericanCity
Accessor method that returns the city String.

Preconditions: this AmericanCity object must be constructed with instance variables properly initialized.

Postconditions: The city instance variable is returned.
getDegrees() - Method in class GeographicCoordinates
Accessor method that returns the degrees.

Preconditions: this GeographicCoordinates object must be constructed with instance variables properly initialized.

Postconditions: The degrees instance variable is returned.
getDirection() - Method in class GeographicCoordinates
Accessor method that returns the direction.

Preconditions: this GeographicCoordinates object must be constructed with instance variables properly initialized.

Postconditions: The direction instance variable is returned.
getMinutes() - Method in class GeographicCoordinates
Accessor method that returns the minutes.

Preconditions: this GeographicCoordinates object must be constructed with instance variables properly initialized.

Postconditions: The minutes instance variable is returned.
getStateCode() - Method in class AmericanCity
Accessor method that returns the state code String.

Preconditions: this AmericanCity object must be constructed with instance variables properly initialized.

Postconditions: The stateCode instance variable is returned.

I

inputLocation(int) - Method in class Trip
Method that prompts the user for trip data and then gets that input.
isValidStateCode(String) - Static method in class AmericanCity
A static method that tests to see whether the testStateCode provided in the paramter list is a valid state code.

L

LAT_DEGREES_MAX - Static variable in class GeographicCoordinates
The int constant representing the maximum possible value for degrees as used in latitude representations.
LONG_DEGREES_MAX - Static variable in class GeographicCoordinates
The int constant representing the maximum possible value for degrees as used in longitude representations.

M

main(String[]) - Static method in class Trip
Driver method for executing the Trip program.
MINUTES_MAX - Static variable in class GeographicCoordinates
The int constant representing the maximum possible value for minutes as used in latitude and longitude representations.
MINUTES_MIN - Static variable in class GeographicCoordinates
The int constant representing the minimum possible value for minutes as used in latitude and longitude representations.

P

PI - Static variable in class GeographicCoordinates
The double constant representing the ratio of the circumference to the diameter of a circle.

R

RADIAN_FACTOR - Static variable in class GeographicCoordinates
The double constant used to convert numbers from degrees to radians.
runTripProgram() - Method in class Trip
Method that displays and controls the program menu.

S

setCity(String) - Method in class AmericanCity
Mutator method that allows the programmer to change the city.

Preconditions: this AmericanCity object must be constructed.

Postconditions: The city instance variable is assigned the value of changeCity.
setCity(String, String, int, int, char, int, int, char) - Method in class TripCity
Mutator method for TripCity, when called it sets both the city name, the state code, and coordinates to provided paramaters
setDegrees(int) - Method in class GeographicCoordinates
Mutator method that allows the programmer to change the degrees.

Preconditions: this GeographicCoordinates object must be constructed.

Postconditions: The degrees instance variable is assigned the value of changeDegrees.
setDirection(char) - Method in class GeographicCoordinates
Mutator method that allows the programmer to change the direction.

Preconditions: this GeographicCoordinates object must be constructed.

Postconditions: The direction instance variable is assigned the value of changeDirection.
setMinutes(int) - Method in class GeographicCoordinates
Mutator method that allows the programmer to change the minutes.

Preconditions: this GeographicCoordinates object must be constructed.

Postconditions: The minutes instance variable is assigned the value of changeMinutes.
setStateCode(String) - Method in class AmericanCity
Mutator method that allows the programmer to change the state code.

Preconditions: this AmericanCity object must be constructed.

Postconditions: The stateCode instance variable is assigned the value of changeState, using Upper Case letters.

T

toString() - Method in class AmericanCity
Method that returns a string that "textually represents" this object.
toString() - Method in class GeographicCoordinates
Method that returns a string that "textually represents" this object.
toString() - Method in class Trip
Method that returns a string that "textually represents" this object.
toString() - Method in class TripCity
Method that returns a string that "textually represents" this object.
Trip - Class in <Unnamed>
The Trip class is both an executable class and an instantiatable class that each student must further define for HW4.
Trip() - Constructor for class Trip
Default Constructor for Trip, students should add code to this method to initialize all instance variables.
TripCity - Class in <Unnamed>
The Trip class is both an executable class and an instantiatable class that each student must further define for HW4.
TripCity() - Constructor for class TripCity
Default Constructor for TripCity, when called it initializes both the city name and the state code to NOWHERE and coordinates to 0.
TripCity(String, String, int, int, char, int, int, char) - Constructor for class TripCity
Default Constructor for TripCity, when called it initializes both the city name, the state code, and coordinates to the provided parameters

A C D E G I L M P R S T