Tribhuvan University: Faculty of Humanities and Social Sciences
Tribhuvan University: Faculty of Humanities and Social Sciences
A PROJECT REPORT
Submitted to
Department of Computer Application
Shaheed Smarak College
Sharadanagar, Chitwan
Submitted by
SUPERVISOR’S RECOMMENDATION
______________
Mr. Sunil Kumar
Project Supervisor
BCA Department
Shaheed Smarak College
LETTER OF APPROVAL
This is to certify that this project prepared by Sukhad Thapa Magar entitled
“Electricity Billing System” in partial fulfillment of the requirements for the
degree of Bachelor in Computer Application has been evaluated. In our opinion
it is satisfactory in the scope and quality as a project for the required degree.
______________ ______________
______________
______________
Mr. Sunil Kumar
Internal Examiner
External Examiner
Electricity consumers are often faced with the problem of inaccuracy and delay in
monthly billing due to some drawbacks. Thus, it is essential to have an efficient system
for such purposes via electronic platform with consideration to proximity.
The proposed system automates the conventional process of paying electricity bill by
visiting the Electricity Board which is tiresome and time consuming. It is also designed to
automate the electricity bill calculation and payment for user convenience. The system is
developed with Java swings as the base programming language which can be used to
develop websites, web applications and web services.
The Microsoft Structured Query Language (SQL) server is also used for creating back-
end database. The system would be having two logins: the administrative and user login.
The administrator can view the user's account details and can add the customer's
information of consuming units of energy of the current month in their account.
The Admin must feed the system with the electricity usage data into respective user’s
account. The system then calculates the electricity bill for every user and updates the
information into their account every month. Users can then view their electricity bill and
pay before the month end.
A project is a job of great enormity and it can't be accomplished by an individual all by them.
Eventually, we are grateful to several individuals whose professional guidance, assistance and
encouragement have made it a pleasant to undertake this project.
With immense pleasure we are presenting “Electricity Billing System” Project report as part of the
curriculum of ‘Bachelor of Computer Application’. We wish to thank all the people who gave us
unending support.
I express my profound thanks to our project guide and project in charge Prof. “Mr. Sunil Kumar”
and all those who have indirectly guided and helped us in preparation of this project.
Furthermore, we would also like to acknowledge with much appreciation the crucial role of
coordinator, who gave the permission to use all required equipment and the necessary materials to
complete our project.
Last but not the least, many thanks go to our teachers, friends, guardians who directly or indirectly
helped us in achieving the goal.
I am highly indebted to Shaheed Smarak College for their guidance and constant supervision as
well as for providing necessary information regarding the Project and support in the completion.
We would like to appreciate all the guidance which has improved our presentation skills thanks to
their comment and advices.
In the end, we would also like to thank Tribhuvan University for giving us this opportunity via the
course of Computer Application to help us understand the project ethics at this early stage and
helped us to evaluate my knowledge and expand it a little more.
Yours sincerely,
Sukhad Thapa Magar
ii
Conclusion 34
Bibliography 35
iii
iv
INTRODUCTION
To design the billing system more service oriented and simple, the following
features have been implemented in the project. The application has high speed of
performance with accuracy and efficiency.
The software provides facility of data sharing, it does not require any staff as
in the conventional system. Once it is installed on the system only the meter
readings are to be given by the admin where customer can view all details, it has
the provision of security restriction.
The electricity billing software calculates the units consumed by the customer
and makes bills it requires small storage for installation and functioning. There is
provision for debugging if any problem is encountered in the system.
The system excludes the need of maintaining paper electricity bill,
administrator does not have to keep a manual track of the users and can pay the
amount without visiting the office. Thus, it saves human efforts and resources.
1.1 Preamble
We, the owners of our project, respect all customers and make them happy
with our service.
The main aim of our project is to satisfy customer by saving their time by
payment process, maintaining records, and allowing the customer to view his/her
records and permitting them to update their details.
The firm handles all the work manually, which is very tedious and mismatched.
Page|10
Shaheed Smarak Collage
To keep the information of consuming unit energy of previous
month.
Page|11
Shaheed Smarak Collage
CHAPTER 2
Hardware Requirements:
Database design is one of the most important factors to keep in mind if you
are concerned with application performance management. By designing your
database to be efficient in each call it makes and to effectively create rows of data in
the database, you can reduce the amount of CPU needed by the server to complete
your request, thereby ensuring a faster application.
Figure 3.1.1 describes the ER diagram of Electricity Billing System. It has 5entities
namely login, customer, tax, bill, and meter_info. The entities have attributes which are primary
and foreign and attributes. The primary attributes are underlined.
meter_rent
1
rent
gst
1 service_tax
tax
swacch_bharat_cess
total_bill
N
pays
bill month
meter_no status
units
meter_no
meter_no
name meter_location
city N N
manages
days
address
state phase_code
bill_type
email
has
meter_type
N
phone
login
meter_no username
question password
user
answer
A primary key is a table column that can be used to uniquely identify every row of the table.
Any column that has this property, these columns are called candidate key. A composite
primary key is a primary key consisting of more than one column. A foreign is a column or
combination of columns that contains values that are found in the primary key of some table.
All the attributes of each table are interconnected by foreign key which is primary key in
another column and composite key. Primary key cannot be null. The fact that many foreign key
values repeat simply reflects the fact that its one- to-many relationship. In one-to-many
relationship, the primary key has the one value and foreign key has many values.
Figure 3.1.2 is a Schema diagram of Electricity Billing System which has six tables i.e., login,
customer, tax, rent, bill, and meter_info where each table contain attributes some with primary
key, foreign key. In the login table there are 6 attributes "meter_no”, "username”, “password”,
"user”, "question”, "answer”. The customer table has 7 attributes "name”, "meter_no"(primary
key), "address”, "city”, "state”, “email”, "phone”. The rent table has 3 attributes
"cost_per_unit"(primary key), " meter_rent”, "service_charge". The tax table has 3 attributes "
service_tax”, "swacch_bharat_cess”, "gst”. The bill table has 5 attributes "meter_no"(foreign
key that references the primary key of the customer table meter_no), "month”,
"units”,"total_bill”, "status”. The meter_info table has 6 attributes "meter_no"(foreign key that
references the primary key of the customer table meter_no), "meter_location”, "meter_type”,
"phase_code”, " bill_type”, "days".
customer
Name meter_no Address City state Email phone
rent
cost_per_unit meter_rent service_rent
tax
service_tax swacch_bharat_cess gst
bill
meter_no Month units total_bill Status
meter_info
meter_no meter_location meter_type phase_code bill_type Days
3.2 Normalization
Normalization is a process of organizing the data in database to avoid
data redundancy, insertion anomaly, update anomaly & deletion anomaly.
Let’s discuss about anomalies first then we will discuss normal forms
with examples. Anomalies in DBMS There are three types of anomalies that
occur when the database is not normalized. These are –Insertion, update and
deletion anomaly.
Customer
• An SQL UPDATE statement changes the data of one or more records in a table.
Either all the rows can be updated, or a subset may be chosen using acondition.
• The UPDATE syntax would be as follows: UPDATE table_name SET
column_name =value, column_name=value... [WHERE condition].
• The following SQL statement update's a new record in the “customer” table:
UPDATE TABLE customer SET email= [email protected] WHERE meter_no
=”12345”.
• The CREATE TABLE Statement is used to create tables to store data. Integrity
Constraints like primary key, unique key, foreign key can be defined for the
columns while creating thetable.
The following SQL statement creates a table “customer” table: create table
customer (name varchar (30), meter_no varchar (20) primary key, address
varchar (50), city varchar (20), state varchar (30), email varchar (30), phone
varchar (30));
The following SQL statement creates a table “login” table: create table login
(meter_no varchar (30), username varchar (30), password varchar (30), user
varchar (30), question varchar (40), answer varchar (30));
The following SQL statement creates a table “tax” table:create table tax
(cost_per_unit int (20) primary key, meter_rent int (20), service_charge int (20),
service_tax int (20), swacch_bharat_cess int (20), gst int (20));
The following SQL statement creates a table “bill” table: create table bill
(meter_no varchar (20), foreign key(meter_no) references customer(meter_no)
on delete cascade, month varchar (20), units int (20), total_bill int (20), status
varchar(40));
The following SQL statement creates a table “meter_info” table: create table
meter_info (meter_no varchar (30), foreign key(meter_no) references
customer(meter_no) on delete cascade, meter_location varchar (10), meter_type
varchar (15), phase_code int (5), bill_type varchar (10), days int (5)
Start system
Enter login name and password
On clicking the login button
Connect to data base
Query database to know whether user credentials are correct
If not, deny access and return login page with an error message
If correct, check if credentials for administrator
If yes, allow login
Set admin session, re-direct administrator to admin login page
If no, allow login set user session
Re-direct user to user home page
Algorithm or pseudo code of admin:
Login:
This program will allow the admin to enter the user name and password.
If the entered credentials are correct, then the login will be successful otherwise need to
be signup.
If admin forgets password, it can be retrieved by giving user name and answer for
security question.
After successful login the admin will be redirected to admin portal page where he/she can
do following activities.
New Customer:
This program will allow the admin to enter the customer details and automatically
generates unique meter number.
If customer name, address, city, state, email and phone number is entered, insert the
values into customer else print error while next=true enter the meter_info details else
print meter_info error Submit the details of customer that has been entered by
clicking on to next button.
If we need to cancel the particular that has been entered click onto cancel option
If we need to submit the particular that has been entered click onto submit option.
Deposit Details:
This program will allow the admin to view bill details. If we need to sort the particulars
based on meter_no and month.
If we need to search the particular that has been viewed click onto search option.
If we need to print the particular that has been viewed click onto print option.
Tax Details:
This program will allow the admin to add tax details. insert
the values into tax else print error
Submit the details of tax that has been entered by clicking onto submit button.
If we need to cancel the particular that has been entered click onto cancel option.
Calculate Bill:
This program will allow the admin to calculate total_bill when units consumed are
inserted where meter_no and month is selected. Insert the values into bill else print error
submit the details of tax that has been entered by clicking onto submit button.
If we need to cancel the particular that has been entered click onto cancel option.
Delete Bill:
This Program will allow the admin to delete the customer info when meter_no is selected.
If we need to delete the particular that has been saved click onto delete option.
If we need to cancel the particular that has been entered click onto back option.
Login:
This program will allow the customer to enter the username and password. If the
entered credentials are correct, then the login will be successful otherwise need to be
signup with the meter_no which is given by admin.
If customer forgets password, it can be retrieved by giving username and answer for
security question. After successful login the customer will be redirected to customer
portal page where he/she can do following activities.
Update Info:
This program will allow the customer to update the customer details .If customer
address, city, state, email and phone number is updated, update the values into
customer else print error update the details of customer that has been updated by
clicking onto update button.
If we need to cancel the particular that has been updated, click onto back option.
View Info:
This program will allow the customer to view his/her own details.
If we need to go back from the particular that has been viewed click onto back option.
Pay Bill:
This program will allow the customer to view bill details and redirects to pay the
bill where status will be updated.
If we need to cancel the particular that has been viewed click onto back option.
If we need to pay the bill amount that has been viewed click onto pay option.
Bill Details:
This program will allow the customer to view bill details.
If we need to print the particular that has been viewed click onto print option.
About:
This program will allow the customer to view details of the project in short.
If we need to exit the particular that has been viewed click onto exit option.
NOTE: Utility (notepad, browser and calculators), query and logout are given to both customer and
admin portals.
Different levels of testing are used in the testing process; each level of testing aims to test
different aspects of the system. The basic levels are unit testing, integration testing, system
testing and acceptance testing.
Unit testing focuses verification effort on the smallest unit of software design the
module. The software built, is a collection of individual modules. In this kind of testing
exact flow of control for each module was verified. With detailed design consideration
used as a guide, important control paths are tested to uncover errors within the boundary
of the module.
Step 2 The screen appears when the A window for adding new
admin logs in and selects any customer, inserting tax,
one of the menus from the calculate bill, view deposit
click of the mouse. details etc
The login is used to store the details of login’s admin and customer with meter_no.
The customer is used to store details of customer.
The tax is used to store tax values.
The rent is used to store rent values.
The bill is used to store details of bill of meter.
The meter_info is used to store information of meter placed.
After all the hard work is done for electricity bill management system is here. It is
software which helps the user to work with the billing cycles, paying bills, managing different
DETAIL Sunder which are working, etc.
This software reduces the amount of manual data entry and gives greater efficiency. The
User Interface of it is very friendly and can be easily used by anyone.
It also decreases the amount of time taken to write details and other modules.