Ticket Reservation System
Customers reserve, managers report — all in the terminal.
The final project for the object-oriented programming course. Customers reserve and verify tickets; managers add and edit events and pull sales reports through an admin menu. The point was class design, not the interface — composition for people and events, static members for shared totals, a friend function and a function template where they earned their place.
- 2023
- Design & implementation
- C++, OOP
- C++100.0%
From the repository
- 4
- ~960
- 3
- 2
Technical architecture
A single console program split into header and implementation pairs, one per class, with main.cpp owning the menus and the in-memory event catalogue.
Menus
- main.cpp
- Customer menu
- Manager menu
Customers list events and reserve; managers add or edit events and read sales.
Classes
- Person
- customer
- manager
- event
Validation lives in the setters; event keeps a static total count shared by every instance.
State
- static event record[99]
- Per-category sales counters
The catalogue and the concert, cinema and theatre sales totals live in static storage for the life of the program.
Engineering decisions
The brief was a checklist
The course required specific features — templates, friend functions, static members, composition, destructors, include guards — and each one has a real job in the program.
A template for time
organise_hour<T> accepts any numeric type and turns a shorthand hour like 19 into the 1900 format the catalogue stores.
Engineering checklist
The questions a reviewer asks, answered from the code — including the ones where the honest answer is no.
- Database designNot applicable
- No database: events live in a static array of 99 records for the life of the program.
- Errors & loggingPartly
- Validation in setters and input loops that re-prompt on bad values instead of crashing.
- TestsNot yet
- Tested by hand against the course brief.
What I would change now
- A std::vector and a file on disk would replace the fixed 99-slot array and let reservations survive a restart.
Connect Four, Mancala and two puzzles, in plain C.