A lightweight and organized Java console application for managing personal finances.
Bookkeeping is a Java-based console application designed to help users manage personal finances by tracking income and expenses, monitoring progress toward savings goals, and earning achievements. It demonstrates core Object-Oriented Programming (OOP) concepts through a modular structure that handles bookkeeping, financial transactions, habit and item goals, and progress tracking.
It allows users to:
- Record income and expenses
- Watch balance and cash flow
- Set savings goals and track progress
- Keep savings streaks to build habits
- Earn achievements for milestones
- Get smart spending advice
- Save data automatically
Encapsulation keeps data safe inside objects by using private fields. Classes such as HabitGoal, ItemGoal, and FinancialEntity encapsulate their fields and expose functionality through getters and setters, ensuring controlled access and data integrity.
Inheritance allows new classes to reuse code from existing ones. CreditTransaction and DebitTransaction inherit from the abstract class FinancialEntity, sharing common properties like description, amount, and transactionDate without rewriting them.
Polymorphism enables objects to behave differently based on their actual type. Subclasses of FinancialEntity implement their own versions of the displayDetails() method, so the system can handle different transaction types uniformly while each displays correctly.
Abstraction simplifies complex systems by hiding unnecessary details. FinancialEntity defines core transaction behavior and enforces structure for its subclasses, while high-level methods like addCreditTransaction() bundle multiple operations into a single, easy-to-use interface.
| Class | Purpose |
|---|---|
| Main.java | The programs entry point. It handles user input and menu navigation |
| BookkeepingSystem.java | The core system. It manages transactions, balance, goals, and persistence |
| FinancialEntity.java | Abstract base class for all financial transactions |
| CreditTransaction.java | Subclass for income transactions |
| DebitTransaction.java | Subclass for expense transactions |
| GoalManager.java | Central manager for HabitGoal and ItemGoal objects |
| HabitGoal.java | Represents daily/weekly habit-based saving goals |
| ItemGoal.java | Represents saving goals for specific purchases |
| AchievementManager.java | Tracks and unlocks achievements based on progress |
| Achievement.java | Abstract base class defining unlockable achievements |
| AdviceGenerator.java | Provides random financial tips |
| InvalidAmountException.java | Custom exception for invalid transaction amounts |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MAIN SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββ
β BookkeepingSystem β
βββββββββββββββββββββββββββββββββββββββββββββ
β - transactions : List<FinancialEntity> β
β - totalBalance : double β
β - goalManager : GoalManager β
β - achievementManager : AchievementManager β
β - adviceGenerator : AdviceGenerator β
β - totalCashIn : double β
βββββββββββββββββββββββββββββββββββββββββββββ
β + addCreditTransaction(desc, amt) β
β + addDebitTransaction(desc, amt) β
β + allocateToItemGoal(itemName, amt) β
β + displayAllTransactions() β
β + displayFinancialSummary() β
β + saveData() / loadData() β
β + clearAllData() β
ββββββββββββββββββββ¬βββββββββββββββββββββββββ
β
ββββββββββββββββ΄ββββββββββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β List<FinancialEntity> β β GoalManager β
β (Transaction Log) β ββββββββββββββββββββββββββββ
ββββββββββββββββ¬ββββββββββββββββ β - habitGoals β
β β - itemGoals β
βΌ β - totalSavedTowardsGoals β
ββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β FinancialEntity βββββββββ€ + addHabitGoal() β
β (Abstract Class) β β + addItemGoal() β
ββββββββββββββββββββββββ β + allocateToItemGoal() β
β - description β β + displayHabitGoals() β
β - amount β β + displayItemGoals() β
β - type β ββββββββββββββββββββββββββ¬ββ
β - transactionDate β β
ββββββββββββββββββββββββ ββββββββββ΄βββββββββ
β + displayDetails() β βΌ βΌ
ββββββββββββββ¬ββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
βββββββ΄βββββββ β HabitGoal β β ItemGoal β
βΌ βΌ ββββββββββββββββββββ ββββββββββββββββββββ
βββββββββββββββββββ βββββββββββββββββββ β - description β β - itemName β
βCreditTransactionβ βDebitTransaction β β - type β β - description β
βββββββββββββββββββ βββββββββββββββββββ β - targetAmount β β - targetAmount β
β(type="CREDIT") β β(type="DEBIT") β β - currentAmount β β - currentSavings β
β+ displayDetails β β+ displayDetails β β - startDate β β - category β
βββββββββββββββββββ βββββββββββββββββββ β - deadline β β - createdDate β
β - completed β β - completed β
β - streakCount β ββββββββββββββββββββ
ββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SUPPORT CLASSES β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β AchievementManager β β AdviceGenerator β
βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β - unlockedMilestones β β - adviceList[] β
βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β + checkAchievements() β β + getRandomAdvice() β
βββββββββββββββ¬ββββββββββββββ ββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Achievement β
β (Abstract) β
βββββββββββββββββββ
β - name β
β - unlocked β
βββββββββββββββββββ
β + unlock() β
β + checkConditionβ
βββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββ
β InvalidAmountException β
β (extends Exception) β
ββββββββββββββββββββββββββββββββββββββββββββ
β (custom exception for invalid amounts) β
ββββββββββββββββββββββββββββββββββββββββββββ
- Verify Java Installation
java --version- Navigate to the Project Directory
cd OOP_FINAL_PROJECT- Compile All Java Files
javac *.java(Situational) If package folders are used, you may need:
javac */*.java *.java- Run the Program
java Main- Open the project folder.
- Ensure all .java files are in the same source directory.
- Run Main.java.
No previous data found. Starting fresh...
==============================================
BOOKKEEPING SYSTEM - GOALS EDITION
==============================================
Loaded 0 previous transactions
Current Balance: P0.00
Saved towards goals: P0.00
============================================================
MAIN MENU
============================================================
1. Add Credit Transaction (Income)
2. Add Debit Transaction (Expense)
3. View All Transactions
4. View Financial Summary
5. Manage Goals
6. Allocate to Specific Goal
7. Manual Save Data
8. Clear All Data
9. Exit
============================================================
Choose an option (1-9): 1
--- Add Credit Transaction ---
Enter description: Allowance
Enter amount: 1000
Achievement Unlocked: You saved 1000!
Financial Advice: Track your expenses daily.
Data saved successfully!
Credit transaction added successfully!
Press Enter to continue...FREUDIAN
| Member | GitHub |
|---|---|
| Cueto, Carl John T. | https://github.com/Cjaizee |
| Fernandez, John Rommel P. | https://github.com/Nicojin |
| Oliver, Jmar C. | https://github.com/yeloooooooooooooo |
Acknowledgements: Sir Emmanuel Charlie Enriquez & Ma'am Fatima Marie Agdon
- Add a GUI β Implement a user-friendly interface using JavaFX or Swing
- Data Visualization β Add charts/graphs for spending patterns and goal progress
- AI-Powered Insights β Implement smart financial advice based on spending habits
- Mobile Application β Create an Android/iOS companion app
- Recurring Transactions β Support for automatic periodic transactions
- Budget Categories β Enhanced categorization and budgeting tools
- Learning Resources
- Classroom lecture notes on OOP principles
- Online Resources