From 427e0e31a7ba3d947aac97b30d9397dad329078d Mon Sep 17 00:00:00 2001 From: KT Date: Mon, 4 Oct 2021 21:25:55 -0500 Subject: Publish a3 --- dev/a3-earthquake/earthquake.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dev/a3-earthquake/earthquake.h (limited to 'dev/a3-earthquake/earthquake.h') 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 + +#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 -- cgit v1.2.3