summaryrefslogtreecommitdiffstats
path: root/dev/a3-earthquake/earthquake.h
diff options
context:
space:
mode:
authorKT <tran0563@umn.edu>2021-10-04 21:25:55 -0500
committerKT <tran0563@umn.edu>2021-10-04 21:25:55 -0500
commit427e0e31a7ba3d947aac97b30d9397dad329078d (patch)
tree534bb19ea21c593d314ce32ae875012df0338ed1 /dev/a3-earthquake/earthquake.h
parentpublish a2 (diff)
downloadcsci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar.gz
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar.bz2
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar.lz
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar.xz
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.tar.zst
csci4611-427e0e31a7ba3d947aac97b30d9397dad329078d.zip
Publish a3
Diffstat (limited to '')
-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