Commit 0882c990 authored by unknown's avatar unknown

first

parent 87e75017
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
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.seats = seats ;
}
public ArrayList<seat> getSeats(){
return seats ;
}
public ArrayList<seat> getFreeSeats(){
return freeSeats ;
}
public void reserveSeat(seat seat){
}
}
public class Customer {
private String name ;
private String lastname ;
private int ID ;
public Customer(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 Flight {
private Airplane airplane ;
private int ID ;
private String source ;
private String dest ;
private String company ;
public Flight(int ID , String source , String dest , String company){
this.ID = ID ;
this.source = source ;
this.dest = dest ;
this.company = company ;
}
public int getID(){
return getID() ;
}
public String getSource(){
return source ;
}
public String getDest(){
return dest ;
}
public Airplane getAirplane(){
return airplane ;
}
public String getCompany(){
return company ;
}
}
public class Seat {
private String type ;
private Customer customer ;
private int num ;
public Seat(int num , String type){
this.num = num ;
this.type = type ;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public String getType() {
return type;
}
public int getNum() {
return num;
}
}
import java.util.ArrayList ;
public class System {
private ArrayList<Flight> flights ;
}
public class Ticket {
}
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