Small Simple Safe -- User Guide
|
Teacher
Since V1.45, SSS has self-teaching capability.
This capability eliminates the need for a User Guide.
1. Click on Menu.chooser(), then on teacher(String),
and enter "SSS". This will start a Teacher session.
Continue by pressing Enter as needed.
You may adjust the speed using the slider.
2. Click on Menu.chooser(), then on teacher(String),
and enter a lesson name:
* String
* Number
* HashSet
* Serial
* GUI
|
Parameter dialog
In order to enter parameters in a method
invocation, an orange dialog appears.
A rather complicated instance from
JOptionPane class is shown below.
If a number is expected, an editable text
field is shown, with an initial value of zero.
If an object name is expected, a combo box
helps the user to choose the object.
For char, String, and array types, the usual
delimeters are supplied.
The sample below shows a user error in an
integer field.
|
|
Active keys in SSS
- Escape: show Menu
- LEFT/Back: backward in history
- RIGHT: forward in history
- Period: toggle between classes and objects
- Delete: remove current class or object
(nothing is actually deleted)
- Comma/F2: rename current object
- F5: refresh view
- A-Z: scroll to method beginning with this char
Active keys in Dialog
- Escape: cancel parameter entry
and method invocation (same as close)
- ENTER: accept entry (same as OK)
- TAB: next parameter
- shift-TAB: previous parameter
|
|
The rest of this page was written before
the self-teaching capability.
Please download and open SSS
before reading.
SSS should be active while reading this page.
SSS User Guide
When you open SSS, only two classes, Menu and Small,
are loaded by default, and no objects are shown yet.
The right pane shows that
class Small has a field named MSG,
a method named main(), and a default constructor.
It implements ListSelectionListener and extends Object.
Now click on MSG field and press Enter.
Our first object appears.
Its type is String, its name is MSG, and its value is shown.
The border color was changed to emphasize that we are looking
at an object, not a class any more.
All public methods of this object are shown at the right pane.
Click on charAt(int) and enter 0 in the dialog,
you get S as the first char of MSG.
MSG.charAt(0); //--> S
Click on indexOf(int) and enter 97,
you get 2 as the first occurrence of 'a' in MSG.
MSG.indexOf(97); //--> 2
In order to see class String click on the thick separator
at the top of the right pane.
Note that the border color was changed again.
Make two instances by clicking on
new String(String) down toward the end of
constructor list.
When the dialog appears, press Left arrow key,
type "Bob" within quotes,
press shift TAB key, type "b" without quotes,
and press Enter.
This makes an object of type String
with name and value as we have entered in the dialog.
b = new String("Bob"); //--> "Bob"
Then press Period "." key and make another String
with name t and value "Tim":
t = new String("Tim"); //--> "Tim"
Now we want to make a Set object.
Click on Menu class (or press ESC key) and load TreeSet by clicking on
systemClass(String), then entering "java.util.TreeSet".
First make an empty instance of TreeSet:
s = new TreeSet(); //--> []
Then add the String objects into the set.
Note that an existing member cannot be added again:
s.add(t); //--> true
s.add(b); //--> true
s.add(t); //--> false
s.add("Ann"); //--> true
s.add("Bob"); //--> false
There are 3 members in the set, alphabetically ordered.
Click on the small command area at the lower left corner
and enter "size", or click on the size() method.
s.size(); //--> 3
Finally, copy the set into an Object array, by clicking on
toArray() and entering "a" in the dialog, or by entering
toArray in the command area.
a = s.toArray(); //--> Object[3]
Program by
Akif Eyler from Istanbul, Turkey. Web design by Celalettin Penbe.
Last update: Oct 2004