-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBusBean.java
More file actions
81 lines (63 loc) · 1.33 KB
/
BusBean.java
File metadata and controls
81 lines (63 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.jsp.booking;
public class BusBean {
private int busid;
private String from;
private String to;
private String time;
private int price;
public void setBusid(int busid) {
this.busid = busid;
}
public void setFrom(String from) {
this.from = from;
}
public void setTo(String to) {
this.to = to;
}
public void setTime(String time) {
this.time = time;
}
public void setPrice(int price) {
this.price = price;
}
public int getBusid() {
return busid;
}
public String getFrom() {
return from;
}
public String getTo() {
return to;
}
public String getTime() {
return time;
}
public int getPrice() {
return price;
}
public BusBean(int busid, String from, String to, String time, int price) {
this.busid = busid;
this.from = from;
this.to = to;
this.time = time;
this.price = price;
}
public BusBean()
{
}
public void busDetails()
{
System.out.println("*");
System.out.println("Bus id : "+busid);
System.out.println("Starting from : "+from);
System.out.println("Destination : "+to);
System.out.println("Time : "+time);
System.out.println("Ticket Price : "+price);
System.out.println("*");
}
@Override
public String toString() {
return "BusBean [busid=" + busid + ", from=" + from + ", to=" + to + ", time=" + time + ", price=" + price
+"]";
}
}