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