Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
More newbie questions.
Old
jamieirl
Guest
 
Status:
Posts: n/a
Default More newbie questions. - 03-30-2010, 08:26 PM

So I've been taking an intro to programming class this semester and we've finished the first portion of our Alice in Action with Java book and now a final project is due with Alice. This project is basically for us (the students) to put everything we've learned on display. Our professor gave us a minimum-requirements list for our program, on this very short list there are a couple requirements that I'm not sure about. I know that I've done everything on the list, I think maybe the terminology he uses might not be exactly how it was worded in the book (I'm also not having much luck using google).

If anyone could put these two requirements in the most newbie wording possible so my brain can realize what it is I need to do, that would be greatly appreciated:

5. Include at least 3 user-defined functions - class-level and/or world-level. ----- I know what a function is and I've used object functions in my past assignments, his wording is throwing me off, though. Could someone please provide an example (newbie example) of a "user-defined function"?

9. Use at least 2 selection statements. ----- Is this where a user based selection is required and the answer be it true or false each lead to a different outcome? Another newbie example would be great.

Thanks in advance, you guys are always very helpful.
   
Reply With Quote
Old
dragnet
Member
 
Status: Offline
Posts: 38
Join Date: Jan 2010
Default 03-30-2010, 11:42 PM

A user defined function or method is one you have created from scratch. In other words if you clicked on the 'create new method' or 'create new function' button in the details pane of the world or any individual object. For example if you have a fish in your world, and you write a 'swim' method for that fish, you have written a user defined method.

Not sure what selection means in the context of your instructor. I have heard of if/else statements being referred to as selection statements. I always refer to them as conditional branching, but I believe in my classroom days some instructors may of called them selection statements.

Best to ask if your not sure.
   
Reply With Quote
Old
jamieirl
Guest
 
Status:
Posts: n/a
Default 03-31-2010, 12:56 AM

Quote:
Originally Posted by dragnet View Post
A user defined function or method is one you have created from scratch. In other words if you clicked on the 'create new method' or 'create new function' button in the details pane of the world or any individual object. For example if you have a fish in your world, and you write a 'swim' method for that fish, you have written a user defined method.

Not sure what selection means in the context of your instructor. I have heard of if/else statements being referred to as selection statements. I always refer to them as conditional branching, but I believe in my classroom days some instructors may of called them selection statements.

Best to ask if your not sure.
Thank you, that helps clear things up some.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 04-05-2010, 01:34 PM

I think a selection statement is something that does something based on the trueness/falseness of a condition. So a if/else statement and a while statement would be considered selection statements. A loop could also be considered a selection statement since it actually keeps looping while the counter is less than the amount of times it should loop. I would ask your professor/teacher if looping structures count (you can use my explanation to explain it to him.) And yes, I know trueness is not a word.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 04-05-2010, 02:15 PM

No, i heard selection statements are Variables. I beleive that one


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
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.