-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPair.hpp
More file actions
33 lines (26 loc) · 809 Bytes
/
Pair.hpp
File metadata and controls
33 lines (26 loc) · 809 Bytes
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
//
// Created by gmook on 4/7/2021.
//
#ifndef P3P2_PAIR_HPP
#define P3P2_PAIR_HPP
#include <string>
class Pair { // represents a single attribute and its value:
public:
Pair();
// use the first constructor if the value of the pair is a string
// and use the second one if it is a double value.
Pair(std::string attributeName, std::string attributeValue);
Pair(std::string attributeName, double c);
bool &isDouble();
void print();
void print(int numSpaces, bool addComma);
std::string locateId();
void setterForId(bool boolId);
bool foundTheId();
double locateGpa();
private:
std::string _attributeName, _attributeStringValue;
double _attributeNumberValue;
bool _isNumber, idSearch;
};
#endif //P3P2_PAIR_HPP