Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Teaching with Alice (http://www.alice.org/community/forumdisplay.php?f=25)
-   -   Is there anyway to hadle the exceptions?? (http://www.alice.org/community/showthread.php?t=1309)

keka 04-09-2008 03:32 PM

Is there anyway to hadle the exceptions??
 
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
________
[URL="http://www.honda-wiki.org/wiki/Honda_Integra"]HONDA INTEGRA SPECIFICATIONS[/URL]
________
[URL="http://www.ford-wiki.com/wiki/The_Hertz_Corporation"]The hertz corporation[/URL]

lanceA 04-09-2008 07:33 PM

Yes there is an answer - check out Dick Baldwin's example of how to do this:
[URL]http://www.dickbaldwin.com/alice/Alice0930.htm#Multiplication_game[/URL]

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,

lanceA 04-11-2008 07:57 PM

The End Of The School Year Is Approaching
 
1 Attachment(s)
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.

DickBaldwin 04-11-2008 09:17 PM

Very good
 
Very good!

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

Dick Baldwin
Free Alice tutorials: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

lanceA 04-11-2008 09:27 PM

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

But, thanks Dick

DickBaldwin 04-12-2008 09:06 AM

[quote=lanceA;5134]I encourage my students not to watch beatings, stupid kids, etc on the Internet.

But, thanks Dick[/quote]

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

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

Dick Baldwin
Free Alice tutorials: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

lanceA 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 [URL="http://www.amazon.com/Last-Lecture-Randy-Pausch/dp/1401323251/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1208043268&sr=8-1"][B][COLOR=#003399]The Last Lecture[/COLOR][/B][/URL] from Amazon.com. :)

Thanks for your input.

DrJim 04-13-2008 06:04 PM

Ajax ran OK on slow machine
 
[QUOTE=lanceA;5131] You will need a fast machine with a lot of RAM. [/QUOTE]

After being unable to get War Zone to run, I was pleasantly surprised that Ajax ran OK even on my slowest machine [I]and[/I] 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?

lanceA 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 [U][B]TOTALLY[/B][/U] 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'. :rolleyes:

(At the 9th Grade level)

But at least we have attracted their attention!

DickBaldwin 04-13-2008 10:12 PM

[quote=lanceA;5145]

... But at least we have attracted their attention![/quote]

Best academic news I've had in quite a while.

Dick Baldwin
Free Alice tutorials: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]


All times are GMT -5. The time now is 12:20 AM.

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