Format Report BE Project
Format Report BE Project
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
A
PROJECT REPORT ON
Bike Showroom
Management System
SUBMITTED BY:
Chandan Thakur (KAN081BCE020)
Manjeel Singh (KAN081BCE020)
Pappu Kumar Yadav (KAN081BCE020)
Nishan Kumar Thakur(KAN081BCE020)
SUBMITTED TO:
DEPARTMENT OF ELECTRONICS & COMPUTER ENGINEERING
Institute of Engineering, Tribhuvan University Lalitpur, Nepal 31
Falgun 2081
TRIBHUVAN UNIVERSIY
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING
The undersigned certifies that they have read and recommended to the Institute of
Engineering for acceptance of a project report entitled ”Project Name” submitted by
Person A, person B, person C, person D in partial fulfillment of the requirements for the
Bachelor’s degree in Electronics & Computer Engineering.
……….............................. …………..............................
Supervisor Internal examiner
Full Name Full Name
Designation Assistant Professor
Department of Electronics and Computer Department of Electronics and Computer
Engineering, Engineering,
Pulchowk Campus, IOE, TU. Pulchowk Campus, IOE, TU.
…………………..............................
External examiner
Full Name
Assistant Professor
Department of Electronics and Computer Engineering,
Date of approval:
ii
Copyright
The author has agreed that the Library, Department of Electronics and Computer
Engineering, Pulchowk Campus, and Institute of Engineering may make this report freely
available for inspection. Moreover, the author has agreed that permission for extensive
copying of this project report for scholarly purposes may be granted by the supervisors who
supervised the work recorded herein or, in their absence, by the Head of the Department
wherein the project report was done. It is understood that recognition will be given to the
author of this report and the Department of Electronics and Computer Engineering,
Pulchowk Campus, Institute of Engineering for any use of the material of this project report.
Copying publication or the other use of this report for financial gain without the approval of
to the Department of Electronics and Computer Engineering, Pulchowk Campus, Institute of
Engineering, and the author’s written permission is prohibited.
Request for permission to copy or to make any other use of the material in this report in
whole or in part should be addressed to:
Head
Department of Electronics and Computer Engineering
Pulchowk Campus, Institute of Engineering, TU Lalitpur,
Nepal.
iii
ACKNOWLEDGEMENTS
There is always a sense of gratitude which one express towards others for their help and
supervision in achieving the goals. This formal piece of acknowledgement is an attempt to express
the feeling of gratitude towards people who was helpful to us in successfully completing our
project. First, we would like to thank Mr. Santosh Giri, our teacher of computer programming-I
who gave us the concepts of C programming language. We would also like to place of apperception
to all the respondents and group members whose responses and coordination were of utmost
importance for the completion of this project. Lastly, we would like to thank authors of various
books in C language which provided us great help for the preparation of this project.
• Mr.Yashwant Kanetkar-Let Us C.
• Mr.Balagurusamy-Programming In ANSI C.
iv
ABSTRACT
The Bike Showroom Management System is a console-based application developed in the C
programming language. It is designed to streamline the operations of a bike showroom by
providing an efficient platform for both customers and administrators. The system allows
customers to view available bikes, purchase bikes, and provides administrators with tools to
manage bike inventory and view purchase records.
The program is structured around two main user roles: Customer and Admin. Customers can
access the Customer Section, where they can view the list of available bikes and purchase a bike
by providing their details (name and phone number). The purchased bike is recorded in a file
for future reference. Administrators can access the Admin Section, where they can view all
purchase records and add new bikes to the inventory. The system also includes an About
Section that provides information about the showroom, such as contact details and a brief
description.
The program uses file handling to store and retrieve data. Two text
files, bikes.txt and records.txt, are used to store bike details and purchase records, respectively.
The system ensures data persistence by saving all changes to these files. The program also
includes a Clear Screen feature to enhance user experience by providing a clean interface after
each operation.
Key features of the system include:
v
1. Customer Section:
o View available bikes.
o Purchase a bike by entering customer details.
2. Admin Section:
o View all purchase records.
o Add new bikes to the inventory.
3. About Section:
o Display information about the showroom.
4. File Handling:
o Store bike details in bikes.txt.
o Store purchase records in records.txt.
The program is designed to be user-friendly, with a simple menu-driven interface that guides
users through each operation. It is a lightweight and efficient solution for small to medium-
sized bike showrooms, providing essential functionalities without the need for complex
databases or external libraries.
This project demonstrates the use of fundamental programming concepts such
as structures, file handling, loops, conditional statements, and functions in C. It serves as a
practical example of how programming can be used to solve real-world problems and
automate business processes.
Contents
Page of Approval ii
Copyright iii
Acknowledgements iv
Abstract v
Contents vii
List of Figures viii
List of Tables ix
List of Abbreviations x
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
vi
1.4 Scope ....................................... 1
2 Literature Review 2
2.1 Related work ................................... 2
2.2 Related theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Methodology 3
4 Experimental Setup (if any) 4
5 System design 5
6 Results & Discussion 6
6.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.2 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.3
Testing/evaluation/validation . . . . . . . . . . . . . . . . . . . . . . . . . .
7 Conclusions
Limitations and Future enhancement 8
8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1. Project Overview
The Bike Showroom Management System is a console-based application developed in the C
programming language. It is designed to streamline the operations of a bike showroom by
providing an efficient and user-friendly interface for both customers and administrators. The
program allows customers to view available bikes, make purchases, and provides administrators
with tools to manage inventory and view purchase records. Data is stored persistently using file
handling, ensuring that information is retained across program sessions.
This project demonstrates the application of fundamental programming concepts such
as structures, file handling, modular programming, and user input validation. It is a practical
example of how software can be used to automate and simplify business operations.
2. Objective
The primary objectives of this project are:
1. Customer Interaction:
o Provide customers with an easy-to-use interface to view available bikes and make
purchases.
o Store customer purchase details for future reference.
2. Admin Management:
vii
o Enable administrators to add new bikes to the inventory.
o Allow administrators to view all purchase records for analysis and reporting.
3. Data Persistence:
o Use file handling to store bike details and purchase records in text files
(bikes.txt and records.txt).
4. User Experience:
o Ensure the program is intuitive and easy to navigate for both customers and
administrators.
5. Learning and Demonstration:
o Demonstrate the application of core programming concepts in a real-world scenario.
3. Scope
The scope of the project includes the following features and functionalities:
3.1 Customer Features
View Available Bikes:
o Customers can view a list of all available bikes, including their ID, name, brand, and
price.
Purchase Bikes:
o Customers can purchase a bike by selecting its ID and providing their name and
phone number.
o Purchase details are saved in a file for future reference.
4. System Requirements
4.1 Hardware Requirements
Processor: Intel/AMD x86 or compatible.
viii
RAM: 512 MB or higher.
Storage: 10 MB of free disk space.
4.2 Software Requirements
Operating System: Windows, Linux, or macOS.
Compiler: GCC or any C compiler.
Text Editor: Notepad, VS Code, or any code editor.
5. System Design
5.1 Data Structures
The program uses two main data structures to represent bikes and purchase records:
1. Bike Structure:
c
Copy
struct Bike {
int id;
char name[MAX_NAME_LENGTH];
char brand[MAX_BRAND_LENGTH];
int price;
};
o id: Unique identifier for the bike.
o name: Name of the bike.
o brand: Brand of the bike.
o price: Price of the bike.
Record Structure:
Copy
struct Record {
char customer[MAX_NAME_LENGTH];
char phone[15];
char bike[MAX_NAME_LENGTH];
int price;
};
o customer: Name of the customer.
o phone: Phone number of the customer.
o bike: Name of the purchased bike.
o price: Price of the purchased bike.
5.2 Modules
The program is divided into several modules for better organization and readability:
1. Main Menu:
o Displays options for Customer Section, Admin Section, About, and Exit.
2. Customer Section:
ix
o Allows customers to view available bikes and make purchases.
3. Admin Section:
o Allows administrators to view purchase records and add new bikes.
4. File Handling:
o Reads and writes bike and purchase data to text files.
5. Utility Functions:
o clearScreen(): Clears the terminal screen for better readability.
5.3 Flowchart
A flowchart can be included here to visualize the program flow. The flowchart should illustrate the
main menu, customer section, admin section, and file handling processes.
6. Implementation
6.1 Code Structure
The program is implemented using a modular approach, with each functionality encapsulated in
separate functions. Below is a brief overview of the key functions:
1. Main Function:
o Calls the displayMainMenu() function to start the program.
2. Customer Section Functions:
o customerSection(): Displays the customer menu.
o displayBikes(): Displays available bikes.
o purchaseBike(): Handles bike purchases.
o savePurchase(): Saves purchase records to a file.
3. Admin Section Functions:
o adminSection(): Displays the admin menu.
o viewRecords(): Displays purchase records.
o addBike(): Adds a new bike to the inventory.
4. Utility Functions:
o clearScreen(): Clears the terminal screen.
o aboutSection(): Displays information about the showroom.
6.2 Key Code Snippets
File Handling for Bikes:
c
Copy
FILE *file = fopen(BIKE_FILE, "r");
while (fscanf(file, "%d %49s %49s %d", &bike.id, bike.name, bike.brand, &bike.price) == 4) {
printf("%-5d %-20s %-20s %-10d\n", bike.id, bike.name, bike.brand, bike.price);
}
fclose(file);
Saving Purchase Records:
c
Copy
x
FILE *file = fopen(RECORD_FILE, "a");
fprintf(file, "%s %s %s %d\n", record.customer, record.phone, record.bike, record.price);
fclose(file);
Code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NAME_LENGTH 50
#define MAX_BRAND_LENGTH 50
#define MAX_RECORDS 100
#define BIKE_FILE "bikes.txt"
#define RECORD_FILE "records.txt"
// Bike structure
struct Bike {
int id;
char name[MAX_NAME_LENGTH];
char brand[MAX_BRAND_LENGTH];
int price;
};
xi
// Function prototypes
void displayMainMenu();
void customerSection();
void adminSection();
void displayBikes();
void purchaseBike();
void savePurchase(struct Record record);
void addBike();
void viewRecords();
void aboutSection();
void clearScreen();
int main() {
displayMainMenu();
return 0;
}
void displayMainMenu() {
int choice;
while (1) {
clearScreen();
printf("\n============================================\n");
printf("\tK.E.C. Motors\n");
printf("============================================\n");
printf("\t1. Customer Section\n");
printf("\t2. Admin Section\n");
printf("\t3. About\n");
printf("\t4. Exit\n");
printf("\tEnter your choice: ");
scanf("%d", &choice);
switch (choice) {
xii
case 1:
customerSection();
break;
case 2:
adminSection();
break;
case 3:
aboutSection();
break;
case 4:
printf("\nThank you for visiting our showroom!\n");
exit(0);
default:
printf("\nInvalid choice! Try again.\n");
}
}
}
void aboutSection() {
clearScreen();
printf("\n============================================\n");
printf("\tABOUT US\n");
printf("============================================\n");
printf("Welcome to K.E.C. Motors!\n");
printf("We provide a wide range of bikes from top brands.\n");
printf("For inquiries, contact us at: 01-453442\n");
printf("Email: [email protected]\n");
printf("Visit our website: www.kecmotors.com\n");
printf("\nPress Enter to return to the main menu...\n");
getchar();
getchar();
}
void customerSection() {
int choice;
while (1) {
clearScreen();
printf("\n============================================\n");
printf("\tCUSTOMER SECTION\n");
printf("============================================\n");
printf("\t1. View Available Bikes\n");
printf("\t2. Purchase Bike\n");
xiii
printf("\t3. Back to Main Menu\n");
printf("\tEnter your choice: ");
scanf("%d", &choice);
switch (choice) {
case 1:
displayBikes();
break;
case 2:
purchaseBike();
break;
case 3:
return;
default:
printf("\nInvalid choice! Try again.\n");
}
}
}
void displayBikes() {
clearScreen();
FILE *file = fopen(BIKE_FILE, "r");
if (!file) {
printf("\nError: Could not open bikes file!\n");
return;
}
void purchaseBike() {
xiv
clearScreen();
FILE *file = fopen(BIKE_FILE, "r");
if (!file) {
printf("\nError: Could not open bikes file!\n");
return;
}
strcpy(record.bike, bike.name);
record.price = bike.price;
savePurchase(record);
printf("\nPurchase successful! Thank you.\n");
break;
}
}
if (!found) {
printf("\nInvalid bike ID!\n");
}
fclose(file);
xv
}
// Admin Section
void adminSection() {
int choice;
while (1) {
clearScreen();
printf("\n============================================\n");
printf("\tADMIN SECTION\n");
printf("============================================\n");
printf("\t1. View Purchase Records\n");
printf("\t2. Add New Bike\n");
printf("\t3. Back to Main Menu\n");
printf("\tEnter your choice: ");
scanf("%d", &choice);
switch (choice) {
case 1:
viewRecords();
break;
case 2:
addBike();
break;
case 3:
return;
default:
printf("\nInvalid choice! Try again.\n");
}
}
}
xvi
// View all purchase records
void viewRecords() {
clearScreen();
FILE *file = fopen(RECORD_FILE, "r");
if (!file) {
printf("\nError: Could not open records file!\n");
return;
}
xvii
fprintf(file, "%d %s %s %d\n", bike.id, bike.name, bike.brand, bike.price);
fclose(file);
Customer Section:
============================================
CUSTOMER SECTION
============================================
1. View Available Bikes
2. Purchase Bike
3. Back to Main Menu
Enter your choice:
Admin Section:
Copy
============================================
ADMIN SECTION
============================================
1. View Purchase Records
2. Add New Bike
3. Back to Main Menu
Enter your choice:
xviii
8. Results
The program successfully meets its objectives:
Customers can view and purchase bikes.
Admins can manage inventory and view records.
Data is stored persistently in text files.
The program is user-friendly and easy to navigate.
9. Conclusion
The Bike Showroom Management System is a functional and efficient program that demonstrates
the application of core programming concepts. It provides a simple yet effective solution for
managing bike showroom operations. The program is modular, easy to maintain, and can be
extended with additional features in the future.
11. References
• Mr.Yashwant Kanetkar-Let Us C.
• Mr.Balagurusamy-Programming In ANSI C.
xix