Below is a UML Class Diagram for an Online Banking System, with necessary assumptions clearly stated.
Assumptions:
- A customer can have multiple bank accounts.
- Each account belongs to one customer.
- Customers access the system using login credentials.
- Transactions can be Deposit, Withdrawal, or Transfer.
- An admin manages customers and accounts.
UML Class Diagram (Textual Representation)
+-------------------+
| Bank |
+-------------------+
| - bankName |
| - branchCode |
+-------------------+
| + addCustomer() |
| + openAccount() |
+-------------------+
|
|
| 1
|
| *
+-------------------+
| Customer |
+-------------------+
| - customerId |
| - name |
| - address |
| - phone |
| - email |
+-------------------+
| + login() |
| + logout() |
| + viewAccount() |
+-------------------+
|
| 1
|
| *
+-------------------+
| Account |
+-------------------+
| - accountNumber |
| - accountType |
| - balance |
+-------------------+
| + deposit() |
| + withdraw() |
| + getBalance() |
+-------------------+
|
| 1
|
| *
+-------------------+
| Transaction |
+-------------------+
| - transactionId |
| - date |
| - amount |
| - type |
+-------------------+
| + execute() |
+-------------------+
+-------------------+
| Admin |
+-------------------+
| - adminId |
| - name |
+-------------------+
| + manageAccount() |
| + manageCustomer()|
+-------------------+
Relationship Summary
- Bank – Customer : One-to-Many
- Customer – Account : One-to-Many
- Account – Transaction : One-to-Many
- Admin manages Customer and Account

Leave a Reply