-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLandQuakeMarker.java
50 lines (33 loc) · 1.1 KB
/
LandQuakeMarker.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package module4;
import de.fhpotsdam.unfolding.data.PointFeature;
import processing.core.PGraphics;
/** Implements a visual marker for land earthquakes on an earthquake map
*
* @author UC San Diego Intermediate Software Development MOOC team
* @author Your name here
*
*/
public class LandQuakeMarker extends EarthquakeMarker {
public LandQuakeMarker(PointFeature quake) {
// calling EarthquakeMarker constructor
super(quake);
// setting field in earthquake marker
isOnLand = true;
}
@Override
public void drawEarthquake(PGraphics pg, float x, float y) {
// Draw a centered circle for land quakes
// DO NOT set the fill color here. That will be set in the EarthquakeMarker
// class to indicate the depth of the earthquake.
// Simply draw a centered circle.
// HINT: Notice the radius variable in the EarthquakeMarker class
// and how it is set in the EarthquakeMarker constructor
// TODO: Implement this method
pg.ellipse(x,y,radius,radius);
}
// Get the country the earthquake is in
public String getCountry()
{
return (String) getProperty("country");
}
}