Published: May 23, 2007
Last updated: July 3, 2007
By Richard G. Baldwin
File: Alice0145PracticeTest.htm
1. True or False: You can define new methods at either of two levels in Alice:
2. True or False: All world-level methods require incoming parameters.
3. True or False: Method parameters are used to instruct a method that knows generally how to behave how it should specifically behave as a result of a specific call to the method.
4. True or False: To declare a parameter for a method in Alice, you must
This will cause the Create New Parameter dialog to appear on the screen, which you must then populate.
5. True or False: When declaring a method parameter in Alice, as a minimum, you must specify:
6. True or False: All of the twenty primitive methods that are available in the methods tab for all objects can be called on incoming method parameters of type Object.
7. True or False: All of the custom methods that are available in the methods tab for a particular object can be called on the incoming method parameter when an object of that type is passed to the method.
8. True or False: When you pass an object as a parameter to a method, the methods that can be called on the incoming object parameter are limited to sixteen of the twenty primitive methods that are available for all objects (other than the world object), plus five special methods that can be used to set the values of the following five properties that are common to all objects other than the light, camera, and world objects:
9. True or False: To use the value of a method parameter in code that you write in the method, simply drag the name of the parameter down and drop it into the appropriate location in the statement that you are writing.
10. When programmers break up a large problem into smaller units, they are applying the principle of _________.
11. The representation using English-like statements of a solution to a programming problem, is called ________.
12. A step by step procedure for solving a problem is called ________.
13. The term syntax refers to grammar rules that you must follow when:
14. A file that contains high level language code is called:
15. Given the Alice code shown in Figure 145-115, what output is produced by the print statement?
Figure 145-115.
public void main ( ) { String myFirstName = David-; String myLastName = Smith; String y = default string; y .set( value , ( myFirstName + myLastName ) ); print( y ); } |
Copyright 2007, Richard G. Baldwin.
Faculty and staff of public and private non-profit educational institutions are
granted a license to reproduce and to use this material for purposes consistent
with the teaching process. This license does not extend to commercial
ventures. Otherwise, reproduction in whole or in part in any form or medium
without express written permission from Richard Baldwin is prohibited.
The following image is the splash screen from Alice 2.0, and is the property of the developers of Alice at Carnegie Mellon.
Copyright 2007, Richard G. Baldwin. Faculty and staff of public and private non-profit educational institutions are granted a license to reproduce and to use this material for purposes consistent with the teaching process. This license does not extend to commercial ventures. Otherwise, reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.
The following image is the splash screen from Alice 2.0, and is the property of the developers of Alice at Carnegie Mellon.
-end-