From CaesarJ Homepage

Caesar: Examples

Examples

The examples are tested with CaesarJ compiler 0.8.5.

Simple examples

Here you can find source code of some examples. These examples are explained in detail in the Programming Guide.

Pricing example

Demonstrates variation of pricing strategies and bindings.
[download sources [http://caesarj.org/downloads/examples/0.8.5/pricing.zip]]

Observer example

Implements observer design pattern using CaesarJ.
[download sources [http://caesarj.org/downloads/examples/0.8.5/observer.zip]]

Expressions example

Demonstrates expression problem. Caesar alternative to Visitor design pattern.
[download sources [http://caesarj.org/downloads/examples/0.8.5/expressions.zip]]

How to run examples?

Large Examples

Hierarchy display example

A large example, which demonstrates development and adaptation of a generic visualization component.
[download sources [http://caesarj.org/downloads/examples/0.8.5/hierarchies.zip]]

L2 Interpreter

L2 is a mini object-oriented language. The example demonstrates a modular and extensible implementation of the interpreter for the language in CaesarJ.

You will find several test programs of L2 and its sample extension in /src/l2examples. To test the interpreter you can run the unit tests in /src/test.

[download sources [http://caesarj.org/downloads/examples/0.8.5/l2-cj.zip]]

Dungeon Game

Dungeon is a middle size case study that demonstrates feature-oriented programming with CaesarJ.

Dungeon is a real-time game written in CaesarJ. The goal of the game is to find the princess in a labirinth of underground rooms. Some of the rooms contain monsters or entrapments. The player can collect various items: weapons, armor, potions and money. Weapons and armor can be configured in the inventory window.

To start the game run the "de.tud.st.dungeon.Run" class. The class shows a dialog which allows you to customize the game. Switch on the desired game features and press "START!!!".

Game controls:

To run the example you will have to extend the stack of JVM threads. This can be done by adding "-Xss1M" argument in "Run...->Arguments->VM Arguments".

To run the example you also have to install [https://java3d.dev.java.net/ Java 3D]]

[download sources [http://caesarj.org/downloads/examples/0.8.5/dungeon.zip]]

Remoting Examples

Remote Pricing

Pricing example with StockBroker residing on remote process. The example demonstrates how we can deploy aspects on the threads of remote process.
[download sources [http://caesarj.org/downloads/examples/0.8.5/remotepricing.zip]]

To run the example:

Remote Hierarchies

Hierarchies example with client-server architecture. Data model resides on the server process, while the UI runs on the client side
[download sources [http://caesarj.org/downloads/examples/0.8.5/hierarchies-remote.zip]]

To run the example:
Retrieved from http://caesarj.org/index.php/Caesar/Examples
Page last modified on November 01, 2006, at 02:54 PM