|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStation
public class Station
Represents a weather-station
Constructor Summary | |
---|---|
Station(String name)
Constructs a weather station |
Method Summary | |
---|---|
void |
addObservation(Observation obs)
Adds an observation to the list of obervations |
String |
getName()
Gets the name of the statoion |
static void |
main(String[] args)
Test and demonstrates the Station class |
double |
meanWind()
Computes the mean wind |
int |
numberOfObservations()
Gets the number of observations |
int |
numberUsable(double low,
double high)
Count the number of usable wind observations |
void |
print()
Produces a printout of the station together with its obeservations. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Station(String name)
name
- The name of the stationMethod Detail |
---|
public void addObservation(Observation obs)
obs
- The observation to be addedpublic String getName()
public double meanWind()
public int numberOfObservations()
public int numberUsable(double low, double high)
low
- The lowest usable wind speedhigh
- The highest usable wind speed
public String toString()
toString
in class Object
public void print()
public static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |