I am new to C# and working on Flight booking service assignment. Need to implement an additional logic along with below default rules. Used If-else-if statement, but need to improve the code. Could anyone please help?
Additional Requirement : Need to keep below default rules but also have an option to choose a different set where they relax the requirement for the revenue generated exceeding the cost only if the amount of airline employees aboard is greater than the minimum percentage of passengers required. They want the option to switch between these rules sets. They have indicated they might want more rule sets in the future.
Default rules are : 1) The revenue generated from the flight must exceed the cost of the flight
2) The number of passengers cannot exceed the amount of seats on the plane
3)The aircraft must have a minimum percentage of passengers booked for that route
have used IF-ELSE IF- ELSE statement to check above rules, but need to know better way to write the logic. Please help