Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ask the user for the title, the width, and the height of the window they want. After getting the required information, create the actual window

Ask the user for the title, the width, and the height of the window they want.

After getting the required information, create the actual window by using the Detector constructor (example given in the API link).

Ask the user what shape they want to add

Ask the user for the location, and size of the shape

After you have received all of this information, don't forget to actually create and add the shape by using the addShape()method. Notice that each shape will require different types of information (e.g. rectangle requires width and height, while circle needs radius).

Ask the user if they want to add a point

If they choose yes, then get the point location from them. Once you get the required information, create the point using the addPoint() method.

Tell the user whether the point is in the shape and display this as a message. (Hint: Look for a useful method in the API link)

Remove the shapes (Hint: Look for a method in the API link)

Now loop everything! Keep asking the user what shape they want to add until the user chooses to exit.

Display "Done :)" once they choose to exit

Do not forget the smiley face

in java

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

=+2 How does the preparation and support for each type of IE vary?

Answered: 1 week ago