/**
 * As a police officer, your task is to issue a ticket to a driver.
 * You have to determine if you should issue a ticket based on three conditions:
 *
 * 1. The driver's speed is greater than 80 km/h.
 * 2. The driver is not drunk.
 * 3. The police officer is not busy.
 *
 * You need to write a code using a ternary operator to solve this exercise.
 * If all the conditions are met, the code should return 'Ticket Issued', otherwise, it should return 'No Ticket'.
 *
 * @param speed an integer representing the driver's speed in km/h.
 * @param isDrunk a boolean indicating whether the driver is drunk (true) or not (false).
 * @param isBusy a boolean indicating whether the police officer is busy (true) or not (false).
 * @return 'Ticket Issued' if all conditions are met, otherwise 'No Ticket'.
 */
fun issueTicket(speed: Int, isDrunk: Boolean, isBusy: Boolean): String {

    // Using a ternary operator with multiple conditions to determine if a ticket should be issued
    return if (speed > 80 && !isDrunk && !isBusy) "Ticket Issued" else "No Ticket"
}
/**
 * As a police officer, your task is to issue a ticket to a driver.
 * You have to determine if you should issue a ticket based on three conditions:
 *
 * 1. The driver's speed is greater than 80 km/h.
 * 2. The driver is not drunk.
 * 3. The police officer is not busy.
 *
 * You need to write a code using a ternary operator to solve this exercise.
 * If all the conditions are met, the code should return 'Ticket Issued', otherwise, it should return 'No Ticket'.
 *
 * @param speed an integer representing the driver's speed in km/h.
 * @param isDrunk a boolean indicating whether the driver is drunk (true) or not (false).
 * @param isBusy a boolean indicating whether the police officer is busy (true) or not (false).
 * @return 'Ticket Issued' if all conditions are met, otherwise 'No Ticket'.
 */
fun issueTicket(speed: Int, isDrunk: Boolean, isBusy: Boolean): String {
/**
 * As a police officer, your task is to issue a ticket to a driver.
 * You have to determine if you should issue a ticket based on three conditions:
 *
 * 1. The driver's speed is greater than 80 km/h.
 * 2. The driver is not drunk.
 * 3. The police officer is not busy.
 *
 * You need to write a code using a ternary operator to solve this exercise.
 * If all the conditions are met, the code should return 'Ticket Issued', otherwise, it should return 'No Ticket'.
 *
 * @param speed an integer representing the driver's speed in km/h.
 * @param isDrunk a boolean indicating whether the driver is drunk (true) or not (false).
 * @param isBusy a boolean indicating whether the police officer is busy (true) or not (false).
 * @return 'Ticket Issued' if all conditions are met, otherwise 'No Ticket'.
 */
fun issueTicket(speed: Int, isDrunk: Boolean, isBusy: Boolean): String {

    // Using a ternary operator with multiple conditions to determine if a ticket should be issued
    return if (speed > 80 && !isDrunk && !isBusy) "Ticket Issued" else "No Ticket"
}