Skip to content

A simple tool that can be used to keep track of daily household expenses.

License

Notifications You must be signed in to change notification settings

code-chaser/expense-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6199082 Â· Oct 3, 2022

History

33 Commits
Jul 21, 2022
Feb 16, 2022
Feb 15, 2022
Feb 15, 2022
Feb 16, 2022
Feb 16, 2022
Dec 24, 2021
Jan 18, 2022
Oct 3, 2022
Oct 3, 2022
Dec 24, 2021
Feb 14, 2022
Jun 9, 2022
Feb 16, 2022

Repository files navigation

expense-manager   License: MIT Download Code

A simple tool that can be used to keep track of daily household expenses, made using basic OOPs features in C++ and a little bit of file handling


CHECK OUT



BUILD & EXECUTE

  • For Windows users: firstly install make for executing makefile, from this link;
  • For Linux users: make generally comes pre-installed;
    • if not, then run the following command: sudo apt-get install make

  • Now, run the following commands:
    • for building executable file:
       make all        # universal;
    • for executing it:
       make run        # universal;
    • for deleting executable file:
       make clean      # for linux/macOS;
       make clean(win) # for windows;


SCREENSHOTS







CLASS DESIGN

ClassDiagram



CLASS DESIGN

- rendered by mermaid



Loading
classDiagram
   direction RL
   class ExpenseManager{
      -$map~long long, Expense~ expenses
      -$map~long long, string~ commodityTypes
      +$addExpense(Expense) void
      +$removeExpense(Expense) void
      +$getExpenseDetails() Expense
      +$calculateExpenditure() void
      +$printExpenses() void
      +$addCommodityType(string) void
      +$removeCommodityType(string) void
      +$getCommodityType() string
      +$printCommodityTypes() void
      +$readFromCSV() void
      +$writeToCSV() void
   }
   class Expense{
      -long long id
      -Date date
      -Commodity commodity
      -double quantity
      -double amount
      +Expense() void
      +Expense(long long, Date, Commodity, double, double) void
      +setId(long long) void
      +setDate(Date) void
      +setCommodity(Commodity) void
      +setQuantity(double) void
      +setAmount(double) void
      +getId() long long
      +getDate() Date
      +getCommodity() Commodity
      +getQuantity() double
      +getAmount() double
      +inputDetails() void
      +printDetails() void
      +$printDetails(vector~Expense~) void
   }
   class Commodity{
      -string name
      -string type
      -double rate
      +Commodity() void
      +Commodity(string, string, double) void
      +setName(string) void
      +setType(string) void
      +setRate(double) void
      +getName() string
      +getType() string
      +getRate() double
      +inputDetails() void
      +printDetails() void
      
   }
   class Date{
      -int day
      -int month
      -int year
      +Date() void
      +Date(int, int, int) void
      +setDay(int) void
      +setMonth(int) void
      +setYear(int) void
      +getDay() int
      +getMonth() int
      +getYear() int
      +inputDetails() void
      +printDetails() void
      +stringToDate(string) void
      +dateToString() string
      +value() int
      +validateDate() bool
   }
   ExpenseManager *-- Expense
   Expense *-- Commodity
   Expense *-- Date
   link ExpenseManager "https://github.com/code-chaser/expense-manager/blob/main/include/ExpenseManager.hh" "click to see declaration"
   link Expense "https://github.com/code-chaser/expense-manager/blob/main/include/Expense.hh" "click to see declaration"
   link Commodity "https://github.com/code-chaser/expense-manager/blob/main/include/Commodity.hh" "click to see declaration"
   link Date "https://github.com/code-chaser/expense-manager/blob/main/include/Date.hh" "click to see declaration"

TECH STACK

  • C++

Happy Expenditures!! 🤪