Requirements for the State

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page

Answer:

The following seem reasonable to me. You might have thought of others.

  • Account number
  • Name of account holder
  • Current balance

Requirements for the State

A real checking account would contain a great deal more information, but for this example, the above is enough.

Next, think about what methods are needed. That is, what behavior does a checking account have?

QUESTION 3:

Think of three behaviors a checking account should have.