Computer Science Reading Quiz 6.2

Download Report

Transcript Computer Science Reading Quiz 6.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 have 30 seconds per question.
Title the quiz as shown below
The quiz starts in ONE minute.
Name
Period
Date
Reading Quiz 6.2
1.
2.
3.
4.
5.
6.
7.
8.
9
10.
EC.
Question 01
Which class controls the output appearance
of numbers?
(a) Math
(b) Random
(c) DecimalFormat
(d) Scanner
Question 02
Which of the following is a method of the
DecimalFormat class?
(a) nextInt.
(b) setSeed.
(c) new.
(d) format.
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
Question 04
Java graphics objects can generate more than
______ color combinations.
(a) 1,000
(b) 10,000
(c) 100,000
(d) 1,000,000
Question 05
Which Graphics method changes color?
(a) setColor
(b) newColor
(c) makeColor
(d) setRGB
Question 06
Objects without identifiers are called _____ objects.
(a) unnamed
(b) class
(c) constructor
(d) anonymous
Question 07
Which class makes it possible to draw a six-sided
polygon?
(a) Hexagon
(b) Octagon
(c) Polygon
(d) drawPolygon
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
Question 09
Which of the following indicates keyboard input?
(a) keyboard.in
(b) System.keyboard
(c) System.in
(d) Keyboard.input
Question 10
The Scanner class is part of the _____ package.
(a) util
(b) lang
(c) applet
(d) textformat
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.