Question: Start the Pet Check - In Process Display a welcome message to the pet owner. Prompt the pet owner to enter the type of pet

Start the Pet Check-In Process
Display a welcome message to the pet owner.
Prompt the pet owner to enter the type of pet (dog or cat).
Read the pet type from the user.
Check the availability of boarding space for the entered pet type.
If pet type is "dog":
If dogSpaces >0:
Decrease the number of dogSpaces by 1.
If the pet is a returning pet, retrieve the pet's information.
If it's a new pet, collect the following information:
Pet name
Pet age
Length of stay (days)
Check if the pet owner wants grooming (only for dogs staying two or more days).
If yes, set groomed = true.
If no, set groomed = false.
Assign the pet to a dog space.
If dogSpaces ==0:
Display a message indicating no available dog spaces.
If pet type is "cat":
If catSpaces >0:
Decrease the number of catSpaces by 1.
If the pet is a returning pet, retrieve the pet's information.
If it's a new pet, collect the following information:
Pet name
Pet age
Length of stay (days)
Assign the pet to a cat space.
If catSpaces ==0:
Display a message indicating no available cat spaces.
Display a confirmation message with the assigned space for the pet.
End the Pet Check-In Process.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!