|
|
..
|
JJ examples
Some short examples.
- Hello, world
- Average any number of quiz scores
- Character string concatenation, comparison, and getting the length of a character string
- Shows how to get a quote (") and a blackslash (\) inside a character string
Below examples put commands inside a routine inside a class.
- Find 7-of-a-kind dollar bill serial numbers THE LONG WAY! WARNING: Takes up to 25 minutes to run.
- Play a game with three dice. See if you can get the middle dice to be the average of the first and last dice.
This examples fixes Random, providing a class with a routine and a function so there
are no side-effects of getting the last random value.
- A Random class to provide a random function that is free of side effects.
Below examples use JJGui (buttons) instead of Input, Output and Outputln.
- Intro to JJ GUI using a simple "Button-Reply Pattern"
- A simple question, using grid panels
- A simple question, using mostly border panels
- TicTacToe (without using arrays)
- TicTacToe (using an array)
|