preap computer science review quiz 08 key take out a piece of paper and pen. the quiz starts one...

18
PreAP Computer Science Review Quiz 08 Key Take out a piece of paper and PEN . The quiz starts one minute after the tardy bell rings. You will have 45 seconds per

Upload: rosaline-dixon

Post on 03-Jan-2016

230 views

Category:

Documents


15 download

TRANSCRIPT

PreAP Computer ScienceReview Quiz 08 Key

Take out a piece of paper and PEN.

The quiz starts one minute after the tardy bell rings.

You will have 45 seconds per question.

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

Name Period Date Review Quiz 08

1. 9.2. 10.3. 11.4. 12.5. 13.6. 14.7. 15.8. EC.

Question 1

Which of these is the heading of a void class method?

(a) public static void hello()

(b) public void hello()

(c) public static int hello()

(d) public double hello()

(e) public Hello()

Question 2

Which of these is the heading of a return class method?

(a) public static void hello()

(b) public void hello()

(c) public static int hello()

(d) public double hello()

(e) public Hello()

Question 3

Which of these is the heading of a void object method?

(a) public static void hello()

(b) public void hello()

(c) public static int hello()

(d) public double hello()

(e) public Hello()

Question 4

Which of these is the heading of a return object method?

(a) public static void hello()

(b) public void hello()

(c) public static int hello()

(d) public double hello()

(e) public Hello()

Question 5

Which of these is the heading of a constructor for the Hello class?

(a) public static void hello()

(b) public void hello()

(c) public static int hello()

(d) public double hello()

(e) public Hello()

Question 6What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 7What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 8What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 9What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 10What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 11What is the output of this program?

(a) Hello

(b) HelloSavings: 0.0

(c) HelloSavings: 1000.0

(d) HelloSavings: 0.0Savings: 1000.0

(e) Error

Question 12What is the output of this program?

(a) Name: Tom Savings: 1000.0

Name: Savings: 0.0

(b) Name: Tom Savings: 1000.0

Name: George Savings: 2500000.0

(c) Name: Savings: 0.0

Name: Sue Savings: 1800.0

(d) Name: Tom Savings: 1000.0

Name: Sue Savings: 1800.0

(e) Error

Question 13What is the output of this program?

(a) Name: Tom Savings: 1000.0

Name: Savings: 0.0

(b) Name: Tom Savings: 1000.0

Name: George Savings: 2500000.0

(c) Name: Savings: 0.0

Name: Sue Savings: 1800.0

(d) Name: Tom Savings: 1000.0

Name: Sue Savings: 1800.0

(e) Error

Question 14What is the output of this program?

(a) Name: Tom Savings: 1000.0

Name: Savings: 0.0

(b) Name: Tom Savings: 1000.0

Name: George Savings: 2500000.0

(c) Name: Savings: 0.0

Name: Sue Savings: 1800.0

(d) Name: Tom Savings: 1000.0

Name: Sue Savings: 1800.0

(e) Error

Question 15What is the output of this program?

(a) Name: Tom Savings: 1000.0

Name: Savings: 0.0

(b) Name: Tom Savings: 1000.0

Name: George Savings: 2500000.0

(c) Name: Savings: 0.0

Name: Sue Savings: 1800.0

(d) Name: Tom Savings: 1000.0

Name: Sue Savings: 1800.0

(e) Error

Extra CreditYou need to edit a specific method in your class. This method is a helper, class method which does not return a value. You are going to use your text editor’s find feature to look for the method. What exact words would you search for?

(a) public static void(b) public static return(c) private static void(d) private static return(e) public non-static void(f) public non-static return(g) private non-static void(h) private non-static return