Commit cd019974 authored by 9731087's avatar 9731087

1

parent 943f0334
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
import java.util.ArrayList;
public class Airplane {
private String type;
private ArrayList<Seat> seats;
private ArrayList<Seat> freeSeats;
public Airplane(ArrayList<Seat> seats, String type) {
this.seats = seats;
this.type = type;
}
public ArrayList<Seat> getFreeSeats() {
return freeSeats;
}
public ArrayList<Seat> getSeats() {
return seats;
}
public void reserve(Seat seat) {
}
}
public class Flight {
private Airplane airplane;
private String company;
private String destination;
private String origin;
private String type;
private int No;
private int date;
public Flight(Airplane airplane, String company, String destination,String origin, String type, int No, int date){
this.airplane = airplane;
this.company = company;
this.destination = destination;
this.origin = origin;
this.type = type;
this.No = No;
this.date = date;
}
public String getType() {
return type;
}
public int getNo() {
return No;
}
public Airplane getAirplane() {
return airplane;
}
public String getCompany() {
return company;
}
public String getDestination() {
return destination;
}
public String getOrigin() {
return origin;
}
public int getDate() {
return date;
}
}
public class Passenger {
private String name;
private String lastName;
int ID;
public Passenger(String name, String lastName, int ID){
this.name = name;
this.lastName = lastName;
this.ID = ID;
}
public void reserve(Flight flight, Seat seat, Boolean hasFood, int weight){
}
}
public class Seat {
private int No;
private String type;
private Passenger passenger;
public Seat(int No, String type){
this.No = No;
this.type = type;
}
public int getNo() {
return No;
}
public String getType() {
return type;
}
public void setPassenger(Passenger passenger) {
this.passenger = passenger;
}
public Passenger getPassenger() {
return passenger;
}
}
public class SystemManagement {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment