Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz...

13
Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN . The quiz starts TWO minutes after the tardy bell rings. You will have 30 seconds per question.

Transcript of Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz...

Page 1: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Computer ScienceReading Quiz 6.2

(Sections 6.5-6.8)

Take out a piece of paper and PEN.

The quiz starts TWO minutes after the tardy bell rings.

You will have 30 seconds per question.

Page 2: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Title the quiz as shown belowThe quiz starts in ONE minute.

Name

Period

Date

Reading Quiz 6.2

1.

2.

3.

4.

5.

6.

7.

8.

9

10.

EC.

Page 3: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 01

Which class controls the output appearance

of numbers?

(a) Math

(b) Random

(c) DecimalFormat

(d) Scanner

Page 4: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 02

Which of the following is a method of the

DecimalFormat class?

(a) nextInt.

(b) setSeed.

(c) new.

(d) format.

Page 5: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 03

What are the three color values used by Java to

display any color Graphics object?

(a) red, yellow and green

(b) red, green and blue

(c) red, white and blue

(d) red, green and yellow

Page 6: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 04

Java graphics objects can generate more than

______ color combinations.

(a) 1,000

(b) 10,000

(c) 100,000

(d) 1,000,000

Page 7: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 05

Which Graphics method changes color?

(a) setColor

(b) newColor

(c) makeColor

(d) setRGB

Page 8: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 06

Objects without identifiers are called _____ objects.

(a) unnamed

(b) class

(c) constructor

(d) anonymous

Page 9: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 07

Which class makes it possible to draw a six-sided

polygon?

(a) Hexagon

(b) Octagon

(c) Polygon

(d) drawPolygon

Page 10: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 08

Which of the following is/are a method(s) of

the Scanner class?

(a) nextLine

(b) nextInt

(c) nextDouble

(d) All of the above

Page 11: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 09

Which of the following indicates keyboard input?

(a) keyboard.in

(b) System.keyboard

(c) System.in

(d) Keyboard.input

Page 12: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Question 10

The Scanner class is part of the _____ package.

(a) util

(b) lang

(c) applet

(d) textformat

Page 13: Computer Science Reading Quiz 6.2 (Sections 6.5-6.8) Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will.

Extra Credit

Using the Scanner class with numbers and strings

can have unexpected results. These unexpected

results may be cured by

(a) using the new operator.

(b) using a dummy String variable.

(c) only integer values with strings.

(d) only real number values with strings.