-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spread.h
38 lines (20 loc) · 879 Bytes
/
Spread.h
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
36
37
38
//
// Created by Kavi Palmer on 1/5/22.
//
#ifndef SPORTSBETMANAGER_IMPROVED_SPREAD_H
#define SPORTSBETMANAGER_IMPROVED_SPREAD_H
#include "SportsBet.h"
class Spread: public SportsBet {
private:
bool favorite; //true if betting over the spread, false otherwise
double gameSpread; //spread of the game
public:
void setSpread(const double &spread); //set the game spread
void setFavorite(bool fav); //set whether betting over or under the spread
double getSpread() const; //returns the game spread
std::string getFavorite() const; //returns whether betting over or under the spread
bool equals(const Spread &rhs) const; //checks if rhs equals this object
bool operator==(const Spread &rhs) const; //operator overload
std::string toString() const; //displays Spread bet as a string
};
#endif //SPORTSBETMANAGER_IMPROVED_SPREAD_H