Convert this Java code into a simple UML diagram. Create a bank
diagram, logic diagram, and category diagram.
public interface BankAccount {
public void doTransaction(Double amount, TransactionType transactionType);
}
enum TransactionType {
CREDIT, DEBIT;
// Use stereotype enumeration for enum in the UML diagram
}
abstract class AbstractBankAccount implements BankAccount {
private String id;
private Double balance;
public String getID() {
return null;
}
public Double getBalance() {
return null;
}
public void doTransaction(Double amount, TransactionType transactionType) {
// Implementation goes here
}
}
class CheckingAccount extends AbstractBankAccount {
// Implementation goes here
}
class SavingsAccount extends AbstractBankAccount {
public void accrueInterest() {
// Implementation goes here
}
}
class Customer {
private java.util.LinkedList<BankAccount> accounts = new java.util.LinkedList<BankAccount>();
public void addAccount(BankAccount account) {
accounts.add(account);
}
public void removeAccount(BankAccount account) {
accounts.remove(account);
}
}