DDA java clone of psuedocode

Have a look.