Skip to content

Conversation

@jaydenellis
Copy link
Contributor

Enhanced Bank ATM with SOLID Principles Implementation

Summary

Implemented SOLID principles enhancements to the Bank ATM simulator by adding inheritance hierarchy and Observer pattern for audit logging.

Changes Made

Option 1: SavingsAccount Implementation

  • Created Account interface with core banking operations
  • Added BaseAccount abstract class implementing template method pattern
  • Extended SavingsAccount from BaseAccount with check transaction restrictions
  • Updated CheckingAccount to extend BaseAccount for consistency
  • Modified Customer class to support mixed account types

Option 4: AuditLog Integration

  • Implemented Observer pattern with TransactionObserver interface
  • Created AuditEntry data class for transaction records
  • Added AuditLog class implementing TransactionObserver
  • Integrated audit logging into BankAtm transaction methods
  • Added observer management methods to ATM

SOLID Principles Demonstrated

  • Single Responsibility: Each class has one clear purpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant