Class BookingWithName

java.lang.Object
bcu.cmp5332.bookingsystem.commands.BookingWithName
All Implemented Interfaces:
Command

public class BookingWithName extends Object implements Command
  • Constructor Details

    • BookingWithName

      public BookingWithName(String customerName, String destination, LocalDate bookingDate)
  • 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 interface Command
      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 system
      IOException - If there is an error storing data using FlightBookingSystemData