I failed a job interview because my solution to the given Java problem wasn't object oriented. I was able to solve the problem but it's more of a procedural design than Object oriented.
The problem was something like: Create a java program for a restaurant that will read a CSV file with the given format: Name|Cellphone Number|Number of Seats|Time Period|Status
Status could be: Confirmed, No Show, Cancelled Time Period is between 8:00 - 16:00 with every two hours duration. E.g. 8:00 - 10:00, 12:00 - 14:00, 14:00 - 16:00
The program should generate a report file based on the reservations with the following information: 1. Total number of seats with Confirmed reservation. 2. Total number of seats with No Show reservation. 3. Total number of seats with Cancelled reservation. 4. Time Period with highest Confirmed reservation 5. Time Period with highest No Show reservation. 6. Time Period with highest Cancelled reservation.
Know that I'm thinking of making a more OO solution, there are a lot of solutions I can think of. What do you guys think of the best design to solve this problem? No need to go through the code just the design to the solution would be a big help.
Aucun commentaire:
Enregistrer un commentaire