aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a3-earthquake/earthquake.h
blob: 74f95e337ed4f226155fdac3e6271db2370d818b (plain) (blame)
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
/** 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