/******************************** MAIN HEADER ********************************** Title: Taxi Files: Main.java, Taxi.java Author: Michael Schultz CS Login: mschultz Collaborators: Due Date: Completion Date: 9/24/02 Course: CS 302 TA: Mr. Schultz Compiler: Code Warrior IDE 5.0 Platform: Windows 2000 *******************************************************************************/ /** * Starts up the program in the main() method, then performs a series of tests * for Taxi instances. * Bugs: none known * * @author Michael Schultz * @version 1.0 * @see also Test, Taxi */ public class Main { /** * Begins the program running, testinf various Taxi objects. * * @param args An array of strings that are the arguments to the command line * when the program is run */ public static void main(String[] args) { System.out.println("Hello, World!\n"); Taxi taxi1 = new Taxi(302); System.out.println(taxi1); taxi1.startWorkDay("Ellen"); taxi1.pickUpPeople(Taxi.STANDARD_RATE); taxi1.drive(30); taxi1.dropOffPeople(); taxi1.stopWorkDay(); System.out.println(taxi1); Taxi taxi2 = new Taxi(367); taxi1.startWorkDay("Chris"); taxi2.startWorkDay("Erin"); taxi1.pickUpPeople(Taxi.STANDARD_RATE); taxi2.pickUpPeople(Taxi.STUDENT_RATE); taxi1.drive(24); taxi2.drive(10); System.out.println(taxi1); System.out.println(taxi2); taxi2.dropOffPeople(); taxi2.pickUpPeople(Taxi.STANDARD_RATE); taxi2.drive(15); taxi2.dropOffPeople(); System.out.println(taxi2); taxi2.drive(65124); taxi2.stopWorkDay(); taxi1.dropOffPeople(); taxi1.stopWorkDay(); System.out.println(taxi1); System.out.println(taxi2); } }