Published: May 4, 2007
Last updated: June 6, 2007
By Richard G. Baldwin
File: Alice0125PracticeTest.htm
1. True or False: The ability to interactively call methods provides at least the following two benefits:
2. True or False: One of the weaknesses of Alice is that you must complete the program before you can click the Play button to see what you have accomplished.
3. True or False: To create program listings of the source code for an Alice program, you pull down the File menu in the Alice development environment and select the menu item titled Export Web Page.
4. True or False: When you create a program listing of the source code for an Alice program, the listing is written into an HTML file..
5. True or False: A complete understanding of HTML file format is absolutely necessary in order to learn Alice programming.
6. True or False: You must click the large Done button on the right side of the screen to switch from the Scene Edit screen to the Code Edit screen.
7. True or False: One of the major disadvantages of Alice relative to other programming environments is that you must type all of your program code in Alice, whereas other programming environments use much easier drag-and-drop operations to write program code.
8. True or False: To write programs in Alice, you drag tiles from other parts of the screen and drop them into the edit pane.
9. True or False: When you begin a new program, and before you drag any tiles into the edit pane, the words Do Nothing will appear in the edit pane. The first tile that you drop into the edit pane will replace those words with a line of program code.
10. True or False: If you drop a tile and it ends up in the wrong position, you can drag it up and down the screen within the edit pane to correct the position. Just grab the tile at the dotted handle on the left end, drag it to the correct position and drop it there.
11. True or False: When you drag a tile to create a new line of code and hover at the edit screen, a red horizontal line will appear. You can move the line up and down the screen within the contents of the edit pane by dragging the tile up and down accordingly. Whenever the red line is in the correct position, and the border on the tile that you are dragging is red, you can drop the tile. (Don't drop a tile when its border is green.) When you drop the tile, it will produce a line of program code at the position of the red line.
12. True or False: Sometimes you need to drag a tile to replace something in an existing line of program code instead of creating a new line of program code. In that case, you will see a red box instead of a red line. When you drop the tile, that will cause code to appear in place of the red box.
13. True or False: If you look carefully at the tiles in the program edit pane, you will see that there is an area on the left end of each tile containing a large number of dots. This is a handle, which is meant to be the place that you grab a tile with the mouse in order to drag it.
14. True or False: If you create a line of program code and decide later that you really don't need it, you can drag it to the top of the screen and drop it into the trash can. You can also right-click on the handle and a popup menu will appear with a delete option. You can also use that option to get rid of lines of program code that you no longer need.
15. True or False: A common approach to debugging programs is to disable some of the code and allow the remaining code to execute in an attempt to isolate the code that is causing a problem.
16. True or False: You can disable code one line at a time, or one block at a time by right-clicking the handle and then selecting enable in the popup menu that appears. To re-enable the code, just right-click the handle on the disabled code and select disable in the popup menu.
17. True or False: If you need to rearrange the order of lines of program code, you can simply drag the individual lines up and down the screen to rearrange them into a different order.
18. True or False: When you create a new Alice world, a skeleton for a world-level method named your first method or your_first_method (depending on the display format) is automatically created.
19. True or False: The syntax for every method consists of a signature and a body.
20. True or False: In Java display format, the body of a method is surrounded by matching parentheses characters as follows, ( body )
21. True or False: The program code shown in Listing 1a will cause the center points of the ground, the parkingMeter, and the iceSkater to all be aligned, but they may not all be oriented in the same direction.
Listing 1a. The actual edit screen format for Listing 1.
22. True or False: To begin writing the code shown in Listing 1a, select the ground object in the object tree and select the properties tab in the details panel below the object tree.
23. True or False: Having selected ground in the object tree and the methods tab in the details panel, to write the first line of code in Listing 1a, drag the method tile named setPointOfView from the details panel and drop it on the words Do Nothing in the edit pane. (The existence of Do Nothing in the edit pane assumes that the comment hasn't been placed in the edit pane yet.) Select the entire world from the menu.
24. True or False: The little silver triangles that you see following certain words in the edit pane (see Listing 1a) are there solely as an Alice trademark to distinguish Alice code from Java, C#, and C++.
25. True or False: The little silver triangles that you see following certain words in the edit pane (see Listing 1a) indicate pull-down menus that allow you to specify other things about the program code.
26. True or False: In Alice, C++, C#, and Java, comments begin with //. (C++, C#, and Java may also allow other formats for comments.) The purpose of a comment is to guide the program through a prescribed route for the execution of program code.
27. True or False: To replicate the comment in Listing 1a, drag the tile showing // from below the edit pane and drop it right above the first line of program code. It should appear there as a comment with the words No comment. Click on those words and replace them with the words Align objects to the world.
28. True or False: When you have a world running in Alice, you can click the Pause button in the World Running window to get back to the Code Edit screen.
29. True or False: One of the reasons for breaking code up into modules, (such as Alice primitive methods and functions), is to make them easily re-usable.
30. True or False: One of the shortcomings of Alice is a lack of modularization. For example, every time we need to compute the square root of a number, we must "reinvent the wheel" and write the detailed code required to compute the square root ourselves.
31. True or False: One reason for breaking a program up into modules is simply to provide better program organization.
32. True or False: The following procedure can be used to change the name of the default method from my_first_method to main
33. True or False: By default, the programming statements in an Alice program will be executed concurrently.
34. True or False: A doInOrder block is used to ensure that all of the programming statements (or code blocks) enclosed in its body are executed in sequential order. In addition, the use of a doInOrder block:
35. True or False: You can use the standard Windows clipboard in typical ways for the cutting, copying, and pasting of text when writing an Alice program.
In addition, there is a picture of a special Alice clipboard in the upper-right corner of the Alice development screen. Just like with Windows, you only have access to one special Alice clipboard, so you must use it judiciously.
You can drag individual programming statements, or entire blocks of statements to the clipboard from one part of a program and then drag them from the clipboard to another part of the program as a means of copying programming statements from one part of a program to another part of the program.
36. True or False: In programming jargon, we say that when one method calls another method, control passes from the calling method to the called method.
37. True or False: Figure 9 shows a partial screen shot resulting from clicking the triangle on the setPointOfView method and then selecting style in the first popup menu that appeared.
Figure 9. Setting the duration.
38. True or False: Figure 9 shows a partial screen shot resulting from clicking the triangle on the setPointOfView method and then selecting duration in the first popup menu that appeared. Selecting duration caused the second popup menu to appear. Selecting an amount of time from that menu specifies how long the program should take in executing the action specified by that program instruction.
39. True or False: Setting the opacity property for an object to 100% during the manual process of setting the stage will make the object invisible when the program starts running.
40. True or False: One of the tiles that appears below the program edit pane is labeled doTogether. If you drag that tile into your program, and then put two or more program instructions inside the matching pair of curly braces associated with that tile, all of the instructions (or code blocks) within those curly braces will be executed concurrently.
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-