Question: I have a question about java Implement the isOn(int x, int y) method. Return true if the coordinates lie within the bounding box of Shapes.
- I have a question about java
- Implement the isOn(int x, int y) method. Return true if the coordinates lie within the bounding box of Shapes.
- I have already done the first two but I still can not figure out the triangle one. I cannot specify the area.
- The bounding box is square. (width and height are same). We can use instance variables x and y which represents the point of upper left corner of bounding box, and height representing width and height of bounding box itself
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
