public final class AirlineCompany
extends java.lang.Object
Constructor and Description |
---|
AirlineCompany()
Default constructor for the AirlineCompany class.
|
AirlineCompany(java.lang.String name)
Constructor for the AirlineCompany class which takes the default name.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Integer,GenericFlight> |
getFlights()
Get all registered flights for this airline company.
|
java.lang.String |
getName()
Getter for the airline company name.
|
int |
registerFlight(GenericFlight flight)
Register a flight with the airline company.
|
void |
setName(java.lang.String name)
Setter for the airline company name.
|
void |
unregisterFlight(java.lang.Integer flightNumber)
Unregister flight with the airline company.
|
public AirlineCompany()
public AirlineCompany(java.lang.String name)
name
- Airline Company Name.public java.lang.String getName()
public void setName(java.lang.String name)
name
- Airline Company Name.public java.util.Map<java.lang.Integer,GenericFlight> getFlights()
public int registerFlight(GenericFlight flight)
public void unregisterFlight(java.lang.Integer flightNumber)
flightNumber
- Flight Number.