Crystal Wash Ltd operates an automatic car wash and uses a data structure to manage the list of cars that are waiting to be washed.

computer science

Description

Crystal Wash Ltd operates an automatic car wash and uses a data structure to manage the list of cars that are waiting to be washed. The application records the driver’s name and the washing program to be used for that particular car. When the automatic washing system becomes available, the application displays on a screen the driver’s name of the next car to be admitted for washing based on the first come first served principle.


Crystal Wash needs to be able to perform the following operations: addCar(car, program) : adds a car (and the chosen program) to the waiting list size(): to check how many cars are currently waiting in the car wash printCarsList() : outputs the details of all cars waiting to be washed wash(): removes a car from the waiting list (i.e. washes the car) nextCar() : returns the details of the next car to be washed removeAll(program): removes all the cars from the list on a given wash program 


 Suggest and include 2 more operations in your toolbox which would be suitable and useful for Crystal Wash.


Related Questions in computer science category