Back in 2005, I took an Applications Development class at Southern Polytechnic State University (SPSU) while working towards my Bachelor’s of Science in Information Technology (BSIT). At the time the class was taught with Java (they’ve since switched to C# unfortunately) and having worked in Java at InterContinental Hotels Group (IHG) for a few years already I convinced the professor to let me skip the classes, show up for the exams, and work on the class project at my leisure. The class project was to develop a computer simulation of osmosis. This is what I put together:

I wrote the application using AWT and Swing and allowed the user to vary the size and number of molecules and the number of pores in the center membrane. Upon hitting Start the molecules would start bouncing around the pane and pass through the membrane thus demonstrating osmosis. For extra credit I internationalized the application with resource bundles for English and Spanish. The teacher really got a kick out of that as I remember and I ended up getting an A in the class. Looking back, the code doesn’t look too bad, though I’m sure there are better practices and design for Swing applications. My forte has always been web applications.
Click here for the Java Web Start shortcut to try out the application. You can download the full source code here.