Personal Finance 1.0.0
An application that allows you to track/store/view finances, as well as calculate different financial values.
Expense.h
Go to the documentation of this file.
1/*
2 * Author: Dawson Dauphinais
3 * ddauphin@nmu.edu
4 *
5 * Date Last Modified: 11/23/2021
6 *
7 * This file contains the definitions of the functions belonging to the Expense class.
8 *
9 * */
10#ifndef PERSONALFINANCE_EXPENSE_H
11#define PERSONALFINANCE_EXPENSE_H
12
13#include "Money.h"
14
20class Expense : public Money
21{
22private:
23 string name;
24 Money price;
25 string type;
26 string date;
27 bool isRecurring;
28
29public:
38 void setValues(string n, Money &p, string t, string d, bool iR);
39
44 void setName(string name);
45
50 void setPrice(Money price);
51
56 void setType(string type);
57
62 void setDate(string date);
63
68 void setIsRecurring(bool isRecurring);
69
74 string getName();
75
81
86 string getType();
87
92 string getDate();
93
98 bool getIsRecurring() const;
99
105
110 string toString();
111};
112
113#endif //PERSONALFINANCE_EXPENSE_H
The Expense class is used to perform various operations on an Expense object.
Definition: Expense.h:21
void setType(string type)
Sets the type of the Expense.
void setValues(string n, Money &p, string t, string d, bool iR)
Sets the values of the Expense object.
void setName(string name)
Sets the name of the Expense.
Money getPrice()
Returns the price of the Expense.
string getDate()
Returns the date of the Expense.
bool getIsRecurring() const
Returns whether the Expense is recurring or not.
void setPrice(Money price)
Sets the price of the Expense.
void setDate(string date)
Sets the date of the Expense.
string getName()
Returns the name of the Expense.
string getType()
Returns the type of the Expense.
void setIsRecurring(bool isRecurring)
Sets whether the Expense is recurring or not.
string toString()
Converts the Expense object into a string.
void printValues()
Prints the values currently stored in the Expense object.
The Money class is used to allow operations on Money.
Definition: Money.h:27