- Abacus.java (Chinese Abacus);
- JapaneseAbacus.java (Japanese Abacus);
- Abacus-obsolete.java (now obsolete but historically significant because of the honourable mention in Sun's Alpha Java Programming Contest);
- Abacus class documentation
Applet Class-file and Images
If you wish to run the abacus on your system, download the following files:
Copy the 3 image files: frame.gif, bead.gif and nobead.gif, to a sub-directory (folder) called images/.
Next create a HTML document with the following code in it:
<html> <body> <applet code="Abacus.class" width=213 height=205> <param name=value value="0087654321"> <param name="beadImg" value="images/bead.gif"> </applet> </body> </html>
The number specified by value="0087654321" is the initial value of the beads of the abacus.
The code is not meant to be viewed as a model of proper object oriented coding techiniques; the applet was written as a quick hack, over a weekend, to show-off the possibilties some amazing technology.
I was originally inspired to write the Java abacus by the Java applet that graphically compared sorting algorithms. This was one of several demonstration applets, accompanying the original Hotjava browser, that demonstrated Java to be a powerful, interactive educational tool.
I downloaded the JDK and proceeded to learn Java by reading code to the Tic-Tac-Toe applet. I read the code over a weekend and had my xabacus (an abacus simulation previously written for the X Window system) code ported over to Java by the following Tuesday. The rest of the time was spent getting around the bugs in the AWT.
The Java Abacus applet was the 13th or 14th applet to be added to Sun's Cool Java Applets page maintained by Sami Shaio.
I then submitted the applet to the Alpha Java Contest judged by Marc Anderseen (marca), Arthur Van Hoff (avh) and James Gosling (jag); it was fun winning an honourable mention in the contest. The abacus applet subsequently appeared in several books about Java.
Miss Tomoe Fujimoto, who owns a company that manufactures abacuses in Japan, read about the Java abacus and graciously sent me a personalized Japanese abacus-- a very cool gift.
To this day, I still get inquiries about the applet from both school children and adults all over the world wanting to learn to use the abacus.
xabacus, running under the X Window System, was my very first abacus attempt. It was more complete than my applet because it included the built-in interactive tutorial. However, Dave Bagley's abacus is implemented in both Java, native Windows and X and includes the tutorial so xabacus is now obsolete.