This project provides a simple console-based interface to manage seat reservations. It allows users to reserve seats, cancel reservations, print the current seating map, save reservations to a file, and import reservations from a file.
.
├── src/
│ ├── core.py # Core functionalities for seat reservation system
│ ├── helpers.py # Utility functions to assist core functionalities
│ ├── state.py # Maintains the current state of reserved seats
│ └── enums.py # Enumerations used in the system
├── tests/
│ └── test_booking.py # Unit tests for the booking system
├── main.py # Main entry point for the application
└── reservations.json # (Generated if saved) Contains saved seat reservations
- Ensure you have Python installed on your system.
- Clone the repository.
- Navigate to the project root directory in your terminal.
- Run
main.pyto start the application:python main.py
- Reserve Seats: Allows users to reserve available seats.
- Cancel Reservations: Users can cancel their existing reservations.
- Print Seating Map: Displays a visual representation of the seating with reserved seats marked.
- Save to File: Saves the current reservations to
reservations.jsonin the project root. - Import from File: Imports reservations from
reservations.json, overwriting the current reservations.
Unit tests are provided in the tests/ directory. Specifically, refer to tests/test_booking.py.
To run the tests:
python -m unittest tests/test_booking.py
Feel free to fork this repository, make your improvements and then create a pull request.