0% found this document useful (0 votes)
9 views19 pages

103 Group Presentation

The document presents a Vehicle Management System project implemented in C, allowing users to manage vehicle records through various operations such as adding, searching, viewing, deleting, and updating vehicles. It includes user authentication features and ensures data integrity through validation functions for names and dates. The system is designed for educational purposes and aims to provide a fast and flexible solution for vehicle data management.

Uploaded by

jssaha20005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views19 pages

103 Group Presentation

The document presents a Vehicle Management System project implemented in C, allowing users to manage vehicle records through various operations such as adding, searching, viewing, deleting, and updating vehicles. It includes user authentication features and ensures data integrity through validation functions for names and dates. The system is designed for educational purposes and aims to provide a fast and flexible solution for vehicle data management.

Uploaded by

jssaha20005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

EAST WEST UNIVERSITY

PRESENTING TO :
• Dr Mohammad Manzurul Islam
• Course Title : Structured Programming
• Course Code : CSE-103
• Section : 8

• PRESENTING BY :
Jobaer Abdullah
ID : 2024-3-60-298

Shakil Shahriar Ifti


ID : 2024-3-60-300
VEHICLE MANAGEMENT
SYSTEM
PROJECT
INTRODUCTION :
The code is a Vehicle Management System implemented in C.
It allows a user to perform operations like adding, searching,
viewing, deleting,and updating vehicles.
It also has functionality for logging in with a username and
password, and updating the credentials.
Code :

• These functions manage


vehicle records and user
interactions.
Explaination :

In this code:
int maxVehicle = 100; sets the maximum
number of vehicles that can be added to the system (up to
100).
int vehicle_count = 0; starts with a count of 0,
meaning no vehicles are currently in the system.
These variables help keep track of how many
vehicles are stored and ensure the system
doesn't exceed the maximum limit.

The code defines two structures:


1.struct vehicle: Stores details about a vehicle (ID, name, manufacturer,
issued date). An array newVehicle[100] holds up to 100 vehicles.
2.struct User: Stores login credentials (username and password). A predefined user
(admin, admin123) is initialized.
Explaination :

The main () function starts the program by


calling the login() function for user The print_Message_in_Center() function takes a
authentication and then the menu() function message, calculates how much space is needed
for the main menu. on each side to center it, and then prints the
The head_Message() function message in the middle of a decorative border
made of <~> symbols.
displays a decorative header for the Vehicle
Management System.
Explaination :

The welcome_Message()
function displays a decorative
welcome screen for the "Vehicle
Management System," showing a
project title and welcoming text. It
prompts the user to press any key to The login() function asks the user to enter a
continue. username and password.

If the input matches the predefined credentials


(admin, admin123), it displays the welcome
message using welcome_Message().
If the credentials are incorrect, it shows an error
message and asks the user to try logging in again by
calling login() recursively.
Explaination :

The menu() function displays the main menu of the Vehicle Management System, allowing the user to choose an option by entering a number between 1 and
6.
How it works:1.Menu Display: It shows a list of options:Add a vehicle, Search for vehicles, View all vehicles, Delete a vehicle, Update password, Exit the
program.
2.User Input: It asks the user to enter their choice.
3.Action Based on Choice:Calls specific functions like addVehicleInDataBase(), searchVehicles(), etc., based on the user's input.If the choice is invalid, it
displays an error message and prompts again.
4.Repeat Until Exit: The menu keeps showing until the user selects option 6 to exit.
5.Exit Message: Displays a thank-you message when the program ends.
Explaination :

The is_Name_Valid() function checks if a given name is valid based on The is_Valid_Date() function checks if a given date is valid.
specific rules. Extract Date Components:It uses sscanf() to read the day, month, and year from the
string in the format dd/mm/yyyy.If the format is incorrect, it returns 0 (invalid).
Empty Name Check:If the name is empty (name[0] == '\0'), the
function returns 0 (invalid). Day and Month Checks:Ensures the day is between 1 and the maximum days in the
given month (days_in_month array).Ensures the month is between 1 and 12.
Character Check:It loops through each character in the name.If any Leap Year Adjustment:For February, checks if the year is a leap year (divisible by 4 but
character is not: An uppercase letter (A-Z), A lowercase letter (a-z), or not by 100, or divisible by 400).If it is a leap year, February is updated to have 29 days.
A space (' '),the function returns 0 (invalid).
Year Check: Ensures the year is between 1900 and 9999.
Valid Name:If all characters in the name are valid, the function returns Valid Date: Returns 1 if all checks pass; otherwise, returns 0.
1 (valid).
Purpose: Ensures that the input date is valid, considering the calendar rules
Purpose: This ensures that names only contain letters and spaces, (including leap years).
and are not empty.
Explaination :

The addVehicleInDataBase() function allows the user to


add a new vehicle to the system by providing details like
the vehicle's ID, name, manufacturer, and issued date.
Here's how it works in simple terms:
1. Display Header:
•Prints a title and section header for adding a new
vehicle.
2. Enter Vehicle ID:
•Asks the user to input a unique ID for the vehicle.
3. Enter Vehicle Name:
•Repeatedly prompts for the vehicle's name until it
passes the validation (only letters and spaces are
allowed).
Explaination : 4.Enter Manufacturer Name:
•Similar to the vehicle name, prompts for the
manufacturer's name and validates it.

5.Enter Issued Date:


•Asks for the issued date of the vehicle in the format
day/month/year.
•Validates the date, including leap years.

6.Save the Vehicle:


•If all inputs are valid, the vehicle's details are saved to
the system, and a success message is displayed.

7.Increment Vehicle Count:


•Updates the total count of vehicles stored in the system.

• Purpose:
• The function ensures that all vehicle details are valid
before saving them, maintaining data integrity in the
database.
Explaination : searchVehicles() function lets the user search for a vehicle
by its name and displays its details if found. Here's how it works
in simple terms:
1.Display Header:
•Prints the title and section header for searching
vehicles.
2.Ask for Vehicle Name:
•Prompts the user to enter the name of the vehicle
they want to search.
3.Search Through Vehicles:
•Loops through all stored vehicles and compares
the entered name with the names in the database.
4.If Found:
•If a match is found, displays the vehicle's details:
•Vehicle ID
•Name
•Manufacturer
•Issued date
5.If Not Found:
•If no match is found, shows a message: "No
Record Found."
Explaination :
6.Return to Menu:
•Waits for the user to press a key and then returns
to the main menu.
Purpose:
This function helps the user quickly locate vehicle
details in the database by searching with the vehicle's
name.

If the name matches a stored vehicle, it displays the


details; otherwise, it informs the user that no record
was found.
Explaination :

2.Check for Records:


•If there are no vehicles (vehicle_count == 0), it shows a
message: "No Record."
3.Loop Through Records:
•For each vehicle in the database:
•Displays the vehicle's count (position in
the list).
•Shows its details, including:
•Vehicle ID
•Vehicle Name
•Manufacturer Name
•Issued Date
4.Return to Menu:
•After displaying all vehicles, prompts the user
to press any key to return to the main menu.
The viewVehicles() function displays the details of
all vehicles stored in the database. Here's how it works Purpose:
in simple terms: This function allows the user to view all the vehicles
currently in the database. If there are no vehicles, it shows an
1.Display Header: appropriate message. If vehicles exist, their details are
displayed in an organized format.
Prints a title and section header for viewing
vehicle details.
The deleteVehicles() function removes a vehicle from the database based on its ID.
Explaination : Here's how it works:
1.Display Header:
•Prints a title and section header for deleting vehicle
details.
2.Prompt for Vehicle ID:
•Asks the user to enter the ID of the vehicle they want to
delete.
3.Search for the Vehicle:
•Loops through all stored vehicles to find the one with the
matching ID.
4.Delete the Vehicle:
•If a match is found:
•Shifts all subsequent vehicles one position up to fill
the gap.
•Decreases the vehicle_count by 1.
•Displays a success message: "Record Deleted
Successfully."
•Exits the function.
•If no match is found, it shows a message: "Record Not
Found."
Purpose:
This function allows the user to remove a vehicle from the database by
providing its ID. If the ID exists, the record is deleted; otherwise, the user
is informed that no record was found.
Explaination : The updateCredential() function allows the user to change
their username and password. Here's a simple explanation:
1.Display Header:
•Shows a header for the "Update Credential" section.

2.Prompt for New Credentials:


•Asks the user to input a new username and
password.

3.Update Credentials:
•Replaces the old username and password with the new
ones.

4.Confirmation and Re-login:


•Confirms the credentials have been updated successfully.
•Prompts the user to log in again with the updated
credentials by calling the login() function.
Purpose:
This function updates the username and password for the
application and ensures the user re-authenticates with the new
credentials for security.
Conclusion :
• Since the project has been designed exclusively as a project , certain
complexities that do faced by any real-life manual problem like total
number of vehicle data . The “Vehicle Management System” is fast
and flexible . The system lets people add vehicle data online and
provides data collection .
Thank You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy