Skip to main content
Okhare Paul — Portfolio©2026
000
Back

Case study · 12 / 12

Mini Bank

A banking system in plain Python

Year
2024
Focus
Python
Status
Complete
Fig. 12 — Mini Bank
About the project

A banking system written in pure Python for my MSc software development module: accounts, deposits, withdrawals, transfers and management reports, run from the command line with no libraries beyond the standard one.

A bank is a good test of a programmer, because money forgives nothing. A balance cannot go missing, a withdrawal cannot exceed what is there, and not every member of staff should see every figure. I built Mini Bank to get those rules right with the fewest tools possible: Python, its standard library and a terminal. The design is object-oriented. A customer account guards its own balance behind private fields, so nothing outside the account can change it except a deposit or a withdrawal that passes the checks. An admin signs in and works through a menu: move money between customers, update or close an account, print one customer or all of them, and save the whole bank to a file. A management report adds it up, with the number of customers, the total held, the interest due over a year and the overdrafts outstanding, and only an admin with full rights may run it. Then I tried to break it, with twenty written test cases covering good input and bad, and it held.

Main features

What it does

  1. 01Signs admins in with a username and password
  2. 02Deposits to and withdraws from any customer account
  3. 03Transfers money between two customers
  4. 04Updates a customer's details, or closes the account
  5. 05Prints one customer's record, or every customer's
  6. 06Saves all accounts to a CSV file and loads them back
  7. 07Produces a management report: customers, total balance, yearly interest and overdrafts
Approach

How it was solved

  1. 01Modelled the bank as three classes: the bank system, the customer account and the admin
  2. 02Kept each balance private to its account, reachable only through deposit and withdraw
  3. 03Rejected bad money at the door: no zero or negative amounts, and no withdrawal above the balance
  4. 04Checked the sender's balance before a transfer moves a penny
  5. 05Caught bad input and missing files, so a typing slip never crashes the program
  6. 06Restricted the management report to admins with full rights
  7. 07Stored the data with Python's own csv module, so the system runs anywhere Python does
  8. 08Wrote a 20-case test table, from a failed login to a refused transfer, and passed every case
Results

20 of 20 test cases passed, on nothing but the Python standard library.

Technologies

Stack

Language
Python 3
Standard library
csvException handlingFile input and output
Design
Object-oriented programmingEncapsulationRole-based accessMenu-driven command line
Testing
Manual test-case tableInput validation tests

That is the work. Now meet the person who built it.

Next project · 01 / 12Swarm Routing