/**
 * This function simulates a veterinarian treating an animal based on its condition.
 * The veterinarian can handle different real-life scenarios by using if-else statements.
 * The exercise requires you to complete the code by adding all the necessary if-else statements.
 * Be prepared for a challenging exercise!
 */
fun treatAnimal(animal: String, condition: String): String {

    // If the animal is a dog:
    if (animal == "dog") {
        // TODO: write code to treat the dog based on its condition
        return when (condition) {
            "fractured leg" -> "Perform surgery to fix the fractured leg."
            "infection" -> "Administer antibiotics to treat the infection."
            "obesity" -> "Prescribe a weight management plan and recommend exercise."
            "heartworm" -> "Administer medication for heartworm treatment."
            else -> "Unable to treat the condition of the dog."
        }
    }
    
    // If the animal is a cat:
    else if (animal == "cat") {
        // TODO: write code to treat the cat based on its condition
        return when (condition) {
            "feline leukemia" -> "Administer supportive care and monitor the cat's condition."
            // Add more conditions for treating a cat here
            else -> "Unable to treat the condition of the cat."
        }
    }
    
    // Handle other animal types here
    else {
        return "Animal type not supported."
    }
}
/**
 * This function simulates a veterinarian treating an animal based on its condition.
 * The veterinarian can handle different real-life scenarios by using if-else statements.
 * The exercise requires you to complete the code by adding all the necessary if-else statements.
 * Be prepared for a challenging exercise!
 */
fun treatAnimal(animal: String, condition: String): String {
/**
 * This function simulates a veterinarian treating an animal based on its condition.
 * The veterinarian can handle different real-life scenarios by using if-else statements.
 * The exercise requires you to complete the code by adding all the necessary if-else statements.
 * Be prepared for a challenging exercise!
 */
fun treatAnimal(animal: String, condition: String): String {

    // If the animal is a dog:
    if (animal == "dog") {
        // TODO: write code to treat the dog based on its condition
        return when (condition) {
            "fractured leg" -> "Perform surgery to fix the fractured leg."
            "infection" -> "Administer antibiotics to treat the infection."
            "obesity" -> "Prescribe a weight management plan and recommend exercise."
            "heartworm" -> "Administer medication for heartworm treatment."
            else -> "Unable to treat the condition of the dog."
        }
    }
    
    // If the animal is a cat:
    else if (animal == "cat") {
        // TODO: write code to treat the cat based on its condition
        return when (condition) {
            "feline leukemia" -> "Administer supportive care and monitor the cat's condition."
            // Add more conditions for treating a cat here
            else -> "Unable to treat the condition of the cat."
        }
    }
    
    // Handle other animal types here
    else {
        return "Animal type not supported."
    }
}