this.storeName = storeName; bikes.add(new Bike("Shimano", "Roadmaster", 20, "11111", 15, "Fair")); bikes.add(new Bike("Cannondale", "F2000 XTR", 18, "22222",12, "Excellent")); bikes.add(new Bike("Trek","6000", 19, "33333", 12.4, "Fair"));
if(bikes.contains(bike)) bikes.remove(bike);
Iterator iter = bikes.iterator(); while(iter.hasNext()) { Bike bike = (Bike)iter.next(); if(serialNo.equals(bike.getSerialNo())) return bike; } return null;
return bikes;
return storeName;
if(bikes.contains(bike)) bikes.remove(bike); bikes.add(bike);
this.storeName = name;
return "com.springbook.RentABike: " + storeName;