Overview
A menu-driven ferry booking system written in C11 for a Principles of Programming course project. Admin and passenger modes share route and booking records stored in dynamically allocated arrays of structures.
Routes and bookings
Administrators can add, update, remove, search, and sort ferry routes, then review passenger bookings and a booking summary. Route changes account for seats already booked, and routes with active bookings cannot be removed.
Passengers can browse routes, book multiple tickets, retrieve confirmations, and cancel bookings. Booking checks cover route existence, available seats, and the entered payment amount. Cancellation returns seats to the route and rejects a second cancellation of the same booking. Payment is a numeric CLI exercise, with no payment-provider integration.
Implementation
The project uses hand-written linear search and bubble sort. Arrays grow with
realloc, while separate modules handle routes, bookings, validation, and file
access. The menu collects input and formats results.
Routes and bookings persist in binary files between runs. Because those files store raw C structures, their format depends on the compiler and machine layout.