Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 object

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

g. What types of roles did women have in the show?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago