/**
 * The function takes a list of maps representing pets and checks their vaccination status.
 * Each map contains the following key-value pairs:
 * - 'name': the name of the pet (String)
 * - 'species': the species of the pet (String)
 * - 'vaccinated': a boolean indicating whether the pet is vaccinated or not
 *
 * The function prints a warning for each pet that is not vaccinated and returns a list of vaccinated pets.
 *
 * @param petList List of maps representing pets
 * @return List containing the maps of vaccinated pets
 */
fun checkVaccinationStatus(petList: List<Map<String, Any>>): List<Map<String, Any>> {

    val vaccinatedPets = mutableListOf<Map<String, Any>>()  // Empty list to store the vaccinated pets

    for (pet in petList) {
        if (pet["species"] == "dog") {
            if (pet["vaccinated"] != true) {
                println("Warning: Dog '${pet["name"]}' is not vaccinated!")
            } else {
                vaccinatedPets.add(pet)
            }
        } else if (pet["species"] == "cat") {
            if (pet["vaccinated"] != true) {
                println("Warning: Cat '${pet["name"]}' is not vaccinated!")
            } else {
                vaccinatedPets.add(pet)
            }
        }
    }

    return vaccinatedPets
}
/**
 * The function takes a list of maps representing pets and checks their vaccination status.
 * Each map contains the following key-value pairs:
 * - 'name': the name of the pet (String)
 * - 'species': the species of the pet (String)
 * - 'vaccinated': a boolean indicating whether the pet is vaccinated or not
 *
 * The function prints a warning for each pet that is not vaccinated and returns a list of vaccinated pets.
 *
 * @param petList List of maps representing pets
 * @return List containing the maps of vaccinated pets
 */
fun checkVaccinationStatus(petList: List<Map<String, Any>>): List<Map<String, Any>> {
/**
 * The function takes a list of maps representing pets and checks their vaccination status.
 * Each map contains the following key-value pairs:
 * - 'name': the name of the pet (String)
 * - 'species': the species of the pet (String)
 * - 'vaccinated': a boolean indicating whether the pet is vaccinated or not
 *
 * The function prints a warning for each pet that is not vaccinated and returns a list of vaccinated pets.
 *
 * @param petList List of maps representing pets
 * @return List containing the maps of vaccinated pets
 */
fun checkVaccinationStatus(petList: List<Map<String, Any>>): List<Map<String, Any>> {

    val vaccinatedPets = mutableListOf<Map<String, Any>>()  // Empty list to store the vaccinated pets

    for (pet in petList) {
        if (pet["species"] == "dog") {
            if (pet["vaccinated"] != true) {
                println("Warning: Dog '${pet["name"]}' is not vaccinated!")
            } else {
                vaccinatedPets.add(pet)
            }
        } else if (pet["species"] == "cat") {
            if (pet["vaccinated"] != true) {
                println("Warning: Cat '${pet["name"]}' is not vaccinated!")
            } else {
                vaccinatedPets.add(pet)
            }
        }
    }

    return vaccinatedPets
}