quiz pbo

Share Embed Donate


Short Description

Download quiz pbo...

Description

Test: Section 2 Quiz 1 - L1-L7 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 1 L1-L7 (Answer all questions in this section) 1. What does a visual storyboard help the reader understand?

(Choose all correct answers) The components of the scene. (*) How the initial scene will be set up. (*) The actions that will take place. (*) The code that is debugged. Correct

2. In Alice, procedural abstraction is the concept of making code easier to understa

True (*) False Correct 3. From your Alice lessons, what does inheritance mean?

Each subclass inherits the methods and propertie

Each class has its own methods and properties th

Each superclass inherits the methods and proper

Each class inherits the methods and properties o Correct

4. Which of the following are ways to open an existing Alice project file after launch

(Choose all correct answers) Select the project from the My Projects tab. (*) Browse for the project using the File System tab.

Click and drag the file from your computer into A

Double-click on the project file name in the folder Correct 5. In Alice, where does an instance's axes intersect?

At the world's center point. At the instance's center point. (*) At the instance's head. At the instance's feet. Correct Page 1 of 3

Next

Summary

Test: Section 2 Quiz 1 - L1-L7 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 1 L1-L7 (Answer all questions in this section) 6. What is the purpose of a function in Alice?

To define how the object should execute

To position the object in the Scene edito To save the project.

To compute and answer a question abou Incorrect. Refer to Section 2 Lesson

7. In Alice the Functions tab will display the pre-defined functions for the s

True (*) False Correct 8. Which of the following is a reason why you might disable programming

To make an object turn and move simult To disable the entire program. To make an object move forward.

To help isolate portions of code during te Correct

9. From your Alice lessons, which of the following are reasons why random

(Choose all correct answers) For security. (*) For creating procedures. For simulation. (*) For opening a project. Correct

10. The first step to using a top-down approach to programming is to create

True False (*) Incorrect. Refer to Section 2 Lesson

Previous

Page 2 of 3

Next

Summary

Test: Section 2 Quiz 1 - L1-L7 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 1 L1-L7 (Answer all questions in this section) 11. From your Alice lessons, which programming instruction represents the

this.Cat move Forward this.Cat getDistan

this.Cat move forward this.Cat getDistan

this.Cat move Forward this.Cat getDistan

this.Cat move Forward this.Cat getDistan Correct 12. From your Alice lessons, which programming instruction represents the

this.Person move Forward this.Person ge

this.Person move Forward this.Person ge

this.Table move Forward this.Person getD

this.Person move Forward this.Person ge Incorrect. Refer to Section 2 Lesson

13. Debugging is the process of finding bugs in a software program. True or

True (*) False Correct

14. In Alice, a computer program requires functions to tell it how to perform

True

False (*) Correct

15. In Alice, the procedures' arguments allow the programmer to adjust the

True (*) False Correct Page 3 of 3

Previous

Summar y

\ Test: Section 2 Quiz 2 - L8-L14 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 2 L8-L14 (Answer all questions in this section) 1. Variable values can be changed as often as you like. True or false?

2. Which of the following is not an Alice variable value type?

3. When presenting your Alice animation, ensure that your presentation i

4. What type of Alice listener object is required to target a mouse-click on

5. What should you refer to for the animation's design specifications as y

Page 1 of 3

Next

Summary

Test: Section 2 Quiz 2 - L8-L14 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 2 L8-L14 (Answer all questions in this section) 6. A typical application uses various values and these values continuously change while the program is running. True or false?

Mark for

Review (1) Points True (*) False Correct 7. The following are examples of what in Java? boolean bite char short int long float double

Mark for Review (1) Points

Expressions Variables Types (*) Specifications Correct 8. You want an event to happen when an object collides with another object, which category of event handler would you choose?

Mark for Review (1) Points

Scene Activation/time Mouse Position/Orientation (*) Keyboard Incorrect. Refer to Section 2 Lesson 11. 9. When you import a class from another file you have to import the entire class. True or false?

Mark for Review (1) Points

True False (*) Correct

10. In Alice, which of the following programming statements moves the butterfly forward, double the distance to the tree?

Mark for Review (1) Points

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2} this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2} this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*) this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

Test: Section 2 Quiz 2 - L8-L14 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 2 - Quiz 2 L8-L14 (Answer all questions in this section)

11. In Alice, which of the following programming statements moves the cat forw

this.Cat move forward {this.Cat getD

this.Cat move {this.Bird getDistance

this.Bird move forward {this.Bird get

this.Cat move forward {this.Bird getD

12. What do lines 7, 10 and 13 do in the following code?

Export files called A, B, and num3.

Create a single file containing A, B, a Print "A", "B" and the value of num3 None of the above.

13. Java programs can be simple programs that run from the command line, or t

True (*) False

14. A conditional loop is a loop that will continue forever. True or false?

True False (*)

15. The Alice IF control structure requires the false statement to be populated. T

True False (*)

Previous

Page 3 of 3

Summary

Test: Section 3 Quiz 2 - L6-L10 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 3 - Quiz 2 L6-L10 (Answer all questions in this section)

1. In Greenfoot, a way to have all subclasses of a superclass inherit a method is by

True (*) False Correct 2. To execute a method in your Greenfoot game, where is it called from?

The actor class The gallery The world The act method (*) Correct 3. A collision in Greenfoot is when two actors make contact?

True (*) False

Correct 4. What type of parameter does the keyDown method expect?

The name of the key to press on the keyboard. (* The name of the sound file to play when the key The name of the class that will use the key. The password that will protect the class. Correct

5. In Greenfoot what command would you use to detect if a mouse has been clicke

Actor.clicked(this) Greenfoot.mouseClicked(this) (*) Greenfoot.clicked(this) Greenfoot.pressed(this) Incorrect. Refer to Section 3 Lesson 7. Page 1 of 3

Next

Summary

Test: Section 3 Quiz 2 - L6-L10 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 3 - Quiz 2 L6-L10 (Answer all questions in this section)

6. You cannot record unique sounds in Greenfoot. You can only use the sou

True False (*) Correct

7. We can use the Actor constructor to automatically create Actor instance

True False (*) Correct 8. Which class holds the method that ends a Greenfoot game?

GreenfootImage Actor Greenfoot (*) Class Incorrect. Refer to Section 3 Lesson

9. Using the Greenfoot IDE, when is a constructor automatically executed?

When the act method is executed. When source code is written.

When a new instance of the class is crea

When a new image is added to the class Correct 10. In Greenfoot, you can cast an Actor class to a World class?

True False (*) Incorrect. Refer to Section 3 Lesson

Previous

Page 2 of 3

Next

Summary

Test: Section 3 Quiz 2 - L6-L10 Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer. Section 3 - Quiz 2 L6-L10 (Answer all questions in this section) 11. In Java what is casting?

When you remove an object instance. When you reset an object instance. Casting is not possible in Java.

When you take an Object of one particul Incorrect. Refer to Section 3 Lesson

12. From your Greenfoot lessons, abstraction techniques can only be used o

True False (*) Correct 13. Use your Greenfoot knowledge: An array object holds a single variable.

True False (*) Correct

14. From your Greenfoot lessons, which of the following are examples of ac

Create 50 instances of the Fly class. Call the move method 1 million times.

Call the move and turn methods 10 time

Create 100 instances of an Actor subclas All of the above. (*) Correct

15. In the Greenfoot IDE, what symbols indicate that the variable is an arra

Square brackets [ ] (*) Semicolon ; Curly brackets { } Colon : Correct

Previous

Page 3 of 3

Summary

Test: Section 6 Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 6 Quiz (Answer all questions in this section)

1. What are exceptions used for in Java?

Correcting mistakes made in your code and hand

Making the program easier to use for the user an

Exceptions have no use, they are just a part of th

Helping the interpreter compile code quicker and

Correct

2. Which of the following correctly matches the symbol with its function?

(Choose all correct answers)

= (single equals sign) compares the value of prim

== (two equal signs) compares the values of non

== (two equal signs) compares values of primitiv

.equals() compares the value of non-primitive ob

== (two equal signs) compares the memory loca

Incorrect. Refer to Section 6 Lesson 2.

3. What does the interpreter look for when an exception is thrown?

A catch statement in the code. (*)

It does not look for anything. It just keeps reading

It does not look for anything. It stops interpreting

The end of the code.

Correct

4. Suppose you are writing a program where the user is prompted to the give coord Your program moves the prince to the coordinates that the user specified. If the

Assume your program does not take into consideration the possibility that the us

(Choose all correct answers)

An exception would occur. This could be handled

An exception would occur. This could be handled

An error would occur. Errors cannot be handled b

An exception would occur but could not be handl

Correct

5. A logic error occurs if an unintentional semicolon is placed at the end of a loop in

True

False (*)

Correct

Ne Sum xt mary

Page 1 of 3

Test: Section 7 Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 7 Quiz (Answer all questions in this section)

1. What does it mean to inherit a class?

Extending a method from a superclass

A way of organizing the hierarchy of cl

The subclass (or child class) gains acc

The access specifier has been set to p

Correct

2. If you inherit a class, you do not inherit the class' constructors. True or fals

True (*)

False

Incorrect. Refer to Section 7 Lesson

3. It is possible to extend a class that already exists in Java, such as the Appl

True (*)

False

Correct

4. If Oak extends Tree, it is possible to declare an object such that Tree grandfatherT = new Oak(); True or false?

True (*)

False

Correct

5. Consider the following method of the class Test: public static List returnList(List list) { return list; }

Which of the following program segments in Test's client class will compile

I. List nums = new ArrayList(); nums = Test.returnList(nums); II. ArrayList nums = new ArrayList(); nums = Test.returnList(nums); III. ArrayList nums1 = new ArrayList(); List nums2 = Test.returnList(nums1);

I only

I and III (*)

II only

II and III

I, II, and III

Correct

Page 1 of 3

Test: Section 7 Quiz

Next

Summary

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 7 Quiz (Answer all questions in this section)

6. Which of the following are true about an abstract class?

(Choose all correct answers)

It is identified by the Java ke

It is possible to create objec

It is possible to create refere

The Java Virtual Machine do

7. Public static variables can't have their value reset by other class

True

False (*)

8. Static methods can return any object type. True or false?

True (*)

False

9. Static methods can write to class variables. True or false?

True (*)

False

10. The constructor method must always have at least one paramet

True

False (*)

Page 2 Ne of 3 xt

Previous

Sum mary

Test: Section 7 Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 7 Quiz (Answer all questions in this section)

11. Which of the following creates a method that compiles with no errors in the class

(*)

12. A class can only have one constructor. True or false?

13. It is possible to return an object from a method. True or false?

14. Which segment of code represents a correct way to call a variable argument met

15. Which of the following can be used as a parameter?

(Choose all correct answers)

Previous

Page 3 of 3

Summary

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF