Created
June 21, 2024 16:26
-
-
Save mcsee/1b8a4c6bc7bd1fc9947f684e4e92b30c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Domain classes | |
abstract class Transaction { | |
private String id; | |
private double amount; | |
} | |
class BankTransaction extends Transaction { | |
private String bankName; | |
} | |
class CreditCardTransaction extends Transaction { | |
private String cardNumber; | |
} | |
// Persistence classes | |
abstract class TransactionDAO { | |
private String id; | |
private double amount; | |
} | |
class BankTransactionDAO extends TransactionDAO { | |
private String bankName; | |
} | |
class CreditCardTransactionDAO extends TransactionDAO { | |
private String cardNumber; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment