-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEarthquake.java
More file actions
90 lines (80 loc) · 2.37 KB
/
Copy pathEarthquake.java
File metadata and controls
90 lines (80 loc) · 2.37 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
* A class which contains earthquake information.
*/
public class Earthquake
{
private double magnitude;
private double latitude;
private double longitude;
private int earthquakeEventYear;
/**
* Constructs an Earthquake object constructor.
* @param magnitude the earthquake magnitude, with type as double.
* @param latitude the earthquake latitude, with type as double.
* @param longitude the earthquake longitude, with type as double.
* @param earthquakeEventYear the earthquake event year, with the type int.
*/
public Earthquake(double magnitude, double latitude, double longitude, int earthquakeEventYear)
{
this.magnitude = magnitude;
this.latitude = latitude;
this.longitude = longitude;
this.earthquakeEventYear = earthquakeEventYear;
}
/**
* Gets the earthquake magnitude.
* @return the magnitude as double
*/
public double getMagnitude() {
return magnitude;
}
/**
* Set the earthquake magnitude.
* @param magnitude the earthquake magnitude, with type as double
*/
public void setMagnitude(double magnitude) {
this.magnitude = magnitude;
}
/**
* Gets the earthquake latitude.
* @return the latitude as double
*/
public double getLatitude() {
return latitude;
}
/**
* Set the earthquake latitude.
* @param latitude the earthquake latitude, with the type as double
*/
public void setLatitude(double latitude) {
this.latitude = latitude;
}
/**
* Get the earthquake longitude.
* @return the longitude as double
*/
public double getLongitude() {
return longitude;
}
/**
* Set the earthquake longitude.
* @param longitude the earthquake longitude, with the type as double
*/
public void setLongitude(double longitude) {
this.longitude = longitude;
}
/**
* Get the earthquake event year.
* @return the earthquake event year as int
*/
public int getEarthquakeEventYear() {
return earthquakeEventYear;
}
/**
* Set the earthquake event year.
* @param earthquakeEventYear the earthquake even year, with the type as int
*/
public void setEarthquakeEventYear(int earthquakeEventYear) {
this.earthquakeEventYear = earthquakeEventYear;
}
}