So I need help for my homework, but for these steps I don’t understand what I am doing wrong and how to fix it. These functions are meant to get the information of the earthquakes and draw a popup with the indicated information when the mouse is over the circle.
boolean overCircle(int x, int y) {
if (mouseX >= x+5 && mouseX <= x-5 && mouseY >= y+5 && mouseY <=y-5)
return true; // always return true for now
}
/**
This function draws a popup rectangle containing the
title information of the given earthquake data.
parameters:
- JSONObject datum: data on one earthquake
- int x, int y: the location of the earthquake
returns void
*/
void drawPopup(JSONObject datum, int x, int y) {
// TODO (HW problem 3) write your code here.
// Delete this comment when you are finished.
if {boolean
returns true
getTitle(datum);