Working on a project on a class named "budget". We were instructed to pretty much stuff everything into a .h file and not worry about .cpp files in the meantime. This is what I have so far. I commented out the remaining things I need help with. Any information would help!
#pragma once
#include <vector>
class Budget
{
private:
std::vector <double> expenses;
std::vector <double> income;
double budget;
public:
Budget();
Budget(double);
void EditIncome(int, double);
void DeleteIncome(int);
void DeleteExpense(int);
void AddExpense(double);
void AddIncome(double);
double CalculateBudget();
};
Budget::Budget(double budget)
{
this->budget = budget;
}
void Budget::AddExpense(double value)
{
expenses.push_back(value);
//Need to pushback value into vector
//Need -> array[index] = value;
}
void Budget::AddIncome(double add) // argument needed
{
income.push_back(add);
//same as above
}
double Budget::CalculateBudget()
{
//Need the sum of all income
//Need sum of all expenses
//Need to subtract expenses from income
//Need to store value into budget
//Need to return budget
}