Question: 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

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 Databases Questions!