|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTrip
public class Trip
The Trip class is both an executable class and an instantiatable class
that each student must further define for HW4. For a complete description,
of this assignment go to:
http://www.cs.stonybrook.edu/~cse114/hw/HW4.html
This class runs a program that provides a menu to the user such that
they may enter trip information, including the starting city and
destination city, as well as the Latitude/Longitude coordinates of
those respective cities. This program then prints a trip summary
including the trip cities and the trip distance, which should be
calculated by a method in this class.
Author: Ian Sutherland
CSE 114 - Computer Science I - Fall 2009
Stony Brook University
Constructor Summary | |
---|---|
Trip()
Default Constructor for Trip, students should add code to this method to initialize all instance variables. |
Method Summary | |
---|---|
void |
inputLocation(int locale)
Method that prompts the user for trip data and then gets that input. |
static void |
main(java.lang.String[] args)
Driver method for executing the Trip program. |
void |
runTripProgram()
Method that displays and controls the program menu. |
java.lang.String |
toString()
Method that returns a string that "textually represents" this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Trip()
Method Detail |
---|
public void runTripProgram()
public void inputLocation(int locale)
locale
- Either START or END, it refers to whether the
user is entering data for the trip starting
or ending city.public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |