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.
36 lines
754 B
36 lines
754 B
package hs.fulda.de.ci.exam.project;
|
|
|
|
import java.util.HashSet;
|
|
|
|
public class Aircraft {
|
|
private String name;
|
|
private String model;
|
|
private int manYear;
|
|
private HashSet<Flight> flights = new HashSet<Flight>();
|
|
|
|
public Aircraft(String name, String model, int manufacturingYear) {
|
|
this.name = name;
|
|
this.model = model;
|
|
this.manYear = manufacturingYear;
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public String getModel() {
|
|
return this.model;
|
|
}
|
|
|
|
public int getManYear() {
|
|
return this.manYear;
|
|
}
|
|
|
|
public HashSet<Flight> getFlights() {
|
|
return this.flights;
|
|
}
|
|
|
|
public void addFlight(Flight flight) {
|
|
flights.add(flight);
|
|
}
|
|
}
|