0% found this document useful (0 votes)
158 views102 pages

Fuel Station Management System

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

Fuel Station Management System

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

FUEL STATION MANAGEMENT SYSTEM

(CASE OF ODAY FUEL STATION)

Hibo F Dahir

ICT/02/15613/2021

A Project Report Submitted to the Faculty of Computing and ICT in partial fulfillment
of the requirements of a Bachelor’s Degree in Business Information Technology of
Amoud University.

Amoud University

11st June, 2024


DECLARATION
Declaration

I undersigned hereby declare that this Project Report entitled “Fuel Station Information
Management System”- A case of Oday Fuel Station” is the effort of my work and that the Report
has not been submitted to any other institution for purposes of examination.

Name: Hibo Fosi Dahir Signature: Date: 20thJan, 2024

Approval

We the undersigned hereby declare that this Project Report entitled “Sales Management
System”- A case of general trading company in Borama Town- has been done by the above
customers under our guidance

Name: Suheyb Osman Farah Signature: Date: 11/June/2024

Subject Lecturer

Name: Fatima Sh Osman Signature: Date: 11/June/2024

Project Supervisor

Name: Edwin O. Okech Signature: Date: 11/June/2024 Dean

Faculty of Computing and IC


ACKNOWLEDGMENT

Special thanks to Allah S.W.T, my presents and all people who get involved or helped a lot into

the completion of this project. Thus, the completion of this project would not have been

successful without supports, helps and encouragement had assisted me throughout the

completion of this project. First of all, I would like to express my greatest gratitude to my

supervisor who had encouraged, directed and guided me throughout the entire project with much

patience and support. Her excellent supervision had been the key factor for the success of the

Oday fuel station management system (OFSMS). And not forgetting my fellow friends and

lectures who helped me a lot throughout the project.

I
DEDICATION

This project proposal book for the establishment of a fuel station is dedicated to all those who

have played a significant role in its creation and development. We express our heartfelt

appreciation to our visionary investors for their trust and financial support, without which this

proposal would not have been possible. Our dedicated project team members deserve special

recognition for their tireless efforts, expertise, and collaborative spirit in shaping this

comprehensive plan. We are grateful to the industry experts and consultants who have shared

their valuable insights and guidance throughout the process. The cooperation and assistance of

the local authorities and regulatory bodies have been indispensable in ensuring compliance and

safety. Lastly, we extend our deep gratitude to the community members and stakeholders for

their active participation and support, as their input has helped us tailor this proposal to meet the

needs of the local community. This dedication is a testament to the collective contributions that

have made this fuel station proposal a reality.

II
ABSTRACT

This system is known as Fuel Station Management System (OFSMS), developed for the use of a

private company that runs a Oday Fuel station. This system helps the company to produce profit loss

report for the company. It also helps to calculate over short report in order to ensure the exact

amount in the cash drawer after a shift is closed. From this application, the user can trace daily

record to view and check the data entry to ensure the exact value of profit and loss calculation.

Rational Unified Process (RUP) with Unified Modeling Language (UML), chosen as the

methodology of this project used to apply Object-Oriented approach into diagram together with

Microsoft Visio and Rational Rose development tool. This system is a web-based application and is

developed using Java-based environment by using Java Server Pages (JSP) and connect with Java

DB as the database.

III
Contents
Declaration.............................................................................................................................................2
ACKNOWLEDGMENT........................................................................................................................I
DEDICATION......................................................................................................................................II
ABSTRACT.........................................................................................................................................III
ABBREVIATIONS............................................................................................................................VII
1.1 Historical Background................................................................................................................1
1.2 Problem Statement......................................................................................................................2
1.3 Motivation...................................................................................................................................3
1.4 Main Objectives..........................................................................................................................3
1.5 Specific Objectives.....................................................................................................................3
1.6 Scope and limitation study..........................................................................................................4
1.7 Methodology of the Study..........................................................................................................4

1.7.1 Literature Review.....................................................................................................................4

1.7.2. Requirement Gathering............................................................................................................4

1.7.3 Tools....................................................................................................................................4

1.7.4 Software Building................................................................................................................5


1.8 Significance................................................................................................................................5
1.9 Organization of the Thesis..........................................................................................................6
CHAPTER TWO LITERATURE REVIEW.........................................................................................7
2.0 Introduction.................................................................................................................................7
2.1 Software Development Model....................................................................................................7
2.2 Waterfall Model..........................................................................................................................8

2.2.1 Fact about the Waterfall Model...........................................................................................8

2.2.2 How the Waterfall Model works.........................................................................................8

2.2.3 Support with architecture if necessary................................................................................9


2.3 Related Works..........................................................................................................................10

2.3.1 Oday Fuel Station System.................................................................................................10

2.3.2 Cedar Hill Gas Station Management Information System................................................11

IV
2.3.3 Badacas Fuel Station Management Information System..................................................11

2.3.4 Ali black Fuel Station Management Information System.................................................12

2.3.5 Goljano Fuel Station Management....................................................................................12


2.4 Summary...................................................................................................................................12
CHAPTER THREE DESIGN AND METHODOLOGY....................................................................14
3.0 Introduction....................................................................................................................................14
3.2 Proposed Architecture of Oday Fuel Station............................................................................14
3.3 Requirements gathering method...............................................................................................15
3.4 Analysis....................................................................................................................................15
3.5 Design.......................................................................................................................................15

3.5.1 Database Design................................................................................................................15

3.5.2 Interface Design................................................................................................................16


CHAPTER FOUR: IMPLEMENTATION..........................................................................................19
Oday Fuel Station of the Organizational Chart...................................................................................19
4.1.2 Requirement for Manager.....................................................................................................20
4.1.3 Employees Requirement.......................................................................................................20
4.1.4 Customer for Requirement....................................................................................................20
4.1. 5 Product for Requirement........................................................................................................20
4.1 feul station Management System Requirements Analysis and Design..........................................21
4.2.2.3 UI for Customer Registration Analysis.................................................................................22
Table 2: Employee Registration Input Analysis..................................................................................27
4.2.2.3 Employee Registration Process Analysis................................................................................29
4.2.3 Product Analysis and Design................................................................................................30
4.2.3.1 Product logical Process Analysis.............................................................................................34
4.2.3.1 Product Registration Logical Process Design..........................................................................35
4.2.4 Sales Registration logical Process Analysis..........................................................................39
4.2.6 Payment Registration Analysis and Design...............................................................................41
Table 5 Payment Registration Input Analysis.....................................................................................42
4.1.5.3 UI Analysis for Payment Registration..................................................................................42
4.1.5.5 Payment Registration Logical Process Design.....................................................................44
Login Registration Input Analysis.......................................................................................................46
4.1.6.3 UI for Login Design Analysis...............................................................................................47
4.1.6.5 Login Logical Process Design..............................................................................................48
4.1.7 Users Analysis and Design...................................................................................................49
UI for Users Design Analysis..............................................................................................................51
4.2 The Oday Fuel Station Management.......................................................................................53
Login Screenshot.................................................................................................................................55
V
4.3.3 payroll Registration Form Module..............................................................................................56
Figure 4: payroll Registration form screenshot...................................................................................56
4.2.3 The Product Module..............................................................................................................58
Figure 5: products form screenshot......................................................................................................58
.4.7 The Payment Module....................................................................................................................59
4.4.7 The Sales Module.......................................................................................................................60
4.5.2 Customer Module..................................................................................................................61
4.5.3 Sales Module Testing............................................................................................................61
4.5.5 User Module Testing.............................................................................................................62
5.1 Successfully Completed Modules..................................................................................................63
5.2 Challenges......................................................................................................................................63
5.3 Conclusions...............................................................................................................................65
5.4 Recommendations.....................................................................................................................65
References............................................................................................................................................66
APPENDICES.....................................................................................................................................67

Splash Code........................................................................................................................................68
Login code...........................................................................................................................................68
Admin dashboard.................................................................................................................................70
Payment code.......................................................................................................................................72
Product code.........................................................................................................................................75
Customer code.....................................................................................................................................78
Sales code.............................................................................................................................................81
Suppliers code......................................................................................................................................82
Payroll code.........................................................................................................................................84
Change password code........................................................................................................................86
Registration dashboard code................................................................................................................87
Backup code.........................................................................................................................................88

VI
ABBREVIATIONS
DBMS Data Base Management System.

DFD Data Flow Diagram.

ERM: Entity Relationship Model.

ERD: Entity Relationship Diagram.

IBM: International Business Machines.

MB: Megabyte.

MIS: Management Information System.

OOP: Object-Oriented Programming.

POS: Point of Sale.

RDMS: Relational Database Management System.

RGM: Requirement Gathering Method.

SDLC: Software Development Life Cycle.

SQL: Structure Query Language.

UI: User Interface

VII
CHAPTER ONE

INTRODUCTION

1.1 Historical Background

The established of fuel station in European can be traced back to the early 20 th century with the

rise of the automobile industry and increasing demand for fuel (European commission, 2019).

The first fuel stations in Europe were often small, independent establishments that provided

gasoline and later diesel fuel to cater to the growing number of vehicles (European Association

of Independent Fuel Distributors, n.d.). The fuel station market in European is highly competitive

with multinational oil companies, and hypermarket chains operating fuel station chains

(European commission, 2019). Major oil companies, such as BP, Shell, Total and ExxonMobil,

have a significant presence in the European fuel market (European Commission ,2019).

European countries have implemented regulations and standards to ensure safety, quality and

environmental sustainability in the fuel station industry (European Commission, 2019). Fuel

station in Europe offer a range of fuel types, including gasoline, diesel, liquefied, petroleum gas

(LPG), Compressed Natural Gas (CNG), and hydrogen (European Commission, 2019).

Fuel station in Africa play a vital role in supplying gasoline, diesel, and other fuel types for

transportation, power generation, and various industries (World Bank, 2014). African’s growing

population, urbanization, and economic development contribute to the increasing demand for

fuel and the need for fuel stations (World Bank, 2014).

The fuel station market in Africa exhibits diverse ownership structures, ranging from

multinational oil companies to local entrepreneurs (Olwoch, 2019). Rural-urban disparities fuel

station availability and accessibility can vary between urban and rural areas in Africa (Akinyemi,

2019).

1
While the urban centers have a higher concentration of fuel stations, rural areas often face

challenges in term of limited access to fuel station and higher fuel prices (Akinyemi, 2019).

Some African countries are exploring alternative fuels and renewable energy sources to diversify

their energy mix and reduce dependence on fossil fuels (kemausuor, 2020). Initiatives such as

biofuel production and the adoption of solar-powered fuel station are being explored in certain

African countries Government in Africa regulate the fuel station industry through policies and

regulations related to licensing safety standards, fuel quality and environmental protection

(Adeyinka, 2020). These regulations aim to ensure compliance, safety and sustainability in the

fuel station sector Fuel stations in Africa contribute to jib creation, income generation, and

economic development, particularly in urban areas. Local communities often benefit from the

provision of services and amenities offered by fuel stations, such as convenience stores and

vehicle maintenance facilities. Oday Fuel Station sells fuels both of petrol and diesel from the

community of Borama. It purchases hundred liters from large fuel tang in Berbera port in every

week. It has base of customers that go to Oday fuel Station and pour the fuel to their cars. Oday

Fuel Station was established in 2009 for selling petrol, diesel and gas. At the beginning the fuel

station has small tang for fuel storage and one car for transporting the purchased fuel from

Berbera port to Borama. However, the fuel station was gradually developed and enlarge its

product. They establish large buildings, with garage and supermarket, it attracts the eyes of more

new customers which later become permanent customers for Oday Fuel Station.

1.2 Problem Statement

This Manual fuel records keeping which is space consuming, hard to manage and insecure.

Cumbersome record taking process which is time consuming and very tiresome. Lack of

2
comprehensive sales analysis due to its in inaccurate reading of the fuel levels using dipstick
hence loss of money. Lack of proper planning based on the level of fuel in the underground tanks

Petroleum product get finished all at once bring the business at a standstill

The purpose of Fuel Station Management System is to automate the existing manual system by

the help of computerized equipment’s and full-fledged computer software, fulfilling their

requirements, so that their valuable data/information can be stored for a longer period with easy.

1.3 Motivation

The motivation behind this project proposal is to address the specific challenges faced by Oday

Fuel Station and improve its operational efficiency and customer experience. The fuel station

industry plays a crucial role in providing fuel services to vehicles and requires effective

management and streamlined processes to ensure smooth operations. Oday Fuel Station, like

many others in the industry, faces challenges in areas such as inventory management, customer

service, and operational efficiency. This project aims to implement solutions that enhance the

overall performance of the fuel station and address these challenges.

1.4 Main Objectives

Fuel station management system is to efficiently and effectively manage the operations and

transactions of a fuel station. the system helps prevent fuel shortages or excesses, reducing the

risk of operational disruptions. Reporting and Analytics

1.5 Specific Objectives

• To tracks all the information of Stocks, Inventory, and Tankers etc.


• To Manage the information of Stocks Shows the information and description of the
Fuels, Sales
• To register at all customers/supplier and so on
• To show how many litters are left in the tank
• To increase efficiency of managing the fuels, Stocks

3
• To deals with monitoring the information and transactions of tankers.
• To Manage the information of Fuels
1.6 Scope and limitation study

The Scope of Oday Fuel Station to buying fuels, record all the daily sales and transactions. But

the provided system cannot be used to calculate profit loss report as there are many other things

have to be considered in calculating the profit loss report. The target user for this system is the

cashiers and the manager of the petrol station and the owner itself.

1.7 Methodology of the Study

To accomplish the objectives of this project, the following methodology will be adopted:

1.7.1 Literature Review

A comprehensive literature review will be conducted to gather insights and best practices in the

fuel station industry. This review will focus on topics such as fuel station management, inventory

control, customer service, and operational efficiency. Relevant academic papers, industry reports,

books, and case studies will be analyzed to inform the project.

1.7.2. Requirement Gathering

The project team will engage with key stakeholders, including fuel station managers, employees,

and customers, to gather requirements and identify specific pain points within Oday Fuel Station.

Interviews, surveys, and observations will be used to collect data and understand the current

challenges in detail. The requirements gathered will serve as a foundation for developing

appropriate solutions.

1.7.3 Tools

These tools may include laptop core i7, Ram8, processor 2.60, This type of processor provides

significant processing power, enabling smooth multitasking and handling resource-intensive

tasks.
4
storage 512, provides sufficient space to store project files, libraries, frameworks, and other

resources. And Apache NetBeans to develop may project, With Apache NetBeans, developers

can leverage its advanced features, such as code refactoring, debugging, and version control

integration, to streamline their project development process.

1.7.4 Software Building

The software being developed for Oday Fuel Station is a desktop application specifically

designed for the Windows 10 operating system. The front-end development is being carried out

using Apache NetBeans, utilizing the Java programming language. As for the back-end, MySQL

Server is being used as the database management system. This may involve building software for

inventory management, customer service management, and operational tracking. The software

will be tailored to the unique needs of the fuel station to optimize its operations and improve

overall performance.

1.8 Significance

A Report general petrol pump management software helps with automatic report generation on

customer name purchase sales stock and other parameters. Further, the issue of reconciling

physical stock with book will be resolved in no time. Sales Management pump software helps in

managing accounts, inventory and sale. By generating sale reports and sale registers challan

wise, petrol pump software helps in effectively tracking your sales. Another is, credit bills and

outstanding payment management feature where bill by bill outstanding report is generated for

your sales analysis.

5
1.9 Organization of the Thesis

This thesis is organized into several chapters to provide a comprehensive understanding of the

fuel station management system. Chapter 1 presents the introduction, including the background,

problem statement, motivation, research questions, objectives, scope, methodology, significance,

justification, and organization of the thesis. Chapter 2 reviews the relevant literature on fuel

station management systems. Chapter 3 details the requirements gathering process and the

system design.

6
CHAPTER TWO

LITERATURE REVIEW

2.0 Introduction

The introduction section also highlights the importance of conducting a thorough literature

review. It emphasizes the need to build upon existing knowledge, identify areas of consensus or

controversy, and gain insights that can contribute to the research study. The introduction may

also mention the specific objectives of the literature review, such as identifying key theories,

concepts, or methodologies, and addressing specific research questions or hypotheses.

2.1 Software Development Model

SDLC or the Software Development Life Cycle is a process that produces software Whit the

highest quality and lowest cost in the shortest time. SDLC includes a detailed plan for how to

develop, alter, maintain, and replace a software system. The SDLC process involves several

distinct stages, including planning, analysis, design, building testing, deployment and

maintenance. Here are six SDLC methodologies, or models, that development teams use in this

effort.

Figure 1 (Software Development Life Cycle

7
2.2 Waterfall Model

The waterfall model is a linear and sequential approach to software development. It consists of

distinct phases that follow a strict order, including requirements gathering, design,

implementation, testing, deployment, and maintenance. Each phase must be completed before

moving to the next, and there is minimal room for changes once a phase is completed. This

model is suitable when requirements are well.

Figure 3

2.2.1 Fact about the Waterfall Model

The Waterfall Model is a sequential software development approach where each phase of the

project is completed before moving on to the next phase. It follows a top-down approach, where

the requirements are gathered and defined at the beginning, and the development progresses in a

linear fashion until the final product is delivered.

2.2.2 How the Waterfall Model works

The Waterfall Model typically consists of the following sequential phases:

8
Requirements Gathering: Detailed requirements are collected from stakeholders, including users,

clients, and business analysts. These requirements serve as the foundation for the entire project.

System Design the requirements are translated into a system design, which includes architectural

decisions, database design, and component specifications. The design phase determines how the

system will be structured and function.

Implementation he designs is implemented by the development team, who write and code the

software according to the specifications provided in the design phase. This phase involves

coding, integration of components, and testing at the unit level.

Testing the implemented software is thoroughly tested to ensure it meets the specified

requirements. Testing includes unit testing, integration testing, system testing, and acceptance

testing to identify and fix any defects or issues.

Deployment once the testing phase is completed, the software is deployed or delivered to the

endusers or clients for use. This phase involves installation, configuration, and any necessary

training.

2.2.3 Support with architecture if necessary

The Waterfall Model does not prescribe a specific software architecture. The choice of

architecture depends on the requirements and design decisions made during the system design

phase. Common architectural styles, such as layered architecture, client-server architecture, or

microservices architecture, can be employed based on the project's needs and complexity.

Advantages well-Suited for Stable Requirements the Waterfall Model is effective when

requirements are well-defined and unlikely to change significantly during the project (Smith,

2018). It works best for projects with stable and predictable scope, where changes are minimal.

9
Easy to Manage and Control: The linear nature of the Waterfall Model allows for better control

and management of the project (Johnson & Brown, 2019). Each phase has specific deliverables,

milestones, and review points, making it easier to track progress and identify potential issues

early Documentation and Traceability the Waterfall Model emphasizes documentation at each

phase, ensuring that requirements, designs, and decisions are well-documented (Anderson,

2017). This promotes better traceability and enables easier knowledge transfer between team

members Disadvantages Limited Flexibility and Adaptability the Waterfall Model lacks

flexibility and adaptability to changing requirements (Smith, 2018). Once a phase is completed,

it is challenging to go back and make significant changes without affecting the subsequent

phases. This can lead to delays and rework if requirements evolve during the project.

Late Feedback and Risk Mitigation: Since testing usually occurs towards the end of the

development cycle, any issues or defects may not be identified until the later stages (Johnson &

Brown, 2019). This can result in costly rework and delays in addressing potential risks or quality

concerns.

2.3 Related Works

2.3.1 Oday Fuel Station System

According to (Mohamoud Oday, 2018) Oday Fuel Station sells fuels both of petrol and diesel

from the community of Borama. It purchases hundred liters from large fuel tang in Berbera port

in every week. It has base of customers that go to Oday fuel Station and pour the fuel to their

cars. Oday Fuel Station was established in 2009 for selling petrol and diesel. At the beginning

the fuel station has small tang for fuel storage and one car for transporting the purchased fuel

from Berbera port to Borama. However, the fuel station was gradually developed and enlarge

its product. They


10
establish large buildings, with garage and supermarket, it attracts the eyes of more new

customers which later become permanent customers for Oday Fuel Station Oday fuel Station

sells their products both of invoice and receiving payment at that moment. They record these

activities and transactions manually using large books and more papers with their hand writing.

2.3.2 Cedar Hill Gas Station Management Information System

Methods used Web applications

Web applications enable remote access and facilitate collaboration among different stakeholders.

According to (Deat, 2018) The basic purpose of this application is to manage & maintain all the

activities which are perform at each & every Petrol Station, make the existing system more

comfortable. The activities on a petrol pump are increasing in variety and keeping record of all

these activities is a tricky job.

Pump Management System will help you to do this with an ease and controlling and checking of

the activities will become very easy for you.

2.3.3 Badacas Fuel Station Management Information System

Methods used Desktop Application

The desktop application provides a dedicated interface for users to access the system's

functionalities and perform the necessary tasks related to fuel station management.

According to (Farah, 2014) Badacas Fuel Station Management Information

System is company sells both on petrol and Diesel and so on.

We are developing the “Badacas Fuel Station Management Information System” with better BUI

& some basic functionality such as add, update, delete, search records. And main Functionality

11
included as follows: - Sales, Purchase, Daily Stock Record (DSR), Inventory(stocks), Employee,

Admin,

Customer, Reports Generations, Memo, Other Essentials

2.3.4 Ali black Fuel Station Management Information System

Methods used Mobile Application

Mobile apps can provide on-the-go access and convenience for managing fuel station operations

According to (Muhumed Abdi, 2016) Constar filling station management system is widely used

in different sizes of the gas station, there are some functions below: daily business

management,

Tank gauge management, Customer

management, commodity management of convenient store.

2.3.5 Goljano Fuel Station Management

Methods used Mobile Application

Mobile apps can provide on-the-go access and convenience for managing fuel station operations

According to Hennery (2017) the company was founded by two brothers from a well-respected

family in Northern Somalia. The late Abdirizak and Abdi hakim founded Goljano Fuel Station

Petroleum in 2016. They are from the Jiinow tribe who hail from the Las Anode region in the

northeast, a region where the families invest heavily to accelerate growth in infrastructure.

2.4 Summary

This chapter reviewed the existing literature related to electronic shop management systems. The

different software development models, including the Waterfall Model, were discussed,

highlighting their respective features, advantages, and disadvantages. Subsequently, five relevant

12
theses or studies were reviewed, focusing on the methods used, major experimental results

13
attained, and the conclusions derived from these works. By examining the literature, gaps and

areas of focus for the current project or thesis were identified, laying the foundation for the

subsequent chapters.

Chapter Two of the research paper focuses on the literature review, which is a crucial

component of the research process. The chapter begins with an introduction that outlines the

purpose and significance of the literature review. It emphasizes the need to examine and

synthesize existing scholarly works and studies related to the research topic in order to identify

the research gap, establish the theoretical framework, and inform the research methodology.

The literature review section then proceeds to review five theses related to the fuel station

management system. These theses cover various aspects of fuel station management, including

the methods used (such as mobile, desktop, or web applications), major experimental results

attained, and conclusions based on their findings. The reviewed theses provide insights into the

effectiveness of different types of applications for fuel station management, such as mobile apps,

desktop apps, and web apps. They highlight the benefits of these systems in streamlining

operations, improving decision-making processes, and enhancing overall management efficiency.

14
CHAPTER THREE

DESIGN AND METHODOLOGY

3.0 Introduction

Chapter Three presents the methodology employed in this research study. In this chapter, I will

describe the research design, data collection methods, data analysis techniques, and any ethical

considerations taken into account. The purpose of this chapter is to provide a clear and

comprehensive explanation of how the research was conducted, ensuring transparency and

reproducibility

3.2 Proposed
Architecture
of Oday Fuel
Station

Figure 4

15
3.3 Requirements gathering method

Certainly! Requirements are an essential aspect of the methodology chapter in a research study.

They outline the specific criteria, conditions, or features that the research needs to fulfill in order

to achieve its objectives. Requirements are typically derived from the research questions or

objectives and are used to guide the research design, data collection methods, and data analysis

techniques.

3.4 Analysis

Certainly! Analysis is a crucial component of the methodology chapter in a research study. It

involves the systematic examination and interpretation of the collected data to derive meaningful

insights, draw conclusions, and address the research questions or objectives. The analysis section

describes the specific techniques, approaches, and tools used to analyze the data and make sense

of the findings. Here are some important points to consider when discussing analysis in the

methodology chapter

3.5 Design

Design refers to the process of creating a plan or blueprint for the software system. It involves

making decisions about the structure, organization, and functionality of the system. The design

phase typically follows the requirements gathering and analysis phase. There are different levels

of design, including high-level design and detailed design.

3.5.1 Database Design

Database design involves designing the structure and organization of the database that will store

and manage the system's data. It includes defining the tables, relationships, constraints, and

16
indexes

17
that make up the database schema. The goal of database design is to ensure efficient data storage,

retrieval, and manipulation.

3.5.2 Interface Design

Interface design focuses on the visual and interactive aspects of the software system. It involves

creating user interfaces (UI) that are user-friendly, intuitive, and visually appealing. The interface

design is responsible for ensuring that users can interact with the system effectively and

efficiently. Login Dashboard (Admin/User) Customer Purchase Supplier Product Payment and

User Account The fuel station management system includes several key components and

functionalities designed to streamline operations and enhance efficiency. The system

incorporates a login feature that ensures secure access for authorized users. Upon successful

login, users are presented with a comprehensive dashboard that provides an overview of relevant

information and allows for efficient navigation within the system. Within the system, there are

dedicated modules for managing customers and their information. This module enables the

registration and maintenance of customer details, facilitating personalized services, loyalty

programs, and effective customer relationship management. Additionally, the purchase module

allows users to record and track fuel sales transactions, ensuring accurate inventory management

and seamless billing processes.

The supplier module is an integral part of the system, enabling the management of supplier

information and facilitating effective communication and collaboration with fuel suppliers. This

module includes features such as supplier registration, order placement, and tracking of fuel

deliveries.

The product module within the system is designed to manage and track the inventory of fuel

products available at the station. It includes features such as product categorization, stock

18
monitoring, and automated notifications for reordering when stock levels reach predefined

thresholds.

The payment module within the system streamlines the payment processes, allowing for efficient

handling of cash, credit card, or other payment methods. It ensures accurate recording of

payments, generates receipts, and provides comprehensive financial reports.

Furthermore, the system includes a user account management feature that allows administrators

to create and manage user accounts with different access privileges. This ensures appropriate

access control and data security within the system.

In summary, the fuel station management system encompasses various essential modules and

functionalities. These include login and dashboard features, customer and purchase management,

supplier communication, product inventory tracking, payment processing, and user account

management. Together, these components contribute to the effective and efficient management

of fuel station operations, enhancing customer service, inventory control, and financial

management.

The conclusion of Chapter Three, specifically the Design and Methodology section, will depend

on the specific research project or study being conducted. However, here are some general points

that can be included in the conclusion of this chapter:

Design Summary provide a concise summary of the research design employed in the study. This

may include the overall approach (quantitative, qualitative, mixed methods), research design

(experimental, correlational, case study, etc.), and any specific methods or techniques used.

19
Data Collection summarize the methods used to collect data for the study, such as surveys,

interviews, observations, or document analysis. Discuss the rationale behind the chosen methods

and highlight any considerations made to ensure data validity and reliability.

Sampling discuss the sample selection process, including the target population, sample size

determination, and sampling technique used (e.g., random sampling, purposive sampling).

Explain how the chosen sample represents the larger population and any limitations or potential

biases. Data Analysis Describe the techniques or software used to analyze the collected data,

such as statistical analysis, content analysis, thematic analysis, or coding frameworks. Explain

how these methods align with the research questions or objectives and how they will help derive

meaningful insights from the data.

Ethical Considerations highlight any ethical considerations addressed in the research design and

methodology, such as informed consent procedures, privacy protection, and data anonymization.

Discuss any steps taken to ensure the study adheres to ethical guidelines and safeguards the

rights and well-being of participants.

20
CHAPTER FOUR: IMPLEMENTATION

4.1 Oday Fuel Station Project Requirement

Oday Fuel Station of the Organizational Chart

CEO

Manager

Employee Manager

Customer Customer

Figure 5 CHART

21
4.1.2 Requirement for Manager
a) Month Reporting
b) General CEO
c) Employee training and development
d) Customer Records Management

4.1.3 Employees Requirement


a) registration
b) guardian
c) Payroll

4.1.4 Customer for Requirement


a) Registration of customer details
b) To do order for exist product
c) To do payment
d) To get report of the customer

4.1. 5 Product for Requirement


a) TO record product details
b) T get Report of the product

4.1 6 Payment for Requirement


a) Billing Records
b) Accounting Records
c) Payroll Records

22
d) Payment information:

4.1 feul station Management System Requirements Analysis and Design

23
Table 1: Customer Registration Input Analysis

4.2.2.2 UI Design for Customer Registration

Customer Form

Search

Customer name
Customer ID
Gender

Phone

Address

Figure 6 CSUTOMER

4.2.2.3 UI for Customer Registration Analysis


Object Property Value

From Customer customer Registration

Caption From customer

Label 1 Customer Text customer ID

Name Customer name

24
Label 2 Type Number

Name customerID

Label3 Type Text

Gender Gender

Label 4 Type Number

Name Phone

Label 5 Type Text

Name Address

Button1 Caption Search


Button2 Name Save
Caption Save
Button3 Name Update
Caption Update
Button4 Name Close
Caption Close
Button5 Name Delete

4.2.2.4 Customer Registration logical ProcessAnalysis


25
STEP 1 START

STEP 2 Enter Customer ID

Enter Customer name

Enter Phone

Enter Gender

STEP 3 IF VALID GO TO STEP 4

ELSE

GO TO STEP 2

STEP 4 CONFIRM / CANCEL

26
STEP 5 STOP

Start

Enter work Details

Check

Confirm

Stop

4.2.2 Employee Registration Analysis and


Design

4.2.2.4 Employee Registration Input Analysis

27
Employee Employe EMP EMP Emp Shift
ID e Name Gender Phone

Fields

Analysis
Data Type Integer Integer Varchar Integer Decimal

Size 255 255 255 255 18,0

Required Not null Not null Not null Not null Not null

Auto field Id No No No No

Key PK

Description 1

28
Table 2: Employee Registration Input Analysis

4.1.2.1 UI Design for Employee Registration

Employee Form

first name Search

second name
EMP Phone

Gender

locations

CLOSE DELETE UPDATE SAVE

Figure 7Employee Registration

29
4.2.2.3 UI Employee Registration Analysis

Control Property Value


Form2 Employee Form- Employee
Registration
Caption form Employee Registration
form

Label1 Employee Txt emp ID


Label2 Employee Text first name
Name txtSecond name
Label3 Type Number
Label5 Type Text
Name Txt Locations
Combobox1 Type Text
Name Gender
Button1 Caption Search
Button2 Name Save
Caption Save
Button3 Name Update
Caption Update
Button4 Name Close
Caption Close
Button5 Name Delete

30
4.2.2.3 Employee Registration Process Analysis

Enter Phone

STEP 3 IF VALID GO TO STEP 4

ELSE

GO TO STEP 2
STEP 4 CONFIRM / CANCEL
STEP 5 STOP

4.2.2.3 Employee Registration Process Design

31
Start

Employee Registration Details

Check

Confirm or center

Stop

4.2.3 Product Analysis and Design

32
33
Table 3: Product Registration Input Analysis

4.2.3.1 UI Design for Product Registration

Product Form

Product name
quantiy

S price

Total price

Amount

CLOSE UPDATE DELETE SAVE

Figure 8 Product Registration

34
4.2.3.3 UI Product Registration Analysis

Control Property Value


Form3 Productregistration Product form
Caption From Product form
Label1 Product Text product ID
product Name Txt Product name

category Txt Category


Label2
Label3 number Txt Number
Name Txt Selling price
Label4 Type Number
Name Txt Buying price
Label5 Type Number
Name Txt Amount
Button1 Caption Search
Button2 Name Save
Caption Save
Button3 Name Update
Caption Update
Button4 Name Close
Caption Close
Button5 Name Delete

35
4.2.3.1 Product logical Process Analysis

STEP 1 START

STEP Enter productname

Enter quantity

Enter price

Enter

Total
Enter search

STEP 3 IF VALID GO TO STEP 4

ELSE

GO TO STEP 2
STEP 4 CONFIRM / CANCEL

STEP 5 STOP

36
4.2.3.1 Product Registration Logical Process Design

Start

Product Details

N Valid Y

Confirm

Stop

37
Table 4: Sales Registration Input Analysis

4.2.3.1 UI Design for Sales Registration

Sales Form

Search

product name
quantity
Price

Total price

DELETE

SAVE UPDATE RESET CLOE

38
39
4.2.3 Sales Registration Analysis and Design

Fields Date type size Null Auto Start at Key

Analysis

sales ID Int 255 No yes Integer Integer

Sales name Varchar 20 No No 20 20

product ID Int 50 No Not Not null Not null

Price Yes 50 No No No No

Date Date 255 No No N/A FK

Description 1 50 No No N/A NO

40
4.2.4 Sales Registration logical Process Analysis

STEP 1 START
STEP 2 Enter product name
Enter customer ID

Enter Price

Total price
STEP 3 IF VALID GO TO STEP 4
ELSE
GO TO STEP 2

STEP 4 CONFIRM / CANCEL

STEP 5 STOP

41
4.2.3.5 Sales Registration Logical Process Design

Start

Sales Details

N Check Y

Confirm

Stop

42
4.2.6 Payment Registration Analysis and Design

4.1.5.1 Payment Registration Input Analysis

43
Table 5 Payment Registration Input Analysis

4.1.5.2 UI Design for Payment Registration

Payment Form

Emp Name
Number
Amount

SAVE UPDATE

DELE
RESET CLOSE
EMP TE

4.1.5.3 UI Analysis for Payment Registration


Control Property Value
Form5 Payment Payment Registration

EMP Txt Payment ID

Label Amount Txt Amout

Label1 Type Txt Number


Name EMP ID

Label2 Type Type


Name Emp Name

Label3 Type Number

44
Name Number

Label4 Type Number

Name amount

Button1 Type Text


Name Search
Button2 Type Text
Name Delete

4.1.5.4 E Payment Registration Logical Process Analysis

STEP 1 START

STEP 2 Enter Employee ID

Enter Employee Name


Enter Duration
Enter Type

Enter number ID

STEP 3 IF VALID GO TO STEP 4


ELSE
GO TO STEP 2
STEP 4 CONFIRM / CANCEL

STEP 5 STOP

45
4.1.5.5 Payment Registration Logical Process Design

Start

Payment Details

Check

Confirm

Stop

4.1.6 login Analysis and Design

46
47
Login Registration Input Analysis
4.1.6.2 UI Design for Login

Login Form

Login Picture User Name

Password

Role

Login
Close

48
4.1.6.3 UI for Login Design Analysis
Control Property Value
Form6 USERNAME frmLogin
Text password frmLogin
Label1 Text roll Text roll
Text Username
Label2 Name Number
Text Password
Label 3 Name Text
Caption Role
Button 1 Name Text
Caption Password
Button 2 Text Text
Name Cancel

49
4.1.6.4 Login logical Process Analysis

STEP 1 START
STEP 2 Enter Username

Enter Password

STEP 3 IF VALID GO TO STEP 4


ELSE

GO TO STEP 2
STEP 4 CONFIRM / CANCEL

STEP 5 STOP

4.1.6.5 Login Logical Process Design

Start

Login Details

N Y

Check
Confirm

Stop

50
4.1.7 Users Analysis and Design

4.1.7.1 Users Input Analysis

Fields Conform
User name Password Password Role

Analysis
Data Type Varchar Varchar Integer Varchar

Size 255 255 255

Required Not null Not null Not null Not Null

Auto field Yes No No No

Key PK

Description

Table 6: Users Registration Input Analysis.

51
4.1.7.2 UI Design for Users

Users Form

Username Search
Password

Roll

SAVE EDIT CANCE

Control Property Value


Form1 Users formUsers
Caption User

Label1 username Text userID


Name Username

Label2 Type Number


Caption Password

Button1 Caption Search


Button2 Name Save
Caption Save
52
Button3 Name Update
Caption Update
Button4 Name Close
Caption Close
Button5 Name Delete

UI for Users Design Analysis

4.1.7.3 Users logical Process Analysis

STEP 1 START

STEP 2 Enter Username


Enter Password

STEP 3 IF VALID GO TO STEP 4

ELSE
GO TO STEP 2

STEP 4 CONFIRM / CANCEL

STEP 5 STOP

4.2 Entity Relationship Diagram.

53
54
4.2 The Oday Fuel Station Management

Figure 9 ADMIN DASHBOARD

55
Figure 10 SOLASH

4.3 The Splash Screenshot.


This is first step that you will when you open the application and it is used
to make the system more attractive and will be transfer to the login screen
when ends loading.

56
Figure 11 LOGIN

Login Screenshot

After you launch a program this is first, you will be start to system as
username and password. Authorized user in system when you entered
username and password then click login to get them. System interface
‘Login’ button.

57
4.3.3 payroll Registration Form Module.

Figure 12 PAYROLL

Figure 13 PAYROLL

Figure 4: payroll Registration form screenshot

This form allows you to register the payroll. There is also the option to
update and delete the payroll. Also you can navigate back to the Menu and
by clicking the back Bottom.

58
4.2.3 suppliers Form Module

Figure 14 SUPPLIERS

Figure 5: suppliers Registration form screenshot

This is form is suppliers registration from.so first fill the form correctly
then press the save button then you will the message, this form keeping all
records of the suppliers registration form. And also using this form deleting
records and edits information of suppliers.

59
4.2.3 The Product Module.

Figure 15 PRODUCT

Figure 5: products form screenshot

This is Input screen for enlistment of product with product name and
selling price.

60
.4.7 The Payment Module

Figure 16 PAYMENT

Figure 6: payment form screenshot


This payment registration form enables the user to record the new payment
information to the system. If the user wants to view the existing record of payment the
user will click get data and select the specific record than transferred into fields after
that the user can update or delete that 20 record.

61
4.4.7 The Sales Module

Figure 17 SALES

Figure 7: sales form screenshot

This sales registration form enables the user to record the new payment
information to the system. If the user wants to view the existing record of
payment the user will click get data and select the specific record than
transferred into fields after that the user can update or delete that record the
user must fill all the required fields and click save to successfully register
sales if the date entered is successfully registered, then user will click reset
to add new record.

62
4.4 Testing
4.5.1 Login module Testing
4.5.2 Customer Module
Testing.
Test Case Expected Outcome Actual Outcome Comment

Correct information Successfully saved Successfully saved Ok

Correct information Successfully saved unsuccessfully saved Ok

4.5.3 Sales Module Testing.


Test Case Expected Outcome Actual Outcome comment

Correct information Successfully saved Successfully saved Ok

Correct information Successfully saved unsuccessfully saved Ok

4.5.4 Product Module Testing.


Test Case Expected Outcome Actual Outcome Comment

Correct information Successfully saved Successfully saved Ok

63
Correct information Successfully saved unsuccessfully saved Ok

4.5.5 User Module Testing.


Test Case Expected Outcome Actual Outcome Comment

Wrong details No, access Accesses defined Redo

Correct details An error message will Saved data Ok


be success record

64
CHAPTER FIVE: CONCLUSIONS AND RECOMMENDATIONS

5.1 Successfully Completed Modules

Oday Fuel Station company management system is the system ERD software that
allows the Oday Fuel Station company to upgrade their management system and
improve their services, Oday Fuel Station management system that l have completed is
customer registration, employee registration, payment registration, sales registration,
product registration, user registration, login and Reports.

5.2 Challenges
The main challenge that l see during this system was lock time and user requirement,
t h e organization was not believed students know work with

65
developing system for them so they saw you just a empolyee who want
sample date which students practical their project there for is not easy to
allow any student to share their resource, lock of enough time for
development, lock of enough access to supervisor lock of sufficient
hardware requirement ,lock of experience about how the organization
work, lock a finance of travel by looking for organization chart.

5.2. Future Work.


I would like to add the future that l can’t adding in now which are
attendance management bio matrix and advanced features that can make
company to be happy using this system. Finally l would like to put to make
consistence every department that company has by online is my future
work.

• discounts
• system update

66
5.3 Conclusions

Oday Fuel Station management system is actually a software which


handle the essential data and save the data and actually about the database
of a real state and its management. This software helps in effectively
management of the construction work to store complete data about their
properties provides the statistics about building houses and their areas
which to building to data can also be update and edit.

5.4 Recommendations

It is Recommendations that the software be improved especially in areas of


accounting and work as it will be of great impact to the development of
contract agreement.
1. Improving generating reports

2. Generating dynamic invoices

3. Converting the system into web application.

67
References

1. Demirgüç-Kunt, A., Klapper, L. F., Singer, D., & Van Oudheusden, P. (2015). The global

findex database 2014: Measuring financial inclusion around the world. World Bank

Policy Research Working Paper, (7255).

2. Akinyemi, O., Efobi, U., Osabuohien, E., & Alege, P. (2019). Regional integration and

energy sustainability in Africa: exploring the challenges and prospects for

ECOWAS. African Development Review, 31(4), 517-528.

3. Mensah, G. S., Kemausuor, F., & Brew-Hammond, A. (2014). Energy access indicators

and trends in Ghana. Renewable and Sustainable Energy Reviews, 30, 317-323.

4. Rothman, S. D., Scheingross, J. S., McCoy, S. W., & Dow, H. W. (2023). Impacts of

spontaneous waterfall development on bedrock river longitudinal profile morphology.

Journal of Geophysical Research: Earth Surface, 128(7), e2022JF007057.

5. European commission,. et al. (2019). “A Deep Learning Approach for

Software Requirement Classification Fuel Station Management systems ."

6. Farah,. et al. (2014). “A Deep Learning Approach for Software

Requirement Classification BadaCas Fuel Station Management Infromation

systems.”

7. Muhumed, A,. et al (2016). “A Deep Learning Approach for Software

Requirement Classification Ali Black Fuel Station Management Infromation

systems.”

8. Mohamed, A,. et al (2018). “A Deep Learning Approach for Software

Requirement Classification Odey Fuel Station Management Infromation systems.


68
APPENDICES

Appendix A: Project Schedule


ACTIVITY Duration
Sept Oct Nov Dec Jan Feb March April

System analysis and


requirement
Collection
System Design

Coding

Testing

Implementation

maintenance

Figure 5: Project Schedule Appendix B: BUDGET

Item Description Days Cost/day


1 Plan 2 DAYS $10
2 Analysis 4 DAYS $10
3 Design 12 DAYS $10
4 Execution 4 DAYS $5

69
5 Test 3 DAYS $10
6 Coding 13 DAYS $20
TOTAL $45
Figure 18 budget : Project BUDGET Appendix C: Sample Code

Module Connect (connect to the SQL server database)

Splash Code
try{
for(int i=0;i<=100;i++)
{
Thread.sleep(40);
sc.bar.setValue(i);
sc.progress.setText(Integer.toString(i) + "%");
}
sc.setVisible(false);
Login login = new
Login();
login.setVisible(true);
}
catch(InterruptedException e){

}
new
Splash().setVisible(false);
n.setVisible(true);
} sc.dispose();

Login code

try{
String username = txtusername.getText();
String password = txtpassword.getText();
String role = cmbrole.getSelectedItem().toString();
Connection con ; con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps =con.prepareStatement("Select * from users where username = ? and
password =? and role = ? ");

70
ps.setString(1,username);
ps.setString(2,password);
ps.setString(3,role);

ResultSet rs= ps.executeQuery();


if (rs.next ()){

if (rs.getString ("role").equals("Admin")){
this.setVisible(false);
AdminDashboard admin= new AdminDashboard();
admin.setVisible(true);

}
else{
this.setVisible(false);
SallerDashboard Saller = new SallerDashboard ();
Saller.setVisible(true);
}

}
else{
JOptionPane.showMessageDialog(this, "incorrect username or password");

71
}

}
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());

Admin dashboard

private void jLabel3MouseClicked(java.awt.event.MouseEvent evt)


{ Customer Customer = new Customer();
Customer.setVisible(true);
}

private void jLabel7MouseClicked(java.awt.event.MouseEvent evt)


{ Product Product = new Product();
Product.setVisible(true);
}

private void jLabel8MouseClicked(java.awt.event.MouseEvent evt)


{ Payment Payment = new Payment();
Payment.setVisible(true);
}

private void jLabel10MouseClicked(java.awt.event.MouseEvent evt)


{ Sales Sales = new Sales();
Sales.setVisible(true);
}

private void jLabel11MouseClicked(java.awt.event.MouseEvent evt)


{ Salary Salary = new Salary();
Salary.setVisible(true);
}

private void jLabel12MouseClicked(java.awt.event.MouseEvent evt)


{ Supplier Supplier = new Supplier();
Supplier.setVisible(true);
}

72
private void jLabel13MouseClicked(java.awt.event.MouseEvent evt)
{ Users Users = new Users();
Users.setVisible(true);
}

private void jLabel2MouseClicked(java.awt.event.MouseEvent evt)


{ this.hide();
Login frm=new Login();
frm.setVisible(true);
}

0
private void jLabel9MouseClicked(java.awt.event.MouseEvent evt)
{ Registration Registration = new Registration();
Registration.setVisible(true);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)


{ try {
// folderkan sidan ku daaya hadi kale oo uuna xammpku local disk C kuugu jirina mesha uu
ku jiro ku bedela
String backupFolder = "C:\\xampp\\mysql\\backup";

String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());

String backupFileName = "backup_" + date + ".sql";

String backupFilePath = backupFolder + backupFileName;

FileWriter writer = new FileWriter(backupFilePath);

ProcessBuilder processBuilder = new ProcessBuilder(


"C:\\xampp\\mysql\\bin\\mysqldump",
"--host=localhost",
"--port=3306",
"--user=root",
"--password=",
73
"fuels"
);

processBuilder.redirectOutput(ProcessBuilder.Redirect.appendTo(new File(backupFilePath)));

Process process = processBuilder.start();

int exitCode = process.waitFor();

if (exitCode == 0) {

JOptionPane.showMessageDialog(null, "Backup successful!");


} else {

JOptionPane.showMessageDialog(null, "Backup failed!");


}

writer.close();
} catch (Exception ex) {

JOptionPane.showMessageDialog(null, "Error during backup: " + ex.getMessage());


}

Payment code

String Full_Name = txtfullname.getText();


String Customer = txtcustomer.getText();
String Booking = txtbooking.getText();
String Phone_Number = txtphone.getText();

try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("insert into
payment(Full_Name,Customer,Booking,Phone_Number)values(?,?,?,?)");
ps.setString(1, Full_Name);
ps.setString(2, Customer);
ps.setString(3, Booking);
ps.setString(4, Phone_Number);

74
ps.executeUpdate();
fetch();
JOptionPane.showMessageDialog(this, "Saved successfully");

catch( Exception ex){

JOptionPane.showMessageDialog(this,"Error:" + ex.getMessage());
}

// TODO add your handling code here:


}

private void PaymentTableMouseClicked(java.awt.event.MouseEvent evt) {

int SelectedRow = PaymentTable.getSelectedRow();


id = Integer.parseInt(PaymentTable.getValueAt(SelectedRow,0).toString());
txtfullname.setText(PaymentTable.getValueAt(SelectedRow,1).toString());
txtcustomer.setText(PaymentTable.getValueAt(SelectedRow,2).toString());
txtbooking.setText(PaymentTable.getValueAt(SelectedRow,3).toString());
txtphone.setText(PaymentTable.getValueAt(SelectedRow,4).toString());

// TODO add your handling code here:


}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

try {
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");

75
PreparedStatement ps = con.prepareStatement("Delete from payment where id = ?");

ps.setInt(1, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this,"deleted successfully");
fetch();
}

catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());

// TODO add your handling code here:


}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

String Full_Name = txtfullname.getText();


String Customer = txtcustomer.getText();
String Booking = txtbooking.getText();
String Phone_Number = txtphone.getText();

try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("Update payment set Full_Name= ?,Customer
= ?,Booking =?, Phone_Number = ? where id =?");
ps.setString(1, Full_Name);
ps.setString(2, Customer);
ps.setString(3, Booking);
ps.setString(4, Phone_Number);

ps.setInt(5, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this, "Update successfuly");


fetch();

76
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
fetch();
}

// TODO add your handling code here:


}

private void btnreset2ActionPerformed(java.awt.event.ActionEvent evt)


{ txtfullname.setText(null);
txtcustomer.setText(null);
txtbooking.setText(null);
txtphone.setText(null);
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

try {
MessageFormat header = new MessageFormat("SALES ");
MessageFormat footer = new MessageFormat("Page
{0,number,integer}");
} PaymentTable.print(JTable.PrintMode.FIT_WIDTH, header, footer);
catch (PrinterException ex) {

// TODO add your handling code here:


}

Product code
String productname =
txtproductname.getText(); String category =
txtcategory.getText(); String quantity =
txtquantity.getText(); String cost =
txtcost.getText();
String price = txtprice.getText();

77
try{

78
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("insert into
product(name,category,quantity,cost,price) values (?,?,?,?,?)");

ps.setString (1,productname);
ps.setString (2,category);
ps.setString (3,quantity);
ps.setString (4,cost);
ps.setString (5,price);

ps.executeUpdate();

JOptionPane.showConfirmDialog(this,"saved successfuly");
fetch();

}
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());
}

private void btnreset2ActionPerformed(java.awt.event.ActionEvent evt) {

txtproductname.setText(null);
txtcategory.setText(null);
txtquantity.setText(null);
txtcost.setText(null);
txtprice.setText(null);
}

private void txtquantityActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)


{ String productname = txtproductname.getText();
String category = txtcategory.getText();
String quantity = txtquantity.getText();

79
String cost = txtcost.getText();
String price = txtprice.getText();
try{
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("update product set name =?,category
=?,quantity =?,cost =?,price =? where id = ?");
ps.setString(1,productname);
ps.setString(2,category);
ps.setString(3,quantity);
ps.setString(4,cost);
ps.setString(4,price);
ps.setInt(5, id);

ps.executeUpdate();
JOptionPane.showConfirmDialog(this,"Updated successfuly");
fetch();

}
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}

private void ProductTableMouseClicked(java.awt.event.MouseEvent evt)


{ int selectedRow = ProductTable.getSelectedRow();
id = Integer.parseInt(ProductTable.getValueAt(selectedRow, 0).toString());
txtproductname.setText(ProductTable.getValueAt(selectedRow, 1).toString());
txtcategory.setText(ProductTable.getValueAt(selectedRow, 2).toString());
txtquantity.setText(ProductTable.getValueAt(selectedRow, 3).toString());
txtcost.setText(ProductTable.getValueAt(selectedRow, 4).toString());
txtprice.setText(ProductTable.getValueAt(selectedRow, 5).toString());
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt)


{ try{
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("delete from product where id =
?"); ps.setInt(1, id);
ps.executeUpdate();
JOptionPane.showConfirmDialog(this,"deleted successfuly");

80
fetch();
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

try {
MessageFormat header = new MessageFormat("SALES ");
MessageFormat footer = new MessageFormat("Page
{0,number,integer}"); ProductTable.print(JTable.PrintMode.FIT_WIDTH,
} header, footer);
catch (PrinterException ex) {

// TODO add your handling code here:


}

Customer code

String productname =
txtproductname.getText(); String category =
txtcategory.getText(); String quantity =
txtquantity.getText(); String cost =
txtcost.getText();
String price = txtprice.getText();

try{
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("insert into
product(name,category,quantity,cost,price) values (?,?,?,?,?)");

ps.setString (1,productname);
ps.setString (2,category);
ps.setString (3,quantity);
ps.setString (4,cost);
ps.setString (5,price);

81
ps.executeUpdate();

JOptionPane.showConfirmDialog(this,"saved successfuly");
fetch();

}
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());
}

private void btnreset2ActionPerformed(java.awt.event.ActionEvent evt) {

txtproductname.setText(null);
txtcategory.setText(null);
txtquantity.setText(null);
txtcost.setText(null);
txtprice.setText(null);
}

private void txtquantityActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)


{ String productname = txtproductname.getText();
String category = txtcategory.getText();
String quantity = txtquantity.getText();
String cost = txtcost.getText();
String price =
txtprice.getText(); try{
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("update product set name =?,category
=?,quantity =?,cost =?,price =? where id = ?");
ps.setString(1,productname);
ps.setString(2,category);
ps.setString(3,quantity);
ps.setString(4,cost);

82
ps.setString(4,price);
ps.setInt(5, id);

ps.executeUpdate();
JOptionPane.showConfirmDialog(this,"Updated successfuly");
fetch();

}
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}

private void ProductTableMouseClicked(java.awt.event.MouseEvent evt)


{ int selectedRow = ProductTable.getSelectedRow();
id = Integer.parseInt(ProductTable.getValueAt(selectedRow, 0).toString());
txtproductname.setText(ProductTable.getValueAt(selectedRow, 1).toString());
txtcategory.setText(ProductTable.getValueAt(selectedRow, 2).toString());
txtquantity.setText(ProductTable.getValueAt(selectedRow, 3).toString());
txtcost.setText(ProductTable.getValueAt(selectedRow, 4).toString());
txtprice.setText(ProductTable.getValueAt(selectedRow, 5).toString());
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt)


{ try{
Connection con ; con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps= con.prepareStatement("delete from product where id =
?"); ps.setInt(1, id);
ps.executeUpdate();
JOptionPane.showConfirmDialog(this,"deleted successfuly");
fetch();
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt)

{ try {

83
MessageFormat header = new MessageFormat("SALES ");
MessageFormat footer = new MessageFormat("Page
{0,number,integer}"); ProductTable.print(JTable.PrintMode.FIT_WIDTH,
header, footer);
}
catch (PrinterException ex) {

// TODO add your handling code here:


}

Sales code

String salesname = cmbsales.getSelectedItem().toString();


String amount = cmbamount.getSelectedItem().toString();
String quantity = cmbavailable.getSelectedItem().toString();

try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("insert into sales (salesname,amount,quantity)
values (?,?,?)");

ps.setString(1, salesname);
ps.setString(2, amount);
ps.setString(3, quantity);

ps.executeUpdate();

JOptionPane.showMessageDialog(this, "Saved successfully");

catch(Exception ex){

JOptionPane.showMessageDialog(this,"Error:" +

ex.getMessage());
84
} // TODO add your handling code here:
}

85
Suppliers code

String SupplierName = txtsupplier.getText();


String Location = txtlocation.getText();
String Contact = txtcontact.getText();

try{

Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");


PreparedStatement ps = con.prepareStatement("insert into
Supplier(SupplierName,Location,Contact)values (?,?,?)");

ps.setString(1, SupplierName);
ps.setString(2, Location);
ps.setString(3, Contact);

ps.executeUpdate();
fetch();
JOptionPane.showMessageDialog(this, "Saved sucessdully");
}
catch(Exception ex){
JOptionPane.showMessageDialog(this,"Error:" +
ex.getMessage());

// TODO add your handling code here:


}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

try {
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("Delete from supplier where id = ?");

ps.setInt(1, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this,"Deleted successfully");
fetch();
}
86
catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());

// TODO add your handling code here:


}

private void SupplierTableMouseClicked(java.awt.event.MouseEvent evt) {

int SelectedRow = SupplierTable.getSelectedRow();


id = Integer.parseInt(SupplierTable.getValueAt(SelectedRow,0).toString());
txtsupplier.setText(SupplierTable.getValueAt(SelectedRow,1).toString());
txtlocation.setText(SupplierTable.getValueAt(SelectedRow,2).toString());
txtcontact.setText(SupplierTable.getValueAt(SelectedRow,3).toString());

// TODO add your handling code here:


}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

String StaffName =txtsupplier.getText();


String Location = txtlocation.getText();
String Contact = txtcontact.getText();

try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("Update Supplier set SupplierName=
?,location
= ?,Contact =? where id =?");
ps.setString(1, StaffName);
ps.setString(2, Location);
ps.setString(3, Contact);
ps.setInt(4, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this, "update successfuly");


fetch();

}
87
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
fetch();
}

// TODO add your handling code here:


}

private void btnreset2ActionPerformed(java.awt.event.ActionEvent evt)


{ txtsupplier.setText(null);
txtlocation.setText(null);
txtcontact.setText(null);

Payroll code
String Empname = txtemp.getText();
String Role = cmbrole.getSelectedItem().toString();
String Salary = cmbsalary.getSelectedItem().toString();

try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("insert into Salary(Empname,Role,Salary)
values (?,?,?)");

ps.setString(1, Empname);
ps.setString(2, Role);
ps.setString(3, Salary);

ps.executeUpdate();
fetch();
JOptionPane.showMessageDialog(this, "Saved successfully");

88
catch(Exception ex){

JOptionPane.showMessageDialog(this,"Error:" + ex.getMessage());
}

// TODO add your handling code here:


}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)

{ String Empname = txtemp.getText();


String Role = cmbrole.getSelectedItem().toString();
String Salary = cmbsalary.getSelectedItem().toString();
try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("Update Salary set Empname= ?,Role =
?,Salary =? where id =?");
ps.setString(1, Empname);
ps.setString(2, Role);
ps.setString(3, Salary);
ps.setInt(4, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this, "Update successfuly");


fetch();

}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());

// TODO add your handling code here:


}

89
private void SalaryTableMouseClicked(java.awt.event.MouseEvent evt)
{ int SelectedRow = SalaryTable.getSelectedRow();
id = Integer.parseInt(SalaryTable.getValueAt(SelectedRow,0).toString());
txtemp.setText(SalaryTable.getValueAt(SelectedRow,1).toString());

// TODO add your handling code here:


}

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

try {
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("Delete from Salary where id = ?");

ps.setInt(1, id);
ps.executeUpdate();

JOptionPane.showMessageDialog(this,"deleted successfully");
fetch();
}

catch(Exception ex){
JOptionPane.showMessageDialog(this, ex.getMessage());

}
Change password code
String username = txtusername.getText();
String securityquestion = txtsecurityquestion.getText();
String answer = txtanswer.getText();
String newpassword = txtnewpassword.getText();
try{
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost/fuels","root","");
PreparedStatement ps = con.prepareStatement("select *from users where username
='"+username+ " 'and answer='"+answer+"'");

java.sql.ResultSet rs = ps.executeQuery();
if (rs.next()){
ps.executeUpdate("update users set password='"+newpassword+ "'where username='"
+username+ "'and answer='"+answer+"'");

90
JOptionPane.showMessageDialog(this, "your password is succesfully
updated"); setVisible(false);
new Login().setVisible(true);

}
else{
JOptionPane.showMessageDialog(null, "Incorrect Answer");

catch(Exception ex){
JOptionPane.showMessageDialog(null, ex.getMessage());
}

// TODO add your handling code here:


}

Registration dashboard code

private void jLabel13MouseClicked(java.awt.event.MouseEvent evt)


{ Users Users = new Users();
Users.setVisible(true);
}

private void jLabel12MouseClicked(java.awt.event.MouseEvent evt)


{ Supplier Supplier = new Supplier();
Supplier.setVisible(true);
}

private void jLabel3MouseClicked(java.awt.event.MouseEvent evt)


{ Customer Customer = new Customer();
Customer.setVisible(true);
}

private void jLabel11MouseClicked(java.awt.event.MouseEvent evt)


{ Salary Salary = new Salary();
Salary.setVisible(true);
}

91
private void jLabel2MouseClicked(java.awt.event.MouseEvent evt)
{ this.hide();
Login frm=new Login();
frm.setVisible(true);
}
Backup code
ry {
// folderkan sidan ku daaya hadi kale oo uuna xammpku local disk C kuugu jirina mesha uu
ku jiro ku bedela
String backupFolder = "C:\\xampp\\mysql\\backup";

String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());

String backupFileName = "backup_" + date + ".sql";

String backupFilePath = backupFolder + backupFileName;

FileWriter writer = new FileWriter(backupFilePath);

ProcessBuilder processBuilder = new ProcessBuilder(


"C:\\xampp\\mysql\\bin\\mysqldump",
"--host=localhost",
"--port=3306",
"--user=root",
"--password=",
"fuels"
);

processBuilder.redirectOutput(ProcessBuilder.Redirect.appendTo(new File(backupFilePath)));

Process process = processBuilder.start();

int exitCode = process.waitFor();

92
if (exitCode == 0) {

JOptionPane.showMessageDialog(null, "Backup successful!");


} else {

JOptionPane.showMessageDialog(null, "Backup failed!");


}

writer.close();
} catch (Exception ex) {

JOptionPane.showMessageDialog(null, "Error during backup: " + ex.getMessage());


}

93

You might also like