Shannon Anderson-Rush
Quiz by , created more than 1 year ago

Quiz on APCSA Unit 5 Review, created by Shannon Anderson-Rush on 29/10/2017.

2305
0
0
Shannon Anderson-Rush
Created by Shannon Anderson-Rush about 7 years ago
Close

APCSA Unit 5 Review

Question 1 of 10

1

What is a condition that should be true when a method is called?

Select one of the following:

  • Constructor

  • Precondition

  • Postcondition

Explanation

Question 2 of 10

1

Cannot have any return type, even void.

Select one of the following:

  • Constructor

  • Precondition

  • Postcondition

Explanation

Question 3 of 10

1

A variable declared in a method is local to that method and cannot be used outside of it.

Select one of the following:

  • True
  • False

Explanation

Question 4 of 10

1

Most objects contain accessor and mutator methods to allow the client to manage data in a controlled manner.

Select one of the following:

  • True
  • False

Explanation

Question 5 of 10

1

A return value must match the return type in the method header.

Select one of the following:

  • True
  • False

Explanation

Question 6 of 10

1

When a method is called, the formal parameters are copied into the actual parameters. The types of the corresponding parameters must match.

Select one of the following:

  • True
  • False

Explanation

Question 7 of 10

1

You can have multiple methods with the same name in the same program.

Select one of the following:

  • True
  • False

Explanation

Question 8 of 10

1

A method invoked through one object may take as a parameter another oject of the same class.

Select one of the following:

  • True
  • False

Explanation

Question 9 of 10

1

Instance variables should be declared with public visibility to protect their data.

Select one of the following:

  • True
  • False

Explanation

Question 10 of 10

1

Each object has a state and a set of behaviors.

Select one of the following:

  • True
  • False

Explanation