Draw class diagram for Online Banking System. Make necessary assumptions.

Below is a UML Class Diagram for an Online Banking System, with necessary assumptions clearly stated.

Assumptions:

  1. A customer can have multiple bank accounts.
  2. Each account belongs to one customer.
  3. Customers access the system using login credentials.
  4. Transactions can be Deposit, Withdrawal, or Transfer.
  5. 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

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *