Simple Bank Transfer Example
written in Java-UC

This is a proram written in a first version of Java-Use Case (Java-UC). It is based on the DCI programming paradigm and implemented in injectionless Java.

The program was developed in Win7 with jdk1.8.0_45.

The complete code is in this file: ZIP
Unzip in an empty directory,
open Command Prompt (Windows), chdir to the chosen directory

run
    javac *.java
    java Test

The Test program creates two Account objects and initialize them with funds. Then it makes a successful transfer followd by an attempt at an illegal one.

There are four files: Test, Bank, and Account are simple POJO classes with no surprises. The Context class implements the complete DCI context with its roles and role methods. The Context code is organized as follows:

This code is copyright 
©2015 Trygve Reenskaug, Oslo, Norway.
All rights reserved.
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made for profit or commercial advantage and that copies bear this notice and full citation on the first page.