Laraib Aslam Report Final
Laraib Aslam Report Final
Session: 2023-24
Vishal Tripathi
2200110140129
Ashutosh Pandey
AFFILIATED TO
INDEX
Certificate of Originality
I hereby declare that the Project entitled “Travel and Tourism” submitted to the
Department of Computer Application, UNITED INSTITUTE OF
MANAGEMENT, NAINI, PRAYAGRAJ in partial fulfilment for the award of the
Degree of MASTER IN COMPUTER APPLICATION during session 2022-2023
is an authentic record of my own work carried out under the guidance of “Dr.
Ashutosh Pandey” and that the Project has not previously formed the basis for the
award of any other degree.
This is to certify that the above statement made by me is correct to the best of my
knowledge.
Place:
Vishal Tripathi
220110140129
1|Page
TRAVEL AND TOURISM 2023
Acknowledgement
I would also like express my profound gratitude to our Principal Mr K.K Malviya,
HOD of MCA department Dr Awneesh Gupta and Our Project Head Mr. Dhananjay
Kumar Singh for their contribution to the completion of my project “Travel and
Tourism”.
It would not have been possible to complete this project in short period of time
without his kind encouragement and valuable guidance.
Date: Signature
Vishal Tripathi
2|Page
TRAVEL AND TOURISM 2023
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 users can pay the amount without
visiting the office. Thus, it saves human efforts and resources
3|Page
TRAVEL AND TOURISM 2023
Features
• Bill Generation: The system supports the creation of electricity bills for
various meter types, including Normal, Business, Solar, and Smart meters.
Customized billing calculations based on meter type and consumption for
accurate charges.
• Bill Viewing: Customers can access and view their current and historical
electricity bills, including detailed breakdowns of consumption, charges, and
due dates.
• Admin Access: Administrators could manage all customer accounts, add new
customers, and update their information for efficient customer service.
• Payment Status Monitoring: Admins can monitor the payment status of all
generated bills, helping to keep track of outstanding payments and ensuring
timely collections
4|Page
TRAVEL AND TOURISM 2023
The old manual system was suffering from a series of drawbacks. Since whole of
the system was to be maintained with hands the process of keeping, maintaining
and retrieving the information was very tedious and lengthy.
The records were never used to be in a systematic order.
If any information was to be found it was required to go through the different
registers, documents there would never exist anything like report generation.
There would always be unnecessary consumption of time while entering records
and retrieving records.
One more problem was that it was very difficult to find errors while entering the
records. Once the records were entered it was very difficult to update these
records. In present, work done in the electricity board is performed manually
which is a great headache for the department.
The reason behind it is that there is lot of information to be maintained and have
to be kept in mind while running the business. For this reason we have provided
features Present system is partially automated (computerized), actually existing
system is quite laborious as one has to enter same information at three different
places.
With the implementation of computerized system, the task of keeping records in
an organized manner will be solved. The greatest of all is the retrieval of
information, which will be at the click of the mouse. So the proposed system helps
in saving the time in different operations and making information flow easy giving
valuable reports.
5|Page
TRAVEL AND TOURISM 2023
Objectives
The electricity billing system has been developed to override the problems prevailing
in the practicing manual system. This software is supported to eliminate and in some
cases reduce the hardship faced by this existing system.
The firm handles all of the work manually, which is very tedious and mismanaged.
The objective of our project is as follows:
To keep the information of Customer.
To keep the information of consuming unit of energy of current month.
To keep the information of consuming unit of energy of previous
month.
To keep the information of employee working in the department.
To maintain the record of the department
• Online Payments: The inclusion of online payment options makes the system
more customer-friendly and reduces the need for physical transactions.
6|Page
TRAVEL AND TOURISM 2023
System Analysis
System Analysis is the study of a problem domain in order to recommend
improvements and specify requirements and priorities to achieve the solution. This
phase focused on a more detailed understanding of the problem.
The goal of analysis is to determine where the problem is, in an attempt to fix the
system. This step involves breaking down the system in different pieces to analyse
the situation, analysing project goals, breaking down what needs to be created, and
attempting to engage users so that definite requirements can be defined.
7|Page
TRAVEL AND TOURISM 2023
1. Stakeholder analysis
The topic on this subject (Part II - topic 2) clearly indicates how important it is to
identify all possible stakeholders with an interest in the training process, including the
identification and assessment of the training needs. Stakeholder analysis in the
context of needs assessment will reveal the importance and possible influence of the
stakeholders in TNA, their type of Participation, interest and possible impact on
them.
Identifying training needs is a form of research. First, evidence suggests that there is
a basic problem which can be addressed through training. It may also be necessary to
address the problem with non-training measures. So it is important to identify clearly
the training gap. This is found by comparing an existing situation with a future,
desirable situation, and then finding out how training can bring us from here to there.
Various methods may be used to do this, including the following:
• Self-report questionnaires
• Observation
• Individual interviews
• Checklist / job description
• Diary records
• work sampling
• Technical expert conference
• Critical incident
• Examination of existing records
8|Page
TRAVEL AND TOURISM 2023
What are the current strengths and weaknesses of the organization? What
opportunities and threats are being presented from the external environment? Etc.
This should be carried out using a participatory methodology, ideally with the
trainees themselves, prior to the training, or with other stakeholders who are able to
provide good quality information about the professional activities of the target group.
• Identify main categories of jobs and make a list of all the tasks associated with
a person in that category of job.
• Using interviews, questionnaires or through observation of people performing
tasks, complete this frequency/ importance/ learning difficulty table.
Feasibility study
A feasibility study assesses the operational, technical and economic merits of the
proposed project. The feasibility study is intended to be a preliminary review of the
facts to see if it is worthy of proceeding to the analysis phase. From the systems
analyst perspective, the feasibility analysis is the primary tool for recommending
whether to proceed to the next phase or to discontinue the project.
9|Page
TRAVEL AND TOURISM 2023
And for the System to be act as worth-while it should pass through some test that
examine that it should proceed further or not. This series of test is commonly known
as feasibility study on the system and it plays a very vital role for every system
projects. Feasibility studies undergo four major analyses to predict the system to be
success and they are as follows: -
1. Technical Feasibility
2. Economic Feasibility
3. Operational Feasibility
10 | P a g e
TRAVEL AND TOURISM 2023
Technical Feasibility
The analyst must find out whether current technical resources can be upgraded or
added to in a manner that fulfils the request under consideration. This is where the
expertise of system analysts is beneficial, since using their own experience and their
contact with vendors they will be able to answer the question of technical feasibility.
The essential questions that help in testing the operational feasibility of a system
include the following:
11 | P a g e
TRAVEL AND TOURISM 2023
Monsoon recommended life balance system deals with the modern technology
system that needs the well efficient technical system to run this project. All the
resource constrains must be in the favour of the better influence of the system.
Keeping all these facts in mind we had selected the favourable hardware and software
utilities to make it more feasible.
Economic Feasibility
12 | P a g e
TRAVEL AND TOURISM 2023
The concerned business must be able to see the value of the investment it is
pondering before committing to an entire system study. If short-term costs are not
overshadowed by long-term gains or produce no immediate reduction in operating
costs, then the system is not economically feasible, and the project should not
proceed any further. If the expected benefits equal or exceed costs, the system can be
judged to be economically feasible. Economic analysis is used for evaluating the
effectiveness of the Proposed System.
The economic feasibility will review the expected costs to see if they are in-line with
the projected budget or if the project has an acceptable return on investment. At this
point, the projected costs will only be a rough estimate. The exact costs are not
required to determine economic feasibility. It is only required to determine if it is
feasible that the project costs will fall within the target budget or return on
investment. A rough estimate of the project schedule is required to determine if it
would be feasible to complete the systems project within a required timeframe. The
required timeframe would need to be set by the organization.
It is the process of analysing the financial facts associated with the system
development projects performed when conducting a preliminary investigation. The
purpose of a cost/benefit analysis is to answer questions Such as:
13 | P a g e
TRAVEL AND TOURISM 2023
Operational Feasibility
Performance –
Information-
• Does current mode provide end users and managers with timely, pertinent,
accurate and usefully formatted information?
14 | P a g e
TRAVEL AND TOURISM 2023
• System provides end users and managers with timely, pertinent, accurate and
usefully formatted information. Since all the user related information is being
stored in the database against a unique user ID, it will provide for meaningful and
accurate data to the librarian. The information handling in the current system is
done manually. This results in scribbling of data and loss of validity of data.
• The information handling in the proposed system will be computerized and will
automatically update. The human errors will be minimal. The data can be easily
updated, modified when required and will be validated before the data is
processed into the system.
Economy –
Moreover, it has also been shown in the economic feasibility report that the
recommended solution is definitely going to benefit the organization economically in
the long run.
In the existing system the data are stored in ledgers and filing cabinets which require
a lot of space and maintenance. Access to certain data can be restricted by creating
different levels of user accessibility.
Control –
• Does current mode of operation offer effective controls to protect against fraud
and to guarantee accuracy and security of data and information?
15 | P a g e
TRAVEL AND TOURISM 2023
• As its database does not contain any confidential information which can be
misused so on that contrast there should no use of any security corner for this
system.
Efficiency –
Services-
16 | P a g e
TRAVEL AND TOURISM 2023
System design
Feasibility Study
A feasibility study assesses the operational, technical and economic merits of the
proposed project. The feasibility study is intended to be a preliminary review of the
facts to see if it is worthy of proceeding to the analysis phase. From the systems
analyst perspective, the feasibility analysis is the primary tool for recommending
whether to proceed to the next phase or to discontinue the project.
o Upgrading systems
o Altering systems
o Installing new systems
17 | P a g e
TRAVEL AND TOURISM 2023
And for the System to be act as worth-while it should pass through some test that
examine that it should proceed further or not. This series of test is commonly known
as feasibility study on the system and it plays a very vital role for every system
projects. Feasibility studies undergo four major analyses to predict the system to be
success and they are as follows: -
Technical Feasibility.
Economic Feasibility
Operational Feasibility
DFD is the abbreviation for Data Flow Diagram. The flow of data of a system or a
process is represented by DFD. It also gives insight into the inputs and outputs of
each entity and the process itself. DFD does not have control flow and no loops or
decision rules are present. Specific operations depending on the type of data can be
explained by a flowchart. It is a graphical tool, useful for communicating with users,
managers and other personnel. It is useful for analysing existing as well as proposed
system.
It should be pointed out that a DFD is not a flowchart. In drawing the DFD, the
designer has to specify the major transforms in the path of the data flowing from the
input to the output. DFDs can be hierarchically organized, which helps in
progressively partitioning and analysing large systems.
It provides an overview of
18 | P a g e
TRAVEL AND TOURISM 2023
Levels of DFD
DFD uses hierarchy to maintain transparency thus multilevel DFD’s can be created.
Levels of DFD are as follows:
0-level DFD: It represents the entire system as a single bubble and provides an
overall picture of the system.
1-level DFD: It represents the main functions of the system and how they interact
with each other.
2-level DFD: It represents the processes within each function of the system and
how they interact with each other.
3-level DFD: It represents the data flow within each process and how the data is
transformed and stored.
19 | P a g e
TRAVEL AND TOURISM 2023
An entity relationship diagram (ERD) shows the relationships of entity sets stored in
a database. An entity in this context is an object, a component of data. An entity set is
a collection of similar entities. These entities can have attributes that define its
properties.
There are two reasons to create a database diagram. You’re either designing a new
schema or you need to document our existing structure.
If you have an existing database you need to document, you create a database
diagram using data directly from your database. You can export your data base
20 | P a g e
TRAVEL AND TOURISM 2023
structure as a CSV file (there are some scripts on how to do this here), then have a
program generate the ERD automatically.
21 | P a g e
TRAVEL AND TOURISM 2023
Figure given below describes the ER diagram of Electricity Billing System. It has 5
entities namely login, customer, tax, bill, and meter info. The entities have attributes
which are primary and foreign and attributes.
22 | P a g e
TRAVEL AND TOURISM 2023
23 | P a g e
TRAVEL AND TOURISM 2023
24 | P a g e
TRAVEL AND TOURISM 2023
Hardware Requirements
Storage: 2GB Storage space for the application and the database.
Software Requirements
25 | P a g e
TRAVEL AND TOURISM 2023
Start system
Enter login name and password
On clicking the login button
Connect to database
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
Login:
This program will allow the admin to enter the username 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 username and answer for
security question.
After successful login the admin will be redirected to admin portal page where
he/she can do following activities.
26 | P a g e
TRAVEL AND TOURISM 2023
NewCustomer:
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 onto next button.
If we need to cancel the particulars that has been entered click onto cancel option.
If we need to submit the particulars that has been entered click onto submit option.
CustomerDetails:
DepositDetails:
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 particulars that has been viewed click onto search option.
If we need to print the particulars that has been viewed click onto print option.
TaxDetails:
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 particulars that has been entered click onto cancel option.
27 | P a g e
TRAVEL AND TOURISM 2023
CalculateBill:
This program will allow the admin to calculate total_bill when units consumed are
inserted where meter_no and month is selected.
Submit the details of tax that has been entered by clicking onto submit button.
If we need to cancel the particulars that has been entered click onto cancel 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.
UpdateInfo:
This program will allow the customer to update the customer details. If customer
address, city, state, email and phone number is updated,
update the details of customer that has been updated by clicking onto update
button.
If we need to cancel the particulars that has been updated, click onto back option.
28 | P a g e
TRAVEL AND TOURISM 2023
ViewInfo:
This program will allow the customer to view his/her own details.
If we need to go back from the particulars that has been viewed click onto back
option.
PayBill:
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 particulars that has been viewed click onto back
option.
If we need to pay the bill amount that has been viewed click onto pay option.
BillDetails:
GenerateBill:
This program will allow the customer to generate bill when meter_no and month
is selected.
Generate the details by clicking on generate bill button.
29 | P a g e
TRAVEL AND TOURISM 2023
Screenshots
Splash Screen
Login page
30 | P a g e
TRAVEL AND TOURISM 2023
Signup page(Admin)
Signup page(Customer)
Main page(Admin)
31 | P a g e
TRAVEL AND TOURISM 2023
Main page(Customer)
NewCustomer Page
32 | P a g e
TRAVEL AND TOURISM 2023
34 | P a g e
TRAVEL AND TOURISM 2023
35 | P a g e
TRAVEL AND TOURISM 2023
Paybill page
36 | P a g e
TRAVEL AND TOURISM 2023
Deposit Details
37 | P a g e
TRAVEL AND TOURISM 2023
Codes
38 | P a g e
TRAVEL AND TOURISM 2023
Splash.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
setVisible(true);
int x=1;
for(int i=2; i<600; i+=4, x+=1){
setSize(i+x, i);
setLocation(775-((i+x)/2),400-(i/2));
try{
Thread.sleep(4);
}
catch(Exception e){
e.printStackTrace();
39 | P a g e
TRAVEL AND TOURISM 2023
}
}
t=new Thread(this);
t.start();
setVisible(true);
}
public void run(){
try{
Thread.sleep(1000);
setVisible(false);
new Login();
}
catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] agrs)
{
new Splash();
}
}
Login.java
40 | P a g e
TRAVEL AND TOURISM 2023
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
41 | P a g e
TRAVEL AND TOURISM 2023
add(lblpassward);
cancel.addActionListener(this);
add(cancel);
setSize(640,300);
setLocation(400,200);
setVisible(true);
}
43 | P a g e
TRAVEL AND TOURISM 2023
String user=loginin.getSelectedItem();
try{
Conn c = new Conn();
String query="select * from login where username='"+susername+"' and
password='"+spassword+"' and user='"+user+"'";
ResultSet rs=c.s.executeQuery(query);
if(rs.next()){
String meter=rs.getString("meter_no");
setVisible(false);
new Project(user, meter);
}else{
JOptionPane.showMessageDialog(null, "Invalid Login");
username.setText("");
password.setText("");
}catch(Exception e){
e.printStackTrace();
}
}
else if(ae.getSource()== cancel){
setVisible(false);
}
44 | P a g e
TRAVEL AND TOURISM 2023
else if(ae.getSource()==signup){
setVisible(false);
new Signup();
}
}
signup.java
package electricity.bill.system;
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
47 | P a g e
TRAVEL AND TOURISM 2023
meter.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {}
@Override
public void focusLost(FocusEvent fe) {
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from login where
meter_no = '"+meter.getText()+"'");
while(rs.next()) {
name.setText(rs.getString("name"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
JLabel lblpassword = new JLabel("Password");
48 | P a g e
TRAVEL AND TOURISM 2023
accountType.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent ae) {
String user = accountType.getSelectedItem();
if (user.equals("Customer")) {
lblmeter.setVisible(true);
meter.setVisible(true);
name.setEditable(false);
} else {
lblmeter.setVisible(false);
meter.setVisible(false);
name.setEditable(true);
}
}
});
49 | P a g e
TRAVEL AND TOURISM 2023
create.setForeground(Color.WHITE);
create.setBounds(140, 260, 120, 25);
create.addActionListener(this);
panel.add(create);
ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("icon/signupImage.png"));
Image i2 = i1.getImage().getScaledInstance(250, 250, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(415, 30, 250, 250);
panel.add(image);
setVisible(true);
}
50 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
setVisible(false);
new Login();
} catch (Exception e) {
e.printStackTrace();
}
} else if (ae.getSource() == back) {
setVisible(false);
51 | P a g e
TRAVEL AND TOURISM 2023
new Login();
}
}
project.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
String meter;
JButton back;
Paytm(String meter) {
this.meter = meter;
52 | P a g e
TRAVEL AND TOURISM 2023
try {
j.setPage("https://paytm.com/online-payments");
} catch (Exception e) {
j.setContentType("text/html");
j.setText("<html>Could not load<html>");
setSize(800, 600);
setLocation(400, 150);
setVisible(true);
setVisible(false);
new PayBill(meter);
}
Conn.java
package electricity.bill.system;
import java.sql.*;
public class Conn {
Connection c;
Statement s;
Conn() {
try {
c = DriverManager.getConnection("jdbc:mysql:///ebs", "root", "laraib786");
s = c.createStatement();
} catch (Exception e) {
e.printStackTrace();
}
}
54 | P a g e
TRAVEL AND TOURISM 2023
NewCustomer.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
55 | P a g e
TRAVEL AND TOURISM 2023
56 | P a g e
TRAVEL AND TOURISM 2023
p.add(tfname);
57 | P a g e
TRAVEL AND TOURISM 2023
58 | P a g e
TRAVEL AND TOURISM 2023
setLayout(new BorderLayout());
add(p, "Center");
getContentPane().setBackground(Color.WHITE);
59 | P a g e
TRAVEL AND TOURISM 2023
setVisible(true);
try {
Conn c = new Conn();
c.s.executeUpdate(query1);
c.s.executeUpdate(query2);
60 | P a g e
TRAVEL AND TOURISM 2023
new MeterInfo(meter);
}
catch(Exception e){
e.printStackTrace();
}
}
else{
setVisible(false);
}
}
CustomeDetails.java
package electricity.bill.system;
import java.awt.*;
import javax.swing.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
import java.awt.event.*;
CustomerDetails(){
super("Customer Details");
setSize(1200, 650);
setLocation(200, 150);
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer");
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
62 | P a g e
TRAVEL AND TOURISM 2023
add(print, "South");
setVisible(true);
}
public void actionPerformed(ActionEvent ae) {
try {
table.print();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new CustomerDetails();
}
}
DepositDetail.java
package electricity.bill.system;
import java.awt.*;
import javax.swing.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
import java.awt.event.*;
DepositDetails(){
super("Deposit Details");
setSize(700, 700);
setLocation(400, 100);
setLayout(null);
getContentPane().setBackground(Color.WHITE);
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer");
while(rs.next()) {
64 | P a g e
TRAVEL AND TOURISM 2023
meternumber.add(rs.getString("meter_no"));
}
} catch (Exception e) {
e.printStackTrace();
}
65 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from bill");
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
66 | P a g e
TRAVEL AND TOURISM 2023
setVisible(true);
}
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery(query);
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
}
} else {
try {
table.print();
} catch (Exception e) {
e.printStackTrace();
}
}
}
67 | P a g e
TRAVEL AND TOURISM 2023
}
}
CalculateBill.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import java.sql.*;
68 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer");
while(rs.next()) {
meternumber.add(rs.getString("meter_no"));
}
} catch (Exception e) {
e.printStackTrace();
}
69 | P a g e
TRAVEL AND TOURISM 2023
70 | P a g e
TRAVEL AND TOURISM 2023
meternumber.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent ie) {
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer where meter_no
= '"+meternumber.getSelectedItem()+"'");
while(rs.next()) {
lblname.setText(rs.getString("name"));
labeladdress.setText(rs.getString("address"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
JLabel lblcity = new JLabel("Units Consumed");
lblcity.setBounds(100, 200, 100, 20);
p.add(lblcity);
71 | P a g e
TRAVEL AND TOURISM 2023
72 | P a g e
TRAVEL AND TOURISM 2023
cancel.setBackground(Color.BLACK);
cancel.setForeground(Color.WHITE);
cancel.addActionListener(this);
p.add(cancel);
setLayout(new BorderLayout());
add(p, "Center");
getContentPane().setBackground(Color.WHITE);
setVisible(true);
}
73 | P a g e
TRAVEL AND TOURISM 2023
int totalbill = 0;
int unit_consumed = Integer.parseInt(units);
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery(query);
while(rs.next()) {
totalbill += unit_consumed * Integer.parseInt(rs.getString("cost_per_unit"));
totalbill += Integer.parseInt(rs.getString("meter_rent"));
totalbill += Integer.parseInt(rs.getString("service_charge"));
totalbill += Integer.parseInt(rs.getString("service_tax"));
totalbill += Integer.parseInt(rs.getString("swacch_bharat_cess"));
totalbill += Integer.parseInt(rs.getString("fixed_tax"));
}
} catch (Exception e) {
e.printStackTrace();
}
try {
Conn c = new Conn();
74 | P a g e
TRAVEL AND TOURISM 2023
c.s.executeUpdate(query2);
ViewInformation.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
75 | P a g e
TRAVEL AND TOURISM 2023
JButton cancel;
ViewInformation(String meter) {
setBounds(350, 150, 850, 650);
getContentPane().setBackground(Color.WHITE);
setLayout(null);
76 | P a g e
TRAVEL AND TOURISM 2023
add(meternumber);
77 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer where meter_no =
'"+meter+"'");
while(rs.next()) {
name.setText(rs.getString("name"));
address.setText(rs.getString("address"));
city.setText(rs.getString("city"));
state.setText(rs.getString("state"));
email.setText(rs.getString("email"));
78 | P a g e
TRAVEL AND TOURISM 2023
phone.setText(rs.getString("phone"));
meternumber.setText(rs.getString("meter_no"));
}
} catch (Exception e) {
e.printStackTrace();
}
setVisible(true);
}
79 | P a g e
TRAVEL AND TOURISM 2023
UpadateInformation.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
setLayout(null);
81 | P a g e
TRAVEL AND TOURISM 2023
82 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer where meter_no =
'"+meter+"'");
while(rs.next()) {
name.setText(rs.getString("name"));
tfaddress.setText(rs.getString("address"));
tfcity.setText(rs.getString("city"));
tfstate.setText(rs.getString("state"));
tfemail.setText(rs.getString("email"));
tfphone.setText(rs.getString("phone"));
meternumber.setText(rs.getString("meter_no"));
}
} catch (Exception e) {
e.printStackTrace();
83 | P a g e
TRAVEL AND TOURISM 2023
setVisible(true);
}
84 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
c.s.executeUpdate("update customer set address = '"+address+"', city =
'"+city+"', state = '"+state+"', email = '"+email+"', phone = '"+phone+"' where
meter_no = '"+meter+"'");
JOptionPane.showMessageDialog(null, "User Information Updated Successfully");
setVisible(false);
} catch (Exception e) {
e.printStackTrace();
}
} else {
setVisible(false);
}
}
PayBill.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
86 | P a g e
TRAVEL AND TOURISM 2023
87 | P a g e
TRAVEL AND TOURISM 2023
cmonth.add("May");
cmonth.add("June");
cmonth.add("July");
cmonth.add("August");
cmonth.add("September");
cmonth.add("October");
cmonth.add("November");
cmonth.add("December");
add(cmonth);
88 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from customer where meter_no =
'"+meter+"'");
while(rs.next()) {
meternumber.setText(meter);
labelname.setText(rs.getString("name"));
}
cmonth.addItemListener(new ItemListener(){
@Override
public void itemStateChanged(ItemEvent ae) {
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from bill where meter_no = '"+meter+"'
AND month = '"+cmonth.getSelectedItem()+"'");
while(rs.next()) {
labelunits.setText(rs.getString("units"));
labeltotalbill.setText(rs.getString("totalbill"));
labelstatus.setText(rs.getString("status"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
90 | P a g e
TRAVEL AND TOURISM 2023
add(pay);
getContentPane().setBackground(Color.WHITE);
ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("icon/bill.png"));
Image i2 = i1.getImage().getScaledInstance(600, 300,
Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(400, 120, 600, 300);
add(image);
setVisible(true);
}
BillDeatils.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
92 | P a g e
TRAVEL AND TOURISM 2023
BillDetails(String meter) {
setSize(700, 650);
setLocation(400, 150);
getContentPane().setBackground(Color.WHITE);
try {
Conn c = new Conn();
String query = "select * from bill where meter_no = '"+meter+"'";
ResultSet rs = c.s.executeQuery(query);
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
setVisible(true);
93 | P a g e
TRAVEL AND TOURISM 2023
GenerateBill.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
String meter;
JButton bill;
Choice cmonth;
JTextArea area;
GenerateBill(String meter) {
this.meter = meter;
setSize(500, 700);
setLocation(550, 30);
94 | P a g e
TRAVEL AND TOURISM 2023
setLayout(new BorderLayout());
cmonth.add("January");
cmonth.add("February");
cmonth.add("March");
cmonth.add("April");
cmonth.add("May");
cmonth.add("June");
cmonth.add("July");
cmonth.add("August");
cmonth.add("September");
cmonth.add("October");
cmonth.add("November");
cmonth.add("December");
panel.add(heading);
panel.add(meternumber);
panel.add(cmonth);
add(panel, "North");
add(pane, "Center");
add(bill, "South");
setVisible(true);
}
96 | P a g e
TRAVEL AND TOURISM 2023
if(rs.next()) {
area.append("\n Customer Name: " + rs.getString("name"));
area.append("\n Meter Number : " + rs.getString("meter_no"));
area.append("\n Address : " + rs.getString("address"));
area.append("\n City : " + rs.getString("city"));
area.append("\n State : " + rs.getString("state"));
area.append("\n Email : " + rs.getString("email"));
area.append("\n Phone : " + rs.getString("phone"));
area.append("\n---------------------------------------------------");
area.append("\n");
}
if(rs.next()) {
area.append("\n Meter Location: " + rs.getString("meter_location"));
area.append("\n Meter Type: " + rs.getString("meter_type"));
area.append("\n Phase Code: " + rs.getString("phase_code"));
area.append("\n Bill Type: " + rs.getString("bill_type"));
area.append("\n Days: " + rs.getString("days"));
area.append("\n---------------------------------------------------");
area.append("\n");
}
97 | P a g e
TRAVEL AND TOURISM 2023
if(rs.next()) {
area.append("\n");
area.append("\n Cost Per Unit: " + rs.getString("cost_per_unit"));
area.append("\n Meter Rent: " + rs.getString("cost_per_unit"));
area.append("\n Service Charge: " + rs.getString("service_charge"));
area.append("\n Service Tax: " + rs.getString("service_charge"));
area.append("\n Swacch Bharat Cess: "+
rs.getString("swacch_bharat_cess"));
area.append("\n Fixed Tax: " + rs.getString("fixed_tax"));
area.append("\n");
}
if(rs.next()) {
area.append("\n");
area.append("\n Current Month: " + rs.getString("month"));
area.append("\n Units Consumed: " + rs.getString("units"));
area.append("\n Total Charges: " + rs.getString("totalbill"));
area.append("\n-------------------------------------------------------");
area.append("\n Total Payable: " + rs.getString("totalbill"));
area.append("\n");
}
} catch (Exception e) {
98 | P a g e
TRAVEL AND TOURISM 2023
e.printStackTrace();
}
}
MeterInfo.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
99 | P a g e
TRAVEL AND TOURISM 2023
setSize(700, 500);
setLocation(400, 200);
100 | P a g e
TRAVEL AND TOURISM 2023
meterlocation.add("InSide");
meterlocation.setBounds(240, 120, 200, 20);
p.add(meterlocation);
101 | P a g e
TRAVEL AND TOURISM 2023
phasecode.add("077");
phasecode.add("088");
phasecode.add("099");
phasecode.setBounds(240, 200, 200, 20);
p.add(phasecode);
102 | P a g e
TRAVEL AND TOURISM 2023
JLabel lblnotes = new JLabel("By Deafult Bill is Calculated for 30 days only");
lblnotes.setBounds(240, 320, 400, 20);
p.add(lblnotes);
ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("icon/hicon1.jpg"));
Image i2 = i1.getImage().getScaledInstance(150, 300,
Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
add(image, "West");
getContentPane().setBackground(Color.WHITE);
setVisible(true);
103 | P a g e
TRAVEL AND TOURISM 2023
try {
Conn c = new Conn();
c.s.executeUpdate(query);
104 | P a g e
TRAVEL AND TOURISM 2023
setVisible(false);
}
}
public static void main(String[] args){
new MeterInfo("");
}
}
Paytm.java
package electricity.bill.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
String meter;
JButton back;
Paytm(String meter) {
this.meter = meter;
try {
105 | P a g e
TRAVEL AND TOURISM 2023
j.setPage("https://paytm.com/online-payments");
} catch (Exception e) {
j.setContentType("text/html");
j.setText("<html>Could not load<html>");
}
setSize(800, 600);
setLocation(400, 150);
setVisible(true);
106 | P a g e
TRAVEL AND TOURISM 2023
}
}
TESTING
Testing gives the outline of all the testing methods that are carried out to get a bug
free application.
Testing process
Testing objectives
• A good test case is one that has high probability of finding an as yet
undiscovered error.
107 | P a g e
TRAVEL AND TOURISM 2023
Levels of Testing
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.
1. Unit 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.
2. Integration Testing-
The second level of testing is called integration testing. In this, many class-
tested modules are combined into subsystems, which are then tested. The goal
here is to see if all the modules can be integrated properly. We have been
identified and debugged.
3. System testing-
Here the entire application is tested. The reference document for this process is
the requirement document, and the goal is to see IF the application meets its
requirements. Each module and component of ethereal was thoroughly tested
to remove bugs through a system testing strategy. Test cases were generated
for all possible input sequences and the output was verified for its correctness.
108 | P a g e
TRAVEL AND TOURISM 2023
SOFTWARE SCOPE:
Extensibility: This software is extendable in ways that its original developers may
not expect. The following principles enhances extensibility like hide data structure,
avoid traversing multiple
Links or methods avoid case statements on object type and distinguish public and
private operations.
Sharing of newly written code within a project and reuse of previously written code
on new projects.
109 | P a g e
TRAVEL AND TOURISM 2023
Cost-effectiveness: Its cost is under the budget and make within given time period. It
is desirable to aim for a system with a minimum cost subject to the condition that it
must satisfy the entire requirement.
Scope of this document is to put down the requirements, clearly identifying the
information needed by the user, the source of the information and outputs expected
from the system.
LIMITATIONS:
References
http://www.github.com
www.stackoverflow.com
www.google.com
http://www.javatpoint.com/
https://www.geeksforgeeks.org/
110 | P a g e