-
Notifications
You must be signed in to change notification settings - Fork 1
/
Airline.java
90 lines (73 loc) · 1.98 KB
/
Airline.java
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
82
83
84
85
86
87
88
89
90
public class Airline {
// ----- INSTANCE VARIABLES ------
private String airlineName;
private String airlineCode;
private String airlineID;
private int noOfStops;
// ----- CONSTRUCTORS ------
public Airline(String airlineID, String airlineCode) {
this.airlineID = airlineID;
this.airlineCode = airlineCode;
}
public Airline(String airlineID, String airlineCode, int noOfStops) {
this.airlineID = airlineID;
this.airlineCode = airlineCode;
this.noOfStops = noOfStops;
}
public Airline(String airlineCode) {
this.airlineCode = airlineCode;
}
// ----- INSTANCE METHODS ------
/**
* @return name of airline used for flight
*/
public String getAirlineName() {
return airlineName;
}
/**
* sets name of airline to airlineName
* @param airlineName the name of the airline used for flight
*/
public void setAirlineName(String airlineName) {
this.airlineName = airlineName;
}
/**
* @return airline code
*/
public String getAirlineCode() {
return airlineCode;
}
/**
* set code of airline used for flight to airlineCode
* @param airlineCode code of airline used for flight
*/
public void setAirlineCode(String airlineCode) {
this.airlineCode = airlineCode;
}
/**
* @return id of airline used for flight
*/
public String getAirlineID() {
return airlineID;
}
/**
* sets ID of airline used for flight to airlineID
* @param airlineID
*/
public void setAirlineID(String airlineID) {
this.airlineID = airlineID;
}
/**
* @return number of stops during flight
*/
public int getNoOfStops() {
return noOfStops;
}
/**
* set number of stops during flight to noOfStops
* @param noOfStops
*/
public void setNoOfStops(int noOfStops) {
this.noOfStops = noOfStops;
}
}