Class BookingWithName
java.lang.Object
bcu.cmp5332.bookingsystem.commands.BookingWithName
- All Implemented Interfaces:
Command
-
Field Summary
Fields inherited from interface bcu.cmp5332.bookingsystem.commands.Command
HELP_MESSAGE
-
Constructor Summary
ConstructorDescriptionBookingWithName
(String customerName, String destination, LocalDate bookingDate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(FlightBookingSystem flightBookingSystem) Executes the command within the provided FlightBookingSystem instance.
-
Constructor Details
-
BookingWithName
-
-
Method Details
-
execute
public void execute(FlightBookingSystem flightBookingSystem) throws FlightBookingSystemException, IOException Description copied from interface:Command
Executes the command within the provided FlightBookingSystem instance. Implementing classes define specific operations to be performed within the system, such as adding a flight, cancelling a booking, etc.- Specified by:
execute
in interfaceCommand
- Parameters:
flightBookingSystem
- The FlightBookingSystem instance on which the command is to be executed- Throws:
FlightBookingSystemException
- If there is an issue executing the command in the systemIOException
- If there is an error storing data using FlightBookingSystemData
-