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.

  1. I have a question about java
  2. Implement the isOn(int x, int y) method. Return true if the coordinates lie within the bounding box of Shapes.
  3. I have already done the first two but I still can not figure out the triangle one. I cannot specify the area.
  4. 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
HEIGHT

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!