Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ Bookkeeping System

A lightweight and organized Java console application for managing personal finances.


πŸ“Œ Overview

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

🧠 OOP Concepts Demonstrated

βœ” Encapsulation

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

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

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

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.


πŸ—‚οΈ Project Structure

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

Class Diagram (Text-Based)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            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)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

▢️ How to Compile and Run

  1. Verify Java Installation
java --version
  1. Navigate to the Project Directory
cd OOP_FINAL_PROJECT
  1. Compile All Java Files
javac *.java

(Situational) If package folders are used, you may need:

javac */*.java *.java
  1. Run the Program
java Main

Using an IDE (VS Code.., etc.)

  1. Open the project folder.
  2. Ensure all .java files are in the same source directory.
  3. Run Main.java.

πŸ’» Sample Output

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...

πŸ₯‡ Authors and Acknowledgement

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


🀝 Other Sections

A. Future Enhancements πŸ€–

  • 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

B. References πŸ“š

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages