rex Examples
flights.rex
flight-directory information structures
pairs.rex
list of all pairs from two lists
mailing list problem:
mail1.rex
|
mail2.rex
|
mail3.rex
|
mail4.rex
|
mail5.rex
|
mail6.rex
acyclic graph test
:
is_acyclic.rex
nim game:
nim.rex
(
Captain Nimo applet (Java)
)
Binary-Numeric conversion:
Number to binary, least-significant bit first (
toBinaryLSBF.rex
)
Binary to number, least-significant bit first (
fromBinaryLSBF.rex
)
Number to binary, most-significant bit first (
toBinaryMSBF.rex
)
Binary to number, most-significant bit first (
fromBinaryMSBF.rex
)
Greatest common divisor(
gcd.rex
)
Objects in rex(
objects.rex
)
Java Examples (link to
Keller's Java Index
)
skeleton.java
Skeleton program
hello.java
Hello-world program (
Sample execution
)
IntList.java
open linked-list (of int)
StringList.java
open linked-list (of String)
Binary-Numeric conversion:
Number to binary, least-significant bit first (
toBinaryLSBF.java
)
Number to binary, most-significant bit first (
toBinaryMSBF.java
)
testDate.java
(testing Date class)
Unicalc.java
(Unicalc base)
pair.java
Very simple Java class
counter.java
Very simple mutable Java class
ClosedStringList.java
Closed list (of String)
Stack.java
Stack class
Queue.java
Queue class
StringListStack.java
Stack of String using a Closed list
utilStack.java
(using the Stack in java.util)
testThrow.java
(use of catch and throw)
StackFromVector.java
(inheritance example)
The Polya polymorphic list library
(polymorphism example)
Vehicle.java
(abstract class inheritance example)
testEnumeration.java
(enumeration example)
test2d.java
(2-dimensional array example)
MyClass.java
(basic 2-dimensional array of objects)
Simple graphics applications
testGraphics1.java
Simple unanimated graphics (
Run applet version
.)
testGraphics2.java
Simple unanimated graphics using an off-screen Image buffer
testGraphics3.java
Simple animated graphics
testGraphics3a.java
Simple animated graphics with less flicker
testGraphics4.java
Simple animated graphics with no flicker after initialization
testGraphics5.java
Simple animated graphics with no flicker
testGraphics6.java
Faster animated graphics using Image redraw
miniMouse.java
minimal Mouse-tracking applet (
Run this applet
.)
Drawing applets
Maze Maker applet
(Assignment)
Scribble.java (Scribble applet from Java in a Nutshell)
(
Run this applet.
) Note what happens when you occlude, the unocclude, the window. This is because this applet is unable to repaint its image.
Scribble2.java
(
Run this applet.
) Note that in this applet you can occlude, the unocclude, the window and the contents will still appear as you left it. This is because this applet keeps its image in an off-screen buffer.
ObjectDraw.java
(
Run this applet.
)
Grammars and Parsing
Syntax-Tree construction applet
S-expression parser (source)
additive expression parser (source)
additive and multiplicative expression parser (source)
Unicalc applet
Logic
Tautology-Checker applet
(illustrates grammars, proposition logic, text fields)
source
Hypercube applet
(illustrates logic functions)
Prolog examples:
family.pl
(Family tree)
kennedy.pl
(Kennedy family tree)
exam.pl
(How to pass an exam)
circuit.pl
(Logic circuit)
member.pl
(Membership test)
map.pl
(Map-coloring problem)
money.pl
(Crypt-arithmetic problem)
zebra.pl
(Logic puzzle)
Sorting
minsort.java
quicksort.java
bucketsort.java
radixsort.java
heapsort.java
measurements
Sorting Demo (
Javasoft version
,
Extended version
)
Finite-State Machines
JFLAP
Finite-State Machine Explorer
Threads
BouncingBalls.java
(
demo
)
AltBouncingBalls.java
(
demo
)
Client-Server
Client.java
Server.java