aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a3-earthquake/earthquake.h
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2021-10-11 20:02:46 -0500
committerMatt Strapp <matt@mattstrapp.net>2021-10-11 20:02:46 -0500
commitaa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf (patch)
treed5049549bcb1fed21d118c200ae40bac7e1ebbcc /dev/a3-earthquake/earthquake.h
parentFix gnu's stupidity (diff)
parentPublish a3 (diff)
downloadcsci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar.gz
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar.bz2
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar.lz
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar.xz
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.tar.zst
csci4611-aa2a4faf537c9bc7e2e87ff38483e2bf53ed24cf.zip
Merge branch 'support-code' of github.umn.edu:umn-csci-4611-f21/shared-upstream
Diffstat (limited to 'dev/a3-earthquake/earthquake.h')
-rw-r--r--dev/a3-earthquake/earthquake.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev/a3-earthquake/earthquake.h b/dev/a3-earthquake/earthquake.h
new file mode 100644
index 0000000..74f95e3
--- /dev/null
+++ b/dev/a3-earthquake/earthquake.h
@@ -0,0 +1,35 @@
+/** CSci-4611 Assignment 3: Earthquake
+ */
+
+#ifndef EARTHQUAKE_H_
+#define EARTHQUAKE_H_
+
+#include <string>
+
+#include "date.h"
+
+/** Small data structure for storing earthquake data.
+ */
+class Earthquake {
+public:
+ // Create an earthquake from a datafile's line of text
+ Earthquake(std::string s);
+ Earthquake();
+
+ Date date();
+
+ double longitude();
+
+ double latitude();
+
+ double magnitude();
+
+private:
+
+ double ParseFloat(std::string s);
+ int ParseInt(std::string s);
+
+ std::string line;
+};
+
+#endif