Vehicle Management System
A menu-driven Vehicle Management System in pure C that manages 100 fleet records with modular CRUD, search, filtering, summary analytics, tiered billing, and undo.
Status
Completed
Technologies
1
Overview
The Vehicle Management System is a menu-driven console application built in pure C (C99) with zero dependencies. It manages up to 100 vehicle records across 5 types — Car, Bike, Truck, Bus, and Electric Vehicle — using structs and static arrays. The codebase is fully modular with 11 files coordinated through vehicle.h, separating add, show, search, update, delete, filter, summary, billing, and undo logic. It supports full CRUD with auto-generated IDs (V001…), cloning, 6-way search, multi-condition filtering, and targeted plus bulk partial updates. Advanced features include 5 statistical summary reports, grouped/EV-only display modes, and a command-based single/bulk delete system. A tiered billing engine calculates service charges by engine capacity, seats, battery, and vehicle age with validation and retry policies. A single-level undo system can roll back the last add, update, or delete, while strict input validation keeps all records consistent. The program runs in an infinite validated menu loop via GCC and exits only on user request, making it a clean demo of structured programming and manual record handling.
Key Features
- Modular Add with Cloning Auto-generated IDs with type-specific validation for Bike, Car, Truck, Bus and EV plus one-click cloning.
- Smart Display and 6-Way Search Grouped, EV-only and full list views with fast search by ID, type, model, brand, year and fuel.
- Flexible Update System Single-record edit plus partial bulk update for matching brands, types and engine ranges.
- Command-Based Bulk Delete Delete by ID, by brand, by year or by condition with safe array shifting and integrity checks.
- 5-Report Summary Analytics Type distribution, year range, average engine, brand frequency and EV battery statistics in O(n).
- Tiered Billing plus Undo Safety Engine, seat and battery based service charges with age surcharge and single-level rollback for add, update and delete.
Technology Stack
Language
Screenshots



Timeline
Planning & Data Modeling
Defined scope, 13-field Vehicle struct, MAX 100 limit, and 11-file modular architecture
Core CRUD Build
Implemented menu loop, add with clone, show grouped views, update, and shift-based delete
Search & Intelligence
Added 6-way search, multi-condition filter, 5 summary reports, and grouping logic
Billing & Safety
Built tiered billing by engine/seat/battery plus age surcharge and single-level undo
Validation & Docs
Enforced per-type ranges with retry policy, GCC strict build, testing, and full documentation
Challenges
- Manual record shifting in fixed static array without data corruption during bulk delete and undo restore
- Type-specific validation with different ranges for engine, seats, gears, battery and 2-attempt retry policy
- Fat-struct tradeoff handling unused fields cleanly across Bike, Car, Truck, Bus and EV in one struct
- Building deterministic tiered billing with engine, seat, battery tiers plus age surcharge edge cases
- Preventing scanf infinite loops and menu crashes with robust invalid-input flushing and persistent loop control
Solutions
- Used count as logical size with left-shift on delete and right-shift on undo restore to keep array contiguous
- Created per-type validator functions with range checks and 2-attempt abort to enforce clean add and update flows
- Standardized single Vehicle struct with zeroed unused fields and type-gated display so copy is one-line assignment
- Implemented pure rule-based billing function with clamped tiers and age check for fully deterministic charges
- Added scanf return check plus getchar flush loop inside while(
- switch so bad input never breaks the menu