Learn to Program using Alice

Practice Test for the Lesson Titled

Class-Level Methods and Inheritance

Published:  May 24, 2007
By Richard G. Baldwin

File: Alice0150PracticeTest.htm


Questions

1.  True or False:  If you write new class-level methods, you can create new classes that include those methods for use in future programs.

Answer and Explanation

2.  True or False:  Every true OOP language must support the following four programming concepts:

Answer and Explanation

3.  True or False:  Alice is an object-oriented programming language.

Answer and Explanation

4.  True or False:  Alice provides strong support for polymorphism.

Answer and Explanation

5.  True or False:  In OOP, a class is a blueprint from which objects can be created.

Answer and Explanation

6.  True or False:  The Alice gallery contains about a dozen classes from which you can create objects and add them to your worlds.

Answer and Explanation

7.  True or False:  In more conventional OOP languages, you can start from scratch and create your own classes.  However, that is not possible in Alice.

Answer and Explanation

8.  True or False:  When a new class extends an existing class, an object of the new class will contain all of the variables (properties in Alice) and all of the methods (class-level methods in Alice) that are defined in the existing class, plus all of the variables and all of the methods that are inherited into the existing class from all of its ancestors in the inheritance family tree.

Answer and Explanation

9.  True or False:  Typically, a new class that extends an existing class will be a more specialized version of the existing class.

Answer and Explanation

10.  True or False:  Alice provides no support for inheritance.

Answer and Explanation

11.  True or False:  When you create new classes in Alice, you can add them to the gallery.

Answer and Explanation

12.  True or False:  The Alice program was written in Java.

Answer and Explanation

13.  True or False:  To write a class-level method, do the following:

Answer and Explanation

14.  True or False:  To declare and initialize class-level variables, do the following:

Answer and Explanation

15.  True or False:  In a conventional object-oriented programming language, if two or more methods have the same names but the argument lists are different this is commonly referred to as method overriding.

Answer and Explanation

16True or False:  In a conventional object-oriented programming language, if two or more methods have the same names and the same argument lists, this is commonly referred to as method overriding.

Answer and Explanation



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.

Answers and Explanations


Answer 16

True

Explanation 16

Back to Question 16


Answer 15

False

Explanation 15

Back to Question 15


Answer 14

True

Explanation 14

Back to Question 14


Answer 13

True

Explanation 13

Back to Question 13


Answer 12

True

Explanation 12

Back to Question 12


Answer 11

True

Explanation 11

Back to Question 11


Answer 10

False

Explanation 10

Back to Question 10


Answer 9

True

Explanation 9

Back to Question 9


Answer 8

True

Explanation 8

Back to Question 8


Answer 7

True

Explanation 7

Back to Question 7


Answer 6

False

Explanation 6

Back to Question 6


Answer 5

True

Explanation 5

Back to Question 5


Answer 4

False

Explanation 4

Back to Question 4


Answer 3

False

Explanation 3

Back to Question 3


Answer 2

False

Explanation 2

Back to Question 2


Answer 1

True

Explanation 1

Back to Question 1


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-