9#ifndef PERSONALFINANCE_MONEY_H
10#define PERSONALFINANCE_MONEY_H
52 explicit Money(
const string &s);
120 static double power(
double d,
int exp);
The Money class is used to allow operations on Money.
Definition: Money.h:27
Money(double m)
Constructor for the Money class based on a double.
bool operator==(const Money &m) const
Overloads the == operator for the Money class.
friend ostream & operator<<(ostream &out, const Money &m)
Overloads the << operator for the Money class.
static string toString(const Money &m1)
Converts a Money object to a string.
Money(int d, int c)
Constructor for the Money class based on two integers.
Money operator+(const Money &m) const
Overloads the + operator for the Money class.
static Money power(Money &m, int exp)
Implements the power function for the Money class.
Money operator*(double val) const
Overloads the * operator for the Money class.
Money()
Default constructor for the Money class.
static double toDouble(const Money &m)
Converts a Money object to a double value.
Money operator-() const
Overloads the - operator for the Money class.
Money operator/(double m) const
Overloads the / operator for the Money class.
static double power(double d, int exp)
Helper function for the power function of the Money class.
Money(const string &s)
Constructor for the Money class based on a string.
Money operator/(Money &m) const
Overloads the / operator for the Money class.
Money operator-(const Money &m) const
Overloads the - operator for the Money class.