Bike Rental Management System

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

BIKE RENTAL MANAGEMENT SYSTEM

A MINI PROJECT REPORT

Submitted by

UDAYA PRAKASH P (95071915050)

PERIASAMY HANUMANTH P S (95071915032)

BACHELOR OF TECHNOLOGY
in

INFORMATION TECHNOLOGY

FRANCIS XAVIER ENGINEERING COLLEGE


(Autonomous)
TIRUNELVELI – 627 003

JUNE 2022
FRANCIS XAVIER ENGINEERING COLLEGE
(Autonomous)
TIRUNELVELI 627 003

BONAFIDE CERTIFICATE

Certified that this mini project report “BIKE RENTAL

MANAGEMENT SYSTEM” is the bonafide work of” UDAYA

PRAKASH P (95071915050), PERIASAMY HANUMANTH P S

(95071915032)” who carried out the project work towards the completion

of Value Added Course VAC4001 – Fundamentals of Computational

Thinking and Coding.

Signature of the Supervisor Signature - HoD


Dr.T.C. Subbu Lakshmi, M.E, Ph.D Dr.J.B.Shajilin Loret, M.Tech, Ph.D
Associate Professor Associate Professor
Dept of IT Dept of IT
FXEC FXEC

Submitted for the course evaluation held on ……………………………….

INTERNAL EXAMINER EXTERNAL EXAMINER


CHAPTER TABLE OF CONTENT PAGE NO
NO
1. Introduction 5

2. 2.1 C Language 6

2.2 CodeBlocks 6

3. Modules Used 7

4. Output Screenshot 9

5. Conclusion And Future Enhancement 13

6. Appendix 14

Coding 15

Reference 21

Certificates 22
ABSTRACT

Facing the growth of urban mobility in the city of Sfax and the problems of
traffic, congestion and pollution, the development of active transportation has become an
unavoidable solution.The Bike Renting System code was developed in a simple console
application, the system strictly needs user login information in order to access the system.
The user can do a set of tasks in the system, the user can register a rented bike detail, view
the Record of the Rental, remove Record of the Rental, and edit the record. The system has
all the needed functions to operate the renting system, you can easily edit, delete, view,
manage and search the renting process by filling in the customer details. The data that will
be input will be stored as a text extension file. The Bike Renting System was created in a
basic coding structure of C to teach and help the beginner to start their programming
career.
CHAPTER 1

INTRODUCTION

The Bike Rental Management system is based on the concept to generate the
rental records and to add details and update it. Here Users can Add their Bike’s Information
as well as Customer’s. The whole project is designed in ‘C’ language and different variables
and strings have been used for the development of this project. It’s easy to operate and
understand by users.The system can help you edit, delete views, manage and search for the
renting of bikes for your customer. The purpose of the Bike Renting System is to assist and
to maintain the managing of customer renting records and also to provide a platform for
users and rental bike owners in an effective and efficient manner.

KeyWords: Bike Rent, BRMS Structure, C Language, Code::Blocks.


CHAPTER 2

TECHNOLOGIES USED

2.1 C Language

C language Tutorial with programming approach for beginners and


professionals, helps you to understand the C language tutorial easily. Our C tutorial
explains each topic with programs. The C Language is developed by Dennis Ritchie for
creating system applications that directly interact with the hardware devices such as
drivers, kernels, etc. C programming is considered as the base for other programming
languages, that is why it is known as the mother language.

2.2 Code::Blocks

CodeBlocks is a cross-platform C++ IDE (Integrated Development


Environment) that allows developers to code, debug, build, run and deploy projects. It
provides powerful options to customize your development environments, such as source
control integration and graphical views of memory and CPU usage.In addition, Code
Blocks is rated at 100%, while Visual Studio IDE is rated 96% for their user satisfaction
level. You can also assess their product details, including functions, tools, options, plans,
costs, and others.
CHAPTER 3

MODULES USED

3.1 Rent a Bike:

In this module, the user can rent a bike by providing the following information to the
rental owner like Number of bike, Name of bike, Days, Nationality, Location, Address, Phone
Number. After providing it will be saved.

3.2 View Records of Rental Bikes:

In this module, the rental owner can see the number of bikes rented from
where, when, by whom all the details in view module. It makes it easier for the owner to
make use of it.

3.3 Remove Module:

After returning the bikes the owner is easily able to remove the bikes which
are in records.

3.4 Search Module:

If there are many more rental bikes, the owner can easily find the bikes by
giving the bike number. It also provides all the details about the user.

3.5 Edit Module:

If there are any mistake in details the owner can easily edit the details by
using this module.

3.6 Login and Logout module:

The owner can login and logout for some safety measures.
3.7 Working Design of Bike Rental Management System:
CHAPTER 4

OUTPUT SCREENSHOT

Index Page Fig 4.1

Login Page Fig 4.2


Home Page Fig 4.3

Rent A Bike Page Fig 4.4


View Page Fig 4.5

Search Page Fig 4.6


Edit page Fig 4.7

Exit Page Fig 4.8


CHAPTER 5

CONCLUSION AND FUTURE ENHANCEMENT

In sum, Making the strategy to start up the business is easy,And


implementing it to be the best and successful one or not has been becoming tough
for all types of business people.The purpose of the Bike Renting System is to assist
and to maintain the managing of customer renting records and also to provide a
platform for users and rental bike owners in an effective and efficient manner.

● We will make this platform only for bikes but, in future we can make it for
bicycles, cars, bus, trucks, etc,.. and make it beneficial for users and rental
owners .
● We will make it easier for users .
● We will add another option like History that a single user can see his rental
bikes he rented from several areas.
● We will have an idea to set the remainder to return the rental bike.
APPENDIX

CODING

#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<windows.h>
#include<stdlib.h>
#include<time.h>
void main_menu();
void add();
void list();
void edit();
void delete1();
void search();
void gotoxy(int x, int y)
{
COORD CR;
CR.X=x;
CR.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), CR);
}
void setcolor(int ForgC)
{ WORD wColor;
HANDLE hStdOut=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO csbi;
if(GetConsoleScreenBufferInfo(hStdOut,&csbi))
{
wColor=(csbi.wAttributes & 0xF0)+(ForgC & 0x0F);
SetConsoleTextAttribute(hStdOut,wColor);
}}
void login()
{
int a=0,i=0;
char uname[10],c=' ';
char pword[10],code[10];
char user[10]="admin";
char pass[10]="admin";
do
{ printf("\n <<<<<<<<<<<<<<<<<<<<<<<<< LOGIN FORM >>>>>>>>>>>>>>>>>>>>>>>>>> ");
printf(" \n ENTER USERNAME:-");
scanf("%s", &uname);
printf(" \n ENTER PASSWORD:-");
while(i<10)
pword[i]='\0';
i=0
if(strcmp(uname,"admin")==0 && strcmp(pword,"admin")==0)
{
printf(" \n\n\n NOW YOU ARE LOGGED IN. WELCOME TO OUR SYSTEM !!");
printf("\n\n\n\t\t\t\tPress any key to continue...");
getch();
break;
}
else
{ }
system("cls");
}
printf("\t\t| |\n");
printf("\t\t| |\n");
printf("\t\t| ----------------------------- |\n");
printf("\t\t| BIKE RENTAL SYSTEM |\n");
printf("\t\t| ----------------------------- |\n");
printf("\t\t| |\n");
printf("\t\t| |\n");
printf("\t\t| |\n");

time(&t);
char customername;
char choice;
system("cls");
while (1) // INFINITE LOOP
{
system("cls");
setcolor(55);
for(i=0;i<80;i++)
printf("-");
printf("\n");
printf(" ************************************** |MAIN MENU| **************************************
\n");
for(i=0;i<80;i++)
printf("-");
printf("\n");
setcolor(55);
printf("\t\t *Select and Enter Your Choice From Menu*:");
printf("\n\n"); printf("\
n**************************************");
printf(" \n Enter 1 ->> Rent a bike"); printf("\
n**************************************");
printf(" \n Enter 2 ->> View Rental Record"); printf("\
n**************************************");
printf(" \n Enter 3 ->> Remove Rental Record"); printf("\
n**************************************");
printf(" \n Enter 4 ->> Search Rental Record"); printf("\
n**************************************");
printf(" \n Enter 5 ->> Edit Record"); printf("\
n**************************************");
printf(" \n Enter 6 ->> Exit"); printf("\
n**************************************"); printf("\
n \n");
for(i=0;i<80;i++)
printf(">");
printf("\nCurrent date and time : %s",ctime(&t));
for(i=0;i<80;i++)
printf("<");
choice=getche();
choice=toupper(choice);
switch(choice) // SWITCH STATEMENT
{
case '1':
add();break;
case '2':
list();break;
case '3':
delete1();break;
printf("\n Enter Customer Details:");
printf("\n ");

if((f = fopen("add.txt","r+"))!=NULL)
{
ADD:
printf("\n Enter bike number\t: ");
scanf(" i%",&bikenumber);
while(fscanf(f,"%i %s %s %s %s %s %i\n", &s.bikenumber, s.name, s.address, s.phonenumber, s.nationality, s.email,
&s.period)!=EOF)
{
if(bikenumber == s.bikenumber)
{
printf("\n\tTHIS BIKE IS ALREADY ON RENT.");
goto ADD;
}
}
}
do
{
A:
printf("\n Enter Address\t\t:");
scanf("%s",s.address);
if(strlen(s.address)>20 || strlen(s.address)<2)
{
printf("\nInvalid!!\n\tThe maximum number for customer's name is less than 21 and more than 1.\n");
goto A;
}
else
{
for (i=0;i<strlen(s.address); ++i)
{
if(isalpha(s.address[i]))
{
valid = 1;
}
else
{
valid = 0;
break;
}
}
if (!valid)
{
printf("\nName contain invalid character. Please enter again.\n");
}
}
}while(!valid);
do
{
P:
printf("\n Enter Phone Number\t: ");
scanf("%s",s.phonenumber);
if (strlen(s.phonenumber)!=10 || strlen(s.phonenumber)>10)
{
printf("\nPhone number should be of 10 numbers from 0-9. Please, enter valid number.\n");
goto P;

for(i=0;i<strlen(s.nationality); i++)
{
if(isalpha(s.nationality[i]))
{
valid=1;
}
else
{
valid=0;
break;
}
}
if(!valid)
{
printf("\nThe nationality name contains only character. Please, enter again.\n");
}
}while(!valid);
do
{
printf("\nEnter Email\t\t: ");
scanf(" %s",s.email);
if(strlen(s.email)>35||strlen(s.email)<10)
{
printf("\nInvalid!!\n\tThe maximum number for customer's email is less than 31 and more than 10.\n");
}
}while(strlen(s.email)>35||strlen(s.email)<2);
do
{
printf("\nEnter Time Period(\'x\'days)\t: ");
scanf("%i",&s.period);
if(s.period>10 || s.period<=0)
{
printf("\tInvalid!!\n\tThe maximum bike rental days for customer is upto 10 days .\n");
}
}while(s.period>10 || s.period<=0);
fprintf(f,"%i %s %s %s %s %s %i\n", s.bikenumber, s.name, s.address, s.phonenumber, s.nationality, s.email, s.period);
printf("\n\n Your Desired Bike is rented successfully!!");
fclose(f);
}
printf("\n Press esc key to exit, any other key to add another customer detail:");
test=getche();
if(test==27)
main_menu();
else
add();
}
void list()
{
FILE *f;
int i, q;
if((f=fopen("add.txt","r"))==NULL)
exit(0);
system("cls");
gotoxy(1,6);
printf("BIKENUMBER ");
gotoxy(15,6);
printf("NAME ");
gotoxy(30,6);
printf("ADDRESS ");
gotoxy(45,6);
printf("PHONENUMBER ");
gotoxy(60,6);
printf("NATIONALITY ");
gotoxy(75,6);
printf("EMAIL ");
gotoxy(100,6);
printf("PERIOD \n");

for(i=0;i<110;i++)
{
printf("%s",s.email);
gotoxy(101,q);
printf("%i",s.period); q+
+;
}
printf("\n");
for(i=0;i<110;i++)
printf("-");

fclose(f);
getch();

void delete1()
{
FILE *f,*t;
int i=0;
int bikenumb;
t=fopen("temp.txt","w");
if ((f=fopen("add.txt","r"))==NULL)
{
printf("NO RECORD ADDED.");
main_menu();
}
getch();
fclose(f);
fclose(t);
main_menu();
}
else
{
printf("\n\tSuccessfully deleted.\n");
}
fclose(f);
fclose(t);
remove("add.txt");
rename("temp.txt","add.txt");
getch();
}}
void search()
{
system("cls");
FILE *f;
int bikenumber;
int flag=1;
f=fopen("add.txt","r+");
if(f==0)
{
printf("NO RECORD ADDED.");
main_menu();
}
else
{
fflush(stdin);
printf("Enter bike number of the customer to search its details: \n");
scanf("%i", &bikenumber);
while(fscanf(f,"%i %s %s %s %s %s %i\n", &s.bikenumber, s.name, s.address, s.phonenumber, s.nationality, s.email,
&s.period)!=EOF)
{
if(bikenumber==s.bikenumber)
{
flag=0;
printf("\n\tRecord Found\n");
printf("\nBike Number\t: %i",s.bikenumber);
printf("\nName\t\t: %s",s.name); printf("\
nAddress\t\t: %s",s.address); printf("\nPhone
number\t: %s",s.phonenumber); printf("\
nNationality\t: %s",s.nationality); printf("\
nEmail\t\t: %s",s.email); printf("\nPeriod\t\t:
%i",s.period);
break;
}

void edit()
{
FILE *f, *r;
int k=0;
char ed;
int bikenumber;
long int size=sizeof(s);
if((f=fopen("add.txt","r+"))==NULL)
{
printf("NO RECORD ADDED.");
main_menu();
}
else
{
r = fopen("temp.txt","a");
system("cls");
printf("Enter bike number of the customer to edit:\n\n");
scanf("%i",&bikenumber);
fflush(stdin);
while(fscanf(f,"%i %s %s %s %s %s %i\n", &s.bikenumber, s.name, s.address, s.phonenumber, s.nationality, s.email,
&s.period)!=EOF)
{
if(bikenumber==s.bikenumber)
{

k=1;
printf("\n\t*** Existing Record ***"); printf("\
nBike Number\t: %i",s.bikenumber); printf("\
nName\t\t: %s",s.name); printf("\nAddress\t\t:
%s",s.address); printf("\nPhone number\t:
%s",s.phonenumber); printf("\nNationality\t:
%s",s.nationality); printf("\nEmail\t\t:
%s",s.email); printf("\nPeriod\t\t: %i",s.period);
printf("\n\n\t*** New Record ***"); printf("\
nEnter New Name : "); printf("\
nEnter New Address : ");
scanf("%s",s.address);
printf("\nEnter New Phone number : ");
scanf("%s",s.phonenumber);
fprintf(r,"%i %s %s %s %s %s %i\n", s.bikenumber, s.name, s.address, s.phonenumber,
s.nationality, s.email, s.period);
fflush(stdin);
printf("\n\n\t\tYOUR RECORD IS SUCCESSFULLY EDITED!!!");
}
}
if(!k)
{
printf("\n\nTHE RECORD DOESN'T EXIST!!!!");
}
fclose(r);
fclose(f);
remove("add.txt");
rename("temp.txt","add.txt");
getch();
}
main_menu();
}
REFERENCE

1] ANME, “Stratégie Sfax 2030: Diagnostic stratégique de l’état du développement


de la région” rapport technique élaboré par l’ANME en collaboration avec la
Municipalité de Sfax et l’Agence Allemande de Coopération Internationale (GIZ) ; aout
2016, pp 54 .

[2] T. Benarbia, “Contribution à la modélisation et à l'analyse de performances des


systèmes de vélos en libre-service en vue de leur régulation: Une Approche basée sur les
réseaux de Pétri”, Thèse de doctorat, Université de Cergy Pontoise, 2013.

[3] P. DeMaio and J. Gifford, “Will smart bikes succeed as public transportation in
the United States?” Journal of Public Transportation, vol. 7(2), 1-15, 2004.

[4] P. DeMaio, “Bike-sharing: History, impacts, models of provision, and future”,


Journal of public transportation, vol. 12, 2009.

[5] J. Desjardins, J. “L’analyse de régression logistique” Tutorial in quantitative


methods for psychology, vol. 1, pp. 35-41, 2005.
CERTIFICATES

UDAYA PRAKASH P (95071915050)

PERIASAMY HANUMANTH P S (95071915032)

You might also like