alice-teacher Alice Array Elements calling Methods

Kelly, Terri kellyt at bishopireton.org
Sat May 4 16:27:15 EDT 2019


I have a world which is not behaving like I am expecting it to.

I have an array of automobiles called rowA[]
I have a method created for automobiles called go
In go, the first thing I have this do is say it's Sthing (this say "" +
SThing this)

If I call go with blueTruck, it works fine, the truck says blueTruck and
then moves forward

blueTruck.go()

If I call go with rowA[0].go ... Alice hangs,

So, from the test method I have

blueTruck.go()
rowA[0] = blueTruck
rowA[0].say "" + Sthing rowA[0]
rowA[0].go

Is there any reason why I should not be able to call a class level method
from an array that is of that type class?

Terri Kelly
Computer Science
Bishop Ireton High School
Alexandria, VA

-- 
_The information contained in this communication may be subject to legal 
confidentiality protection or privilege. It is intended solely for use by 
the intended recipient and others authorized to receive it. If you have 
received this communication in error, please notify the sender and delete 
it immediately. You are hereby notified that any disclosure, copying, 
distribution or taking action in reliance of the contents of this 
information is strictly prohibited and may be unlawful.  The school accepts 
no liability whatsoever for any damage, loss, or expense arising from any 
misuse of this e-mail and/or from the accessing of any files attached to 
this e-mail._
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20190504/5d74c93f/attachment.html>


More information about the alice-teachers mailing list