Notes on Object-Oriented Programming

Summer 2014

Fall 2013

WMF Windows Meta Files (.wmf)


System Configuration talks about the setup of your system for program development from the command window (or console).

Console discusses command-line compilation in Microsoft Visual C, Java, and Python.

simple are some examples of C, C++, Java, and Python programs.

makefile example

Source highlighting


Java Topics

Java text input

Test1 is a small Java application equivalent to MFC small1. It shows the size of the client window (JPanel) inside a main window (JFrame). It also illustrates how the displayed size of a text string may be determined.

Test2 is a small Java application that demonstrates the display of “Ball” objects (class Ball).

Test3 is a Java application that illustrates the use of a Timer to do animation.

Test4 is a Java application that demonstrates the use of Java Line2 and Arrow classes.

ArrayList examples

Parsing strings with split (download examples from

Java Matrix class

Executable Jar Files

EventQueue, the right way to start a Swing program.


TextArea, interface to Jama

MouseTracker, MouseDetails, and Painter, are Java programs that use the mouse.

MouseTest, textbook program illustrating use of the mouse.

grow objects, a rubber-band lines and boxes

Menu tutorials:   1   2



Java network programming

Networking progamming with

Java Image Processing

Tutorial examples
Image processing 1
Image processing 2 (grayscale conversion)
Image processing 3 (convolution)
Image processing 4 (edge magnitude)


Colliding Balls

colliding balls demo

Robot Motion

robot motion test

robot test 1 (intersect walls)



C++ Topics

hello is a sequence of programs introducing topics in defining C++ classes.

vec2 is a class that captures the mathemetical properties of a 2D geometrical point or vector.

MFC Topics

small1 is a simple MFC example, no Document/View architecture, no special features, just a frame window (MainFrm.cpp) enclosing a client window (ChildView.cpp). Its behavior is to find the size of the client window and format a text string that is displayed centered in the client window.

small2 is a small MFC application modified to test the display generated by point2, a class that captures the display or graphics properties of a 2D geometrical point.

small3 modifies the small MFC application framework to support animation and move the origin to the center of the screen.

Qt Topics

Qt1, simple Qt example
Qt2, Qt application with custom window

Python Topics

Here is a link to live python CGI examples on my hosted account.

18 February 2008

The console-application code in line2 is a C++ expression of a 2D line segment, consisting of a test program and the line2 class.

The code in testbed1 is a MFC application for developing procedures for drawing electronic symbols. Symbols for resistors, inductors, capacitors, current sources, and impedance are illustrated.

The C++ console-application in netlist3 develops a class circuit that captures the structure of an electonic circuit as a netlist, or connected set of circuit elements (devices) such as resistors, capacitors, inductors, voltage and current sources, and so forth. This version includes only resistors and current sources. Circuit elements are sub-classes of the abstract class device.

20 February 2008

HTML Forms with Python CGI scripts.

The C++ console application netlist2 tests some parsing functions for a netlist.

The Matrix class is a matrix data structure and routines for matrix manuipulation. The class Vec is a simple column (or row) vector. There is also a linear-equation solver using LU-decomposition. (See ludcmp.cpp)

complex is a class for complex numbers.

25 February 2008

Overview of the C++ Standard Template Library (STL)

tag is my version of double-linked lists, written before STL.

tlist shows an example of the STL list container. It does basically the same things as the tag test example.

27 February 2008

playground fields: proposed Web database table fields for playground interactive distributed program project.

3 March 2008

colorchooser Python CGI form script

Solving differential equations

playground scripts

10 March 2008

sending email from python script

intersection of rectangles

24 March 2008 is a Python CGI script allowing users to submit files to a central server.

netlist2 (Java version)

netlist3 (Java version)

gates1 (Java version)

Matrix (Java version)

26 March 2008

Drag Demo

JTextArea demo.

TextDemo, sending an output stream to a JTextArea

gates1 (as an applet/windows application)

31 March 2008


2 April 2008

netlist4, Java version of program that implements nodal analysis of basic electrical circuits (resistor, capacitors, inductors, and independent current and voltage sources).

7 April 2008

collide1 demo, Java programs
collide2 demo, Java program
Visual Python examples for the ball bounce problem. is a CGI script that manages an interactive game prototype is a client program that displays player positions as obtained periodically from the web server.

9 April 2008

OOP Principles

21 April 2008

Unchecked Method Invocation warning message
final-game demo

14 February 2007

cifread is an object-oriented modification of a program that reads CIF files. The Caltech Intermediate Format (CIF) is used to describe VLSI layouts. See cif for more information.

gates1 is a work in progress that extends the circuit classes developed earlier to handle logic circuits. The simulator needs work!

19 February 2007

I found several interesting examples from a book by Reese. (See WebCT excerpt)

Shown here are an application of the STL complex class (numeric complex), a function evaluator (numeric function), and a string tokenizer (string tokenizer).

Simple RISC system (srisc) development, level 1. (srisc1 v1). The goal of level 1 is to simulate a Nios II processor to the extent of handling arithmetic (add and subtract) and logic operations. No branching or data memory access. Version 1 is presented here - all we do is read a binary file of machine-language instructions.


Greg Reese, C++ Standard Library Practical Tips, Charles River Media, 2006. ISBN 1-58450-400-5.

21 February 2007

netlist4 implements nodal analysis of basic electrical circuits (resistor, capacitors, inductors, and independent current and voltage sources).

bank1 is a work in progress on event-driven simulation. It explores some of the operations of a priority queue, see the event queue example.

small4 animates ellipical motion and provides a C++ version of the arrow class.

4 April 2007

Horstmann chapter 2

Horstmann Violet UML Editor

Horstmann chapter 4

Horstmann chapter 5

Horstmann chapter 6

Examples 123,  and 4 of the Graph Layout demonstration applet packages with the Java SDK.

26 April 2007

Horstmann Graph Editor (chapter 8)

Maintained by John Loomis, last updated 5 July 2015