Cab invoice/cab Bill Genrater

harshmathur18 1,247 views 16 slides Feb 08, 2018
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

Cab invoice/cab Bill Genrater use to calculate bill Cabs bill....
this programe is developed in Java using awt and swing pakges etc..


Slide Content

Cab Invoice Genrator




Presented By
Harsh Mathur
Bachelor of Computer Application
Dezyne E’cole College, Ajmer

Project report on
Cab Invoice Genrator

Submitted To
Dezyne E’cole College

Towards
The Partial Fulfillment
Of Second Year, Bachelor of Computer Application


By
Harsh Mathur



Dezyne E,cole College
106/10, Civil Line, Ajmer
www.dezyneecole.com

Acknowledgment

I am Harsh Mathur student of Bachelor of Computer Application Dezyne
E’Cole College would like to express my gratitude to each and every
person who has contributed in stimulating suggestions and
encouragement which really helped me to coordinate my project.
I also thank Dezyne E’Cole College who provided insight and expertise
that greatly assisted the project. Also, a special thanks to my teacher,
parents and colleagues who have supported me at every step.
Not to forget, the almighty who blessed me with good health because of
which I worked more efficiently and better.

Front Interface of Softwere…

Insert Information

Generate Bill

Source Code

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;


public class Final extends Frame implements ActionListener
{

TextField t1,t2,t3,t4,t5;
JButton b1,b2;
Label l1,l2,l3,l4,l5,l6,l7,h1;
Choice li1,li2;

public JLabel timeLabel = new JLabel(" ", JLabel.CENTER);

Final()
{

Font f1=new Font("Arial",Font.BOLD,30);
Font f2=new Font("Arial",Font.BOLD,80);
Font f3=new Font("Arial",Font.BOLD,15);
Font f4=new Font("Arial",Font.BOLD,20);

b1=new JButton("Generate Bill");
b2=new JButton("Clear");
h1=new Label("CAB INVOICE GENRATOR");

l1=new Label("Booked By");
l2=new Label("USed By");
l3=new Label("Select City");

l4=new Label("Select Cab");
l5=new Label("KMs Used");

t1=new TextField();
t2=new TextField();
t3=new TextField();
t4=new TextField();
t5=new TextField();

setSize(1000,600);
setLayout(null);
setVisible(true);

h1.setBounds(330,50,400,40);
h1.setFont(f1);
t4.setFont(f2);
t5.setFont(f4);
l1.setFont(f3);
l2.setFont(f3);
l3.setFont(f3);
l4.setFont(f3);
l5.setFont(f3);
b1.setFont(f4);
b2.setFont(f4);
l1.setBounds(50,120,100,30);

l2.setBounds(50,170,200,30);
l3.setBounds(50,220,200,30);
l4.setBounds(50,270,200,30);
l5.setBounds(50,320,200,30);


t1.setBounds(250,120,200,30);
t2.setBounds(250,170,200,30);
t3.setBounds(250,320,200,30);
t4.setBounds(600,220,250,150);
t5.setBounds(600,160,250,50);
b1.setBounds(320,400,320,50);
b2.setBounds(400,470,150,50);





add(h1);
add(l1);
add(l2);
add(l3);

add(l4);
add(l5);


add(t1);
add(t2);
add(t3);
add(t4);
add(t5);
add(b1);
add(b2);
b1.addActionListener(this);
b2.addActionListener(this);


li1=new Choice();
li1.setBounds(250,220, 200,23);
li1.add("--Select City--");
li1.add("Ajmer");
li1.add("Jaipur");
li1.add("Kota");
li1.add("Bikaner");

li1.add("Jodhpur");

li2=new Choice();
li2.setBounds(250,270, 200,23);
li2.add("--Select Cab--");
li2.add("Ola");
li2.add("Ubar");
li2.add("Texi For Sure");
li2.add("Jugnoo ");

add(li1);
add(li2);

}
public void actionPerformed(ActionEvent e)
{
String s1=t1.getText();
String s2=t2.getText();
String s4=t4.getText();
int s3=Integer.parseInt(t3.getText());

try

{
if(e.getSource()==b1)
{


RandomAccessFile raf=new RandomAccessFile("./cabdata.txt","rws");
raf.writeBytes("Booked By"+s1);
raf.writeBytes("Used By"+s2);
raf.writeBytes("Total KMs"+s3);
raf.writeBytes("Total Bill"+s4);


}
}
catch(Exception ee)
{}
float bill;
bill=s3*49;
t4.setText(String.valueOf(bill));
t5.setText(s2+" Your Bill is");
if(e.getSource()==b2)
{

t1.setText("");
t2.setText("");
t3.setText("");
t4.setText("");
t5.setText("");


}

}

public static void main(String args[])
{
new Final();
}


}

THANK YOU


Created By:Harsh Mathur
Bachelor of Computer Application
Dezyne E’cole College, Ajmer