/* University of Alberta (http://www.cs.ualberta.ca/) */ /* CMPUT114(2003-2004, Fall) http://www-csfy.cs.ualberta.ca/~c114/F03 */ // // TextBus.java // CMPUT 114 // // Created by Vadim Bulitko on Mon Sep 08 2003. // Copyright (c) 2003 Vadim Bulitko. All rights reserved. // import java.util.*; import java.io.*; public class TestBus { public static void main (String[] args) { // Declare three bus variables Bus bus1; Bus bus2; // Create 2 buses bus1 = new Bus(true); bus2 = new Bus(true); // Check on the buses System.out.println("Is bus #1 in the garage? " + bus1.checkStatus()); System.out.println("Buses in garage: " + Bus.askNumberInGarage()); System.out.println(); // Tell bus #1 to leave System.out.println("Telling bus #1 to leave..."); bus1.leaveGarage(); System.out.println(); // Tell bus #1 to leave System.out.println("Telling bus #1 to leave..."); bus1.leaveGarage(); System.out.println(); // Tell bus #1 to return System.out.println("Telling bus #1 to return..."); bus1.returnToGarage(); System.out.println(); } }