import java.util.ArrayList ;

public class Airplane {

    private String type ;
    private ArrayList<Seat> seats ;
    private ArrayList<Seat> freeSeats ;

    public Airplane(String type , ArrayList<Seat> seats){
        this.type = type ;
        this.freeSeats = seats ;
        this.seats = seats ;
    }

    public String getType() {
        return type;
    }

    public ArrayList<Seat> getSeats(){
        return seats ;
    }

    public ArrayList<Seat> getFreeSeats(){
        return freeSeats ;
    }

    public void reserveSeat(Seat seat ,Customer customer){
        for (Seat s : seats
        ) {
            if (s == seat) {
                s.setCustomer(customer);
            }
        }
        this.freeSeats.remove(seat);

    }

}
