Alice Community  

Go Back   Alice Community > Educators > Teaching with Alice

Reply
 
Thread Tools Display Modes
Is there anyway to hadle the exceptions??
Old
keka
Junior Member
 
Status: Offline
Posts: 3
Join Date: Apr 2008
Default Is there anyway to hadle the exceptions?? - 04-09-2008, 03:32 PM

One of my students, in their project, asking the user to enter an integer. But when the user enters a String, the program terminates saying that there is a bug. Is there any way to catch this exception or typecasting the arguments??

Thanks
________
HONDA INTEGRA SPECIFICATIONS
________
The hertz corporation

Last edited by keka; 05-02-2011 at 10:06 PM.
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 04-09-2008, 07:33 PM

Yes there is an answer - check out Dick Baldwin's example of how to do this:
http://www.dickbaldwin.com/alice/Ali...plication_game

It's an excellent tutorial and can be expanded to Addition, Subtraction, etc. I used it this year and my students had GREAT results and really had fun programming the various routines!

Good luck,
   
Reply With Quote
The End Of The School Year Is Approaching
Old
lanceA
Guest
 
Status:
Posts: n/a
Default The End Of The School Year Is Approaching - 04-11-2008, 07:57 PM

My 9th graders are just beginning to submit their Alice Projects. This is the first one I received this year. I thought that I would share it with you. (You will need a fast machine with a lot of RAM.)

All music recordings remain within the 30 sec. acceptable limit.

Enjoy - I am impressed.
Attached Files
File Type: a2w ajax.a2w (14.23 MB, 335 views)
   
Reply With Quote
Very good
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default Very good - 04-11-2008, 09:17 PM

Very good!

A YouTube video would be nice to make it easier for others to view.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 04-11-2008, 09:27 PM

I encourage my students not to watch beatings, stupid kids, etc on the Internet.

But, thanks Dick
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 04-12-2008, 09:06 AM

Quote:
Originally Posted by lanceA View Post
I encourage my students not to watch beatings, stupid kids, etc on the Internet.

But, thanks Dick
There is good material as well as bad material on YouTube. See, for example, the video at the following URL:

http://www.youtube.com/watch?v=ji5_MqicxSo

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 04-12-2008, 06:41 PM

I don't disagree with you about good and not-so-good material on YouTube, Dick. However after teaching a short course on Ethics and Tecnology to high schoolers, I still prefer they not join Social Networking sites such as YouTube, FaceBook, etc.

However I have pre-ordered The Last Lecture from Amazon.com.

Thanks for your input.
   
Reply With Quote
Ajax ran OK on slow machine
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Ajax ran OK on slow machine - 04-13-2008, 06:04 PM

Quote:
Originally Posted by lanceA View Post
You will need a fast machine with a lot of RAM.
After being unable to get War Zone to run, I was pleasantly surprised that Ajax ran OK even on my slowest machine and with a couple of other programs running in the background. The only problem was a bit of a delay before a sound would play (occasionally causing distortion) - but that's always a problem with Alice on the slow machine and with multiple programs running.

I suspect that the reason it worked so well is the very ordered structure of the program with many "do in order" methods instead of multiple threads running at the same time. Do you have any thoughts/experience on this one way or the other?
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 04-13-2008, 08:54 PM

It's been my experience that the sound distortion in Alice is caused by the program having to access the harddisk constantly to read the sound file and quiet possibly the memory buffer is somehow being set to only read in small segments at a time - I could be TOTALLY offbase here!!

I'm glad you were successful in running the program. Before a student begins programming a major assignment they are required to submit a detailed specification basically outlining the algorithms to be used in the program, i.e., don't just start 'banging on the keyboard'! - give your program some thought. Then after discussion/refinement the student is given the go-ahead to develop their animation. You would be surprised how many programs I receive that suffer from 'code-bloat' - unused code remains in the program which consumes memory upon loading and thereby slowing the program down. I need to constantly remind them to remove 'unused code'.

Anyway, I'm glad you were able to run AJAX - get ready for more Projects in the next few weeks, although I can not guarantee they will all run smoothly. After all, we are dealing with 'the next generation of Computer Scientists'.

(At the 9th Grade level)

But at least we have attracted their attention!

Last edited by lanceA; 04-13-2008 at 09:53 PM. Reason: Post Script
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 04-13-2008, 10:12 PM

Quote:
Originally Posted by lanceA View Post

... But at least we have attracted their attention!
Best academic news I've had in quite a while.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.