FileDocCategorySizeDatePackage
CommandLineView.javaAPI DocExample563Fri Apr 22 10:43:24 BST 2005None

CommandLineView.java

import java.util.Iterator;


public class CommandLineView {
   private RentABike rentaBike;
   public CommandLineView() {rentaBike = new RentABike("Bruce's Bikes");}

   public void printAllBikes() {
      System.out.println(rentaBike.toString());
      Iterator iter = rentaBike.getBikes().iterator();
      while(iter.hasNext()) {
         Bike bike = (Bike)iter.next();
         System.out.println(bike.toString());
      }
   }

   public static void main(String[] args) {
      CommandLineView clv = new CommandLineView();
      clv.printAllBikes();
   }
}