This project consists of a CRUD (Create, Read, Update, Delete) system to manage vehicle information. The implementation is in the C language and follows a modular structure to facilitate code maintenance and expansion.
-
src/
: Folder containing the project source code.main.c
: Contains themain
function, which initializes the program, reads vehicle data from the file, displays the main menu, accepts user input, and writes vehicle data back to the file.
-
lib/
: Folder containing project modules.-
menu.h
andmenu.c
: Define and implement functions related to the main menu of the program. -
crud.h
andcrud.c
: Define and implement functions related to vehicle manipulation (add, edit, delete, etc.).
-
-
test/
: Folder containing tests or files related to tests.-
vehicle.txt
: General file used in tests. -
vehicle.txt
: File with vehicle data used in tests.
-
-
app/
: Folder containing the program executable.program
: Executable generated after compilation.
To compile the project, use the following command:
gcc lib/*.c src/*.c -o app/program
To run the program:
./app/program
gcc lib/*.c src/*.c -o app/program
To run the program:
cd app
program
The program offers the following functionalities:
- List all vehicles.
- Search for a vehicle by plate.
- Add a new vehicle.
- Edit information of an existing vehicle.
- Delete a vehicle.
Vehicle data is stored in the vehicle.txt
file. This file is read at the program's startup and updated at the end of the program's execution.
-
Make sure to have a C compiler installed on your system (e.g., GCC).
-
Vehicle data is stored in an array structure, and the program handles a maximum of 100 vehicles.