Alice Community  

Go Back   Alice Community > Educators > Teaching with Alice

Reply
 
Thread Tools Display Modes
a working calculator
Old
bstanard
Guest
 
Status:
Posts: n/a
Default a working calculator - 09-13-2006, 09:32 AM

Greetings,
I've been having a wonderful time with Alice following the proceedures in the Dann, cooper, Pausch textbook, but I'd like to add a project of my own (from years of teaching Visual Basic and Java) in which my students create a working calculator. Has anyone done this? I looked at the calculator (Objects > Calculator), but its screen doesn't seem amenable to displaying anything. Is there a way to "implant" something on top of the screen that will take/display input?
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 09-13-2006, 06:36 PM

The hint I posted a couple of days ago, [URL="http://www.alice.org/community/showthread.php?t=199"] should get you started. There were other window entry type functions under World but I only played with them briefly. Did note that I could get variables that were either "string" - which I assume is what the calculator would actually compute with - and "text", which was what was displayed as the 3D text object.

Also I can't get rid of the extra windows when the program is loading, though I haven't tried hard since it really doesn't matter for what I was doing.

If some of this does work, please post the result.

Jim
   
Reply With Quote
this helps, but...
Old
bstanard
Guest
 
Status:
Posts: n/a
Default this helps, but... - 09-14-2006, 09:00 AM

Thanks for the information, but I ran up against something strange when examining StringInput. Where did your class object Input come from? Feel silly asking this, but is it an object you created? or is it a built into Alice?

Which brings up another query: Where do you go to find out about many of the (hidden?) features of the Alice language? Is there an online language reference out there?
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 09-14-2006, 09:07 AM

You can go to www.aliceprogramming.net for additional material on Alice. Teachers can request the password to access a wealth of instructional materials, including test/exam material. Additionally there is the Learning To Program with Alice textbook by Dann, Cooper and Pausch - information is provided on the site noted above.

Charles Herbert has An Introduction to Programming Using Alice out now as well as a new book scheduled to be released 9/28 - An Introduction to Computer Science with Alice.

Good luck
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 09-14-2006, 02:03 PM

I created "Input" by importing a 3D text object and then modifying and saving it. Probably not a good choice of names since that's usually a reserved word - but didn't think of it at the time. Anyway, it was my creation, not something in Alice.

I found many of the basics for doing this in Ch. 10 of Dann, et al., and the details just by looking at the list of functions that came up for World. Don't think this stuff is really hidden - just not emphasized or presented early because the author's felt (and I tend to agree) that it would confuse novices.

There is also a reference card available from the same people that published the Herbert text but I haven't looked at it.

Jim
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.