Closed Aduceus closed 1 year ago
When passengers are added to a Flight object there are no checks against the max capacity attribute passengerCapacity within the addPassengers() method of the Flight class, allowing for more passengers to be booked to a flight than the capacity allows for. https://github.com/Green-Light-Innovation/flight-booking-system/blob/3d3c17fee2d095a9c29c2faee6d4d9bcf50f778b/src/bcu/cmp5332/bookingsystem/model/Flight.java#L199-L205
Fixed here https://github.com/Green-Light-Innovation/flight-booking-system/blob/647c347695da55b5152bccdf8f64935729c263d2/src/bcu/cmp5332/bookingsystem/model/Flight.java#L210-L223
When passengers are added to a Flight object there are no checks against the max capacity attribute passengerCapacity within the addPassengers() method of the Flight class, allowing for more passengers to be booked to a flight than the capacity allows for. https://github.com/Green-Light-Innovation/flight-booking-system/blob/3d3c17fee2d095a9c29c2faee6d4d9bcf50f778b/src/bcu/cmp5332/bookingsystem/model/Flight.java#L199-L205