Package at.jku.ssw.fp.airline
Class Agency
- java.lang.Object
-
- at.jku.ssw.fp.airline.Agency
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Flight
findFlight(Airline airline, String from, String to, LocalDate date)
Finds a flight provided by an airline.Offer
getOffer(Flight flight)
Returns an offer for a flight.String
toString()
Returns a string representation of the agency.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface at.jku.ssw.fp.airline.Retailer
getOfferAsync
-
-
-
-
Constructor Detail
-
Agency
public Agency(String name)
Constructor setting the name.- Parameters:
name
- the name of the agency.
-
-
Method Detail
-
findFlight
public Flight findFlight(Airline airline, String from, String to, LocalDate date)
Finds a flight provided by an airline.- Parameters:
airline
- the airlinefrom
- the origin of the flightto
- the destination of the flightdate
- the date of the flight- Returns:
- the flight object provided by the airline
-
-