forked from upgrad-edu/tm-java-git-q-new-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTicket.java
More file actions
41 lines (35 loc) · 1.05 KB
/
Ticket.java
File metadata and controls
41 lines (35 loc) · 1.05 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
package com.company;
public class Ticket {
public String pnr;
public String from;
public String to;
public Flight flight;
public String departureDateTime;
public String arrivalDateTime;
public Passenger passenger;
public String seatNo;
public float price;
public boolean cancelled;
public Ticket(String pnr,String from,String to,Flight flight,String departureDateTime,String arrivalDateTime,
Passenger passenger,String seatNo,float price,boolean cancelled){
this.pnr=pnr;
this.from=from;
this.to=to;
this.flight=flight;
this.departureDateTime=departureDateTime;
this.arrivalDateTime=arrivalDateTime;
this.passenger=passenger;
this.seatNo=seatNo;
this.price=price;
this.cancelled=cancelled;
}
public String CheckStatus(){
return CheckStatus;
}
public int getFlightDuration(){
return FlightDuration;
}
public void cancel() {
}
return cancel;
}