Professional Documents
Culture Documents
Bachelor of Technology
In
Electronics and Communication Engineering
By
K L University
Green Fields, Vaddeswaram, Guntur District-522 502
2016-2017
K L University
DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING
(DST-FIST Sponsored Department)
CERTIFICA
TE
This is to certify that the course based project titled “ELECTRICITY BILLING SYSTEM”,
being submitted by Jessy Ravada(150040311), N.S.Rama Krishna Teja(150040613) in
partial fulfilment for the award of degree of Bachelor of Technology in ELECTRONICS
AND COMMUNICATION ENGINEERING is a record of bonafide work carried out by
them under my guidance during the academic year 2016-2017 and it has been found worthy
of acceptance according to the requirements of the university.
K L University
DEPT OF ELECTRONICS AND COMMUNICATION ENGINEERING
(DST-FIST Sponsored Department)
DECLARATIO
N
We hereby declare that this project based lab report entitled “ELECTRICITY BILLING
SYSTEM” has been prepared by us in partial fulfilment of the requirement for the award of
degree “BACHELOR OF TECHNOLOGY IN ELECTRONICS AND
COMMUNICATION ENGINEERING ” during the academic year 2016-2017.
We also declare that this project based lab report is of our own effort and it has not
been submitted to any other university for the award of any degree.
Date:
place:
Jessy Ravada N.S.Rama Krishna Teja
(150040311) (150040613)
ACKNOWLEDGEMENT
Our sincere thanks to Dr.M.Jaya Bhaskar in the Lab for their outstanding support
especially my classmates and my friends for their support in the completion of our project
based Lab.
CONTENTS
Content Pg. No
1. Introduction 8
ABSTRACT
Main objective of this project is to implement an application which deals with Electricity
billing systems where the consumption of power in a month is calculated per the units
consumed. Initially, all the information about Customers will be written in a file and is
read from that file and calculates the amount consumed and generates the bill. This
system provides effective mechanism to Electricity billing system for admin by
recording each activity.
This system is implements using the concepts of files and some arithmetic operation to
calculate bill amount thus maintaining a database on the consumers. This way it is easy to
handle large amount of data within a short span of time in an orderly manner. This project
reads a file and generates bill amount and bill status(paid/unpaid) and date paid and saves
this data in a new file.
This module is about managing the electricity bills of the customers. In this we will create a
bills file of the customer. Here we will also update their bills into this file and can also
generate those records.
1.To create Bills file.
2.To update Bills file.
3. To generate Reports
This module is to track the bills of the customer.In this we will verify whether
the customer has paid the bill or not ..if not we will send a notification to them regarding that
issue.
1.To update payments.
2.To notify defaulters.
3.To generate Reports.
INTRODUCTION:
Main aim of this project is to implement an application which deals with maintaining
Electricity bill related activities like generating an electricity bill, storing customer personal
records and other administrative activities. Initially, all the information about customers will
be entered and maintained, which in turn helps to generate an electricity bill based on the
customer’s consumption of electricity. This system will reduce manual work for maintaining
records in files.
Problem definition:
In this first we create a customer file and update their records into this file. we can even
search and display the customer records.And we will create a bills file of the customer
update their bills into this file and can also generate those records.Next verify whether the
customer has paid the bill or not ..if not we will send a notification to them regarding that
issue. Last we will display the system banner and we will even provide security by creating
password to our file.
Platform requirements
Hardware/
Hardware / Software element Specification /version
Software
Hardware Processor Intel core to duo
RAM 1 GB
Hard Disk 100 GB
Software OS Windows XP
Java and Netbeans IDE
2.DESIGN
Input Design :
For creating a file, the system takes all inputs from keyboard and the writes to file.
student name(user/quit):user
Password:Bill
4536
jyothsna
12345
For selecting different functions of the system it displays a menu and reads the choice of user
from keyboard.
The output of the system (including reports) is displayed on the console in a formatted way.
SCHEDULE:
Total bill : 11
SOURCE CODE
\\Module 1
import java.util.*;
import java.io.*;
class Module4
{
public static void main(String args[]) throws IOException {
int choice=0;boolean flag=true;
String loginName,passWord;
int snum;int i,num;
String ob;
String name;
int searchbillNo=0;
int phoneno;
switch(choice){
case 1:
case 2:
FileWriter fout1 = new FileWriter("Test.txt",true);
System.out.print("No. of customers? ");
num= obj.nextInt();
for(i=0;i<num;i++)
{
System.out.print("enter billno:");
billNo =obj.nextInt();
System.out.print("Enter name:");
name=obj.next();
System.out.print("enter phoneno:");
phoneno = obj.nextInt();
System.out.print("\n");
case 3: snum=0;
++snum;
Formatter fmt2 = new Formatter();
fmt2.format("%2d.\tbillNo.: %9d",snum,billNo);
Formatter fmt3 = new Formatter();
fmt3.format("\tName: %12s\n\t phoneno: %7d",name,phoneno);
System.out.println(fmt2);
System.out.println(fmt3);
}
}
if(snum==0)
System.out.println("customer with such billNo is not found");
fin1.close();
break;
case 4:snum=0;
System.out.println("\t\t\tBill Reports of customers");
++snum;
Formatter fmt2 = new Formatter();
fmt2.format("%2d.\tbillNo.: %9d",snum,billNo);
Formatter fmt3 = new Formatter();
fmt3.format("\tName: %12s\n\t phoneno: %7d",name,phoneno);
System.out.println(fmt2);
System.out.println(fmt3);
}
System.out.println("End of list");
fin2.close();
break;
\\Module 2
case 5:
case 6:
FileWriter fout3 = new FileWriter("Test.txt",true);
System.out.print("No. of bills? ");
num= obj.nextInt();
for(i=0;i<num;i++)
{
System.out.print("enter billno:");
billNo =obj.nextInt();
System.out.print("Enter units consumed:");
units=obj.nextInt();
System.out.print("enter service tax:");
servicetax= obj.nextInt();
System.out.print("\n");
//tbill=units*5+servicetax;
Formatter fmt2 = new Formatter();
fmt2.format("%8d\n%10d\n%2d\n",billNo,units,servicetax);
fout3.write(fmt2+"\r\012");
}
fout3.close();
System.out.println("new records of bills are added");
break;
case 7:snum=0;
++snum;
Formatter fmt2 = new Formatter();
fmt2.format("%2d.\tbillNo.: %d",snum,billNo);
Formatter fmt3 = new Formatter();
tbill=units*5+servicetax;
fmt3.format("\tunits consumed: %s\n\tservice tax:%2d\n\ttotal bill=
%d",units,servicetax,tbill);
System.out.println(fmt2);
System.out.println(fmt3);
}
System.out.println("End of list");
fin3.close();
break;
\\ Module 3
case 8:
FileWriter fout4 = new FileWriter("test.txt");
System.out.print("No. of bills? ");
num= obj.nextInt();
for(i=0;i<num;i++)
{
System.out.print("enter billno:");
billNo = obj.nextInt();
System.out.print("Enter units consumed:");
units=obj.nextInt();
System.out.print("enter servicetax:");
servicetax= obj.nextInt();
System.out.print("enter paid/unpaid:");
ob=obj.next();
System.out.print("\n");
tbill=units*5+servicetax;
Formatter fmt1 = new Formatter();
fmt1.format("%8d\n%10d\n%8d\n%s",billNo,units,servicetax,ob);
fout4.write(fmt1+"\r\012");
}
fout4.close();
System.out.println("File is created");
break;
case 9:
snum=0;
System.out.println("Notifying Defaulters");
FileReader fin4=new FileReader("Test.txt");
Scanner sc4=new Scanner(fin4);
while(sc4.hasNextInt())
{
billNo = sc4.nextInt();
units = sc4.nextInt();
servicetax= sc4.nextInt();
ob=sc4.next();
if(ob.equals("unpaid"))
{
++snum;
Formatter fmt2 = new Formatter();
fmt2.format("%2d.\tbillNo.: %d",snum,billNo);
tbill=units*5+servicetax;
Formatter fmt3 = new Formatter();
fmt3.format("\tunits consumed: %s\n\tservice tax:%2d\n\ttotal bill=%d\n\
tstatus:%s",units,servicetax,tbill,ob);
System.out.println(fmt2);
System.out.println(fmt3);
System.out.print("please pay the bill\n");
}
// else
// return;
fin4.close();
break;
case 10: snum=0;
++snum;
Formatter fmt2 = new Formatter();
fmt2.format("%2d.\tbillNo.: %d",snum,billNo);
Formatter fmt3 = new Formatter();
tbill=units*5+servicetax;
fmt3.format("\tunits consumed: %s\n\tservice tax:%2d\n\ttotal bill=%d\n\tstatus:
%s",units,servicetax,tbill,ob);
System.out.println(fmt2);
System.out.println(fmt3);
}
System.out.println("End of list");
fin5.close();
break;
case 11:flag=false;
break;
default:System.out.println("wrong choice!");
}
}
System.out.println("Program is over");
}
}
Module1:
Module2:
Module 3:
References
Ghezzi, C., Jayazeri, M. & Mandrioli, D. (1998), Fundamentals of Software Engineering, 2nd edn,Prentice-Hall.
K. Appel and W. Haken. (1976), Every Planar Map is 4-colorable, Bull. Amer. Math. Soc., vol. 82, pp. 711-712