You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
735 B
39 lines
735 B
package hs.fulda.de.ci.exam.project;
|
|
|
|
import java.util.HashSet;
|
|
|
|
public class Airline {
|
|
private String name;
|
|
private String code;
|
|
private HashSet<Flight> flights;
|
|
|
|
public Airline(String name, String code) {
|
|
this.name = name;
|
|
this.code = code;
|
|
this.flights = new HashSet<>();
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
|
|
public HashSet<Flight> getFlights() {
|
|
return flights;
|
|
}
|
|
|
|
public void addFlight(Flight flight) {
|
|
flights.add(flight);
|
|
}
|
|
}
|