java.lang.Object
com.example.cab302project.Hotspot
Represents a geographic crime hotspot, defined by a central coordinate
and the number of crimes clustered within that area.
Used by the dashboard and police dashboard to render hotspot markers
on the map with intensity based on the crime count.
-
Constructor Summary
ConstructorsConstructorDescriptionHotspot(double latitude, double longitude, int count) Constructs a new Hotspot with the given coordinates and crime count. -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Returns the number of crimes clustered at this hotspot.doubleReturns the latitude of the hotspot centre.doubleReturns the longitude of the hotspot centre.
-
Constructor Details
-
Hotspot
public Hotspot(double latitude, double longitude, int count) Constructs a new Hotspot with the given coordinates and crime count.- Parameters:
latitude- the latitude of the hotspot centrelongitude- the longitude of the hotspot centrecount- the number of crimes clustered at this hotspot
-
-
Method Details
-
getLatitude
public double getLatitude()Returns the latitude of the hotspot centre.- Returns:
- latitude as a double
-
getLongitude
public double getLongitude()Returns the longitude of the hotspot centre.- Returns:
- longitude as a double
-
getCount
public int getCount()Returns the number of crimes clustered at this hotspot.- Returns:
- crime count as an integer
-