alice-teacher Top Level Classes in Alice 3

Don Slater don at alice.org
Fri Dec 27 18:26:14 EST 2019


Bill,
Good question, one that we are starting to see more of. Alice was written in Java. This means that the Alice Classes are also descendants of  the Java Object class.

But the top-level class as far as Alice is concerned is the SThing class. You may see the a visual representation of the Alice Class Hierarchy when you try to create a variable or parameter in Alice and select Gallery Class... from the value type menu. (See attached screen shot Select Gallery Class Type).

This will open the Gallery Class dialog box that has three panels. (See attached screenshot Alice Class Hierarchy). The left panel, Filtering will list all the objects currently in the Scene. The middle panel, Selection, will display the entire Java Class Library, highlighting the tree or hierarchy from SThing to selected Class. (You do not have to select an object to see a path, you may directly click on any class in the Selection panel.)

The right panel will display the Available Procedures, Functions, and Properties for that class, showing which of these are available only to that class and those that have been inherited for parent classes in the hierarchy. A quasi-API as it were.

This design allows the user to decide the most appropriate type to select for that variable / parameter, based on the type of the object, the Class of objects, or the functionality needed.

As users you are only able to write methods  for the displayed Gallery classes (Biped, Quadruped, Slitherer, White Rabbit, madHatter, etc) within the Alice System

However, if the project had been exported to NetBeans, the entire Java Class Hierarchy is available, and you would be able to write procedures on any class at any level in the Alice Class Hierarchy.

Please let us know if you have any questions or would like more details.

All the best,
Don Slater

Alice Project




> On Dec 26, 2019, at 11:33 PM, Barnum, William <wbarnum at elmhurst205.org> wrote:
> 
> Hey all,
> 
> I'm working on a video lesson, and I'm trying to figure something out to make sure I communicate it correctly.
> 
> There are seven "top-level" classes in Alice 3 (Biped, Flyer, Prop, Quadraped, Slitherer, Swimmer, and Transport)
> 
> In Java, every class is a subclass of the Java Object class, and every class inherits from the Object class. Is there something similar in Alice, or are the seven classes truly "top-level."
> 
> Thanks in advance,
> Bill
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> To change settings or unsubscribe visit:
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20191227/cda2fa50/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Select Gallery Class Type.png
Type: image/png
Size: 42820 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20191227/cda2fa50/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Alice Class Hierarchy.png
Type: image/png
Size: 95154 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20191227/cda2fa50/attachment-0003.png>


More information about the alice-teachers mailing list