Class UFOsighting

java.lang.Object
  extended by UFOsighting

public class UFOsighting
extends java.lang.Object

Record that contains information about a UFO sighting

Version:
3/8/17
Author:
Dave Reed

Constructor Summary
UFOsighting(java.lang.String dateString, java.lang.String stateString, java.lang.String cityString)
          Constructs a UFO sighting object.
 
Method Summary
 java.lang.String getCity()
          Accessor for the sighting city.
 java.lang.String getDate()
          Accessor for the sighting date.
 java.lang.String getState()
          Accessor for the sighting state.
 java.lang.String toString()
          Converts the sighting to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UFOsighting

public UFOsighting(java.lang.String dateString,
                   java.lang.String stateString,
                   java.lang.String cityString)
Constructs a UFO sighting object.

Parameters:
dateString - the date of the sighting (e.g., "1997/10/17")
stateString - the state where the sighting occurred (e.g., "NE")
cityString - the city where the sighting occurred (e.g., "Omaha")
Method Detail

getCity

public java.lang.String getCity()
Accessor for the sighting city.

Returns:
the city where the sighting took place

getDate

public java.lang.String getDate()
Accessor for the sighting date.

Returns:
the date of the sighting

getState

public java.lang.String getState()
Accessor for the sighting state.

Returns:
the state where the sighting took place

toString

public java.lang.String toString()
Converts the sighting to a String.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the sighting (e.g., "1997/10/17 NE Omaha"