(String[] args)
| 56 | return cycles.toString(); |
| 57 | } |
| 58 | public static void main(String[] args) { |
| 59 | CarWash wash = new CarWash(); |
| 60 | System.out.println(wash); |
| 61 | wash.washCar(); |
| 62 | // Order of addition is unimportant: |
| 63 | wash.add(Cycle.BLOWDRY); |
| 64 | wash.add(Cycle.BLOWDRY); // Duplicates ignored |
| 65 | wash.add(Cycle.RINSE); |
| 66 | wash.add(Cycle.HOTWAX); |
| 67 | System.out.println(wash); |
| 68 | wash.washCar(); |
| 69 | } |
| 70 | } |
| 71 | /* Output: |
| 72 | [BASIC, RINSE] |