A restaurant owner has asked you to implement a booking system for their restaurant. Please implement the following requirements one by one.
- Keep it simple
- Do not create API endpoints
- Do not use a real database (hard-coded JavaScipt objects/arrays are fine)
- Use simple functions and/or classes
- Write tests as you go
-
A Customer should be able to book a seat.
-
The Restaurant has a limited capacity and only has space for 30 seats.
-
The Owner can see the amount of free seats available.
-
The Owner can see the seat number of the next available seat.
-
The Customer should be able to book a table rather than individual seats. Each table has two seats.