@param args
(String[] args)
| 8 | * @param args |
| 9 | */ |
| 10 | public static void main(String[] args) { |
| 11 | ParkingLot lot = new ParkingLot(); |
| 12 | |
| 13 | Vehicle v = null; |
| 14 | while (v == null || lot.parkVehicle(v)) { |
| 15 | lot.print(); |
| 16 | int r = AssortedMethods.randomIntInRange(0, 10); |
| 17 | if (r < 2) { |
| 18 | v = new Bus(); |
| 19 | } else if (r < 4) { |
| 20 | v = new Motorcycle(); |
| 21 | } else { |
| 22 | v = new Car(); |
| 23 | } |
| 24 | System.out.print("\nParking a "); |
| 25 | v.print(); |
| 26 | System.out.println(""); |
| 27 | } |
| 28 | System.out.println("Parking Failed. Final state: "); |
| 29 | lot.print(); |
| 30 | } |
| 31 | |
| 32 | } |
nothing calls this directly
no test coverage detected