Programming Design
Answers
// Create a procedure that calculates the total cost for veterinary services PROCEDURE calcTotalCost //Input data for services INPUT flatFeeMedical, flatFeeShots, flatFeeGroomDogs, flatFeeGroompoodles, flatFeeBatheCats, feeBoardCat, feeBoardSmallDog, feeBoardLargeDog //Input data for discount INPUT discountLessThan3, discountMoreThan3 // Initialize total cost totalCost = 0 //Create loop to keep asking the pet owner if there are more animals WHILE all pets not entered //Input type of animal and number of days to be boarded INPUT animalType, boardingNumDays IF animalType = "dog" THEN //Calculate the cost of medical services and shots totalCost = totalCost + flatFeeMedical + flatFeeShots //Calculate the cost for the groom based on type of dog IF animalType == "poodle" THEN totalCost = totalCost + flatFeeGroomPoodles ELSE totalCost = totalCost + flatFeeGroomDogs END IF //Calculate the