Four hand-written data structures.
Zero dependencies. Real engineering.

A complete car-rental workflow — customers, staff and a manager — on top of an AVL tree, a rehashing hash table, a binary min-heap and a doubly linked list, all implemented from scratch in C++17. Salted SHA-256 auth, ISO calendar dates, double-booking prevention, late-return penalties, a waitlist that auto-books freed slots, a tiered loyalty program, recurring weekly / biweekly / monthly series, dynamic loyalty-and-duration discounts, pickup reminders for the week ahead, bookings and whole series that move instead of cancelling, CSV & JSON reports, a monthly revenue report, a live analytics dashboard and an audited permission matrix. Leak-free under AddressSanitizer.

C++17 5,476 checks 92% line coverage ASan leak-free GCC · Clang · MSVC MIT
4
hand-written containers
5,258
unit-test checks
0
third-party dependencies
22
AVL height at 400k keys (bound ~25)

▸The data structures — and where they earn their keep

StructureUsed forComplexity
AVLTree<K,V>car index by name (sorted fleet view)O(log n) guaranteed
HashTable<K,V>username index, auto-rehash at load 0.75O(1) average
PriorityQueue<T>per-car booking schedule, earliest pickup firstO(log n)
DoublyLinkedList<T>insertion-order fleet listO(1) push

▸Highlights

Real calendar dates

Bookings, returns and maintenance logs speak strict YYYY-MM-DD — leap years included. Data files from older versions still load.

Security done properly

Salted SHA-256 password hashing verified against official FIPS 180-4 vectors, auto-lockout after 3 failed logins — and since 2.5.0 a 7-permission matrix enforced inside the facade, with every privileged action and denial landing in an append-only audit trail.

Booking rules that hold

Date-range overlap rejection, earliest-pickup-first scheduling with FIFO ties, renewal blocked while others wait — and since 2.6.0 a per-car waitlist that auto-books the best-fitting wish the moment a return frees the window.

Loyalty that earns its rank

Since 2.7.0 completed rentals pay 1 point per 10.00 spent at the rank's multiplier (Bronze → Platinum, up to ×2.0), ranks grow on lifetime points, and 10 points turn into 1.00 off the outstanding bill — every earn and redemption audited. Since 2.8.0 the standings ride along in report.json; since 2.9.0 rank crossings are announced at the desk, audited and listed on the overview, with a per-member loyalty_report.csv.

Series, discounts & the month at a glance

Since 3.0.0 a reservation can repeat weekly, biweekly or monthly (2–8 times): the whole series books atomically with a per-pickup estimate and cancels in one step. Invoices stack the long-rental rate (3–18%) with the rank rate (3–10%) multiplicatively — quoted at booking, announced at the desk, and late fees are never discounted. Every completed rental enters a history ledger the manager's monthly screen turns into revenue, discounts, per-car bars and the busiest day — on screen and as monthly_YYYY-MM.csv. Since 3.1.0 the week ahead greets the customer: PICKUP REMINDERS at login and above My reservations, soonest first, series tags included.

Change of plans, not a cancellation

Since 3.2.0 option 13 moves a booking instead of killing it: one booking to a new window, or a whole series shifted in one step with its plan spacing and length intact. The schedule is re-checked with the booking lifted out first — its old slot never blocks its own new dates — refusals change nothing and say why, and a series shift is atomic (Occurrence 3 names the clash). The id and arrival order survive, the price is re-quoted at the current rank, the reminders follow the new dates on their own, and reservation.moved / recurring.moved land in the audit trail.

Money with an audit trail

Automatic invoicing priced by one pure engine, 1.5× late-day penalties charged exactly once, customer balances, per-car income ledger — every privileged action audited.

CSV everything

Full state round-trip in data/*.csv, plus manager-exported fleet & bookings reports into reports/ — and one report.json holding stats, fleet, bookings and the loyalty program.

Tested like it matters

5,476 dependency-free checks — every v1.0 bug is now a regression test — green under AddressSanitizer + UBSan on every push.

▸Build & run in 10 seconds

# fastest path (any machine with a C++17 compiler)
g++ -std=c++17 -O2 mainApp.cpp manager_system/*.cpp -o car_rental
./car_rental

# or the full workflow
make            # car_rental + unit_tests
make test       # 5,258 checks
make bench      # containers vs std, measured
./scripts/demo.sh   # scripted end-to-end walkthrough

Demo accounts on first run: admin / manager123 · sara / staff123 · ali / customer123