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.
42 lines
849 B
42 lines
849 B
package hs.fulda.de.ci.exam.project;
|
|
|
|
import java.util.HashSet;
|
|
|
|
public class Airport {
|
|
|
|
protected String name;
|
|
public Address address;
|
|
protected String code;
|
|
public HashSet<Flight> flights = new HashSet<>();
|
|
|
|
public Airport(String name, Address address, String code) {
|
|
this.name = name;
|
|
this.address = address;
|
|
this.code = code;
|
|
}
|
|
|
|
public Airport() {
|
|
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public String getCode() {
|
|
return this.code;
|
|
}
|
|
|
|
public Address getAddress() {
|
|
return this.address;
|
|
}
|
|
|
|
public HashSet<Flight> getFlights() {
|
|
return this.flights;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Airport{" + "name='" + name + '\'' + ", address=" + address + ", code='" + code + '\'' + '}';
|
|
}
|
|
}
|