Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help creating a flowchart please Create a Scanner object to take input from the user Print a message asking the user how many
I need help creating a flowchart please
Create a Scanner object to take input from the user Print a message asking the user how many days the pet will be staying Store the user's input in a variable "days" Check the petType attribute of the current Pet object If the petType is "Dog", proceed to step 6. If the petType is "Cat", proceed to step 9. If the petType is neither, proceed to step 14 Check if the value of "days" is greater than 1 If "days" is greater than 1 , print a message asking the user if the dog requires grooming services Store the user's input in a variable "needsGrooming" Check if the catSpace map has less than 12 elements If it does, add the pet object and the value of "days" to the catSpace map If the petType is neither "Dog" nor "Cat", throw a runtime exception with the message "Sorry, we only accept cats and dogs" Close the Scanner object Create a private method "checklnDog" and pass in the Dog object, the value of "days", and the value of "needsGrooming" Close the Scanner objectStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started