Java · Writing classes
A bank's code must never let a balance go below zero, so every change to the money goes through a method that checks it.