Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice questions on Using Objects and Methods, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Subtopic: Using Objects Clear filter

Questions 191–200 of 546
  1. 191
  2. 192
  3. 193
  4. 194
  5. 195
  6. 196
  7. 197
  8. 198
  9. 199
  10. 200

Question 191

Multiple choice Using Objects
public class IntPair { private int firstValue; private int secondValue; public IntPair(int first, int second) { firstValue = first; secondValue = second; }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 192

Multiple choice Using Objects
Consider the following program that uses the IntPair class. public class IntPair { private int firstValue; private int secondValue; public IntPair(int first,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 193

Multiple choice Using Objects
public class Name { private String firstName; private String lastName; public Name(String first, String last) / / constructor { firstName = first; lastName =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 194

Multiple choice Using Objects
public class Name { private String firstName; private String lastName; public Name(String first, String last) / / constructor { firstName = first; lastName =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 195

Multiple choice Using Objects
Which print statement will produce the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 196

Free response Using Objects
This question involves reasoning about strings made up of uppercase letters. You will implement two related methods that appear in the same class (not shown).…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 197

Free response Using Objects
This question involves a game in which a player tries to hit a target by throwing a ball. You will write two static methods of the following BallGame class.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 198

Free response Using Objects
Consider the following class, FrogSimulation: (a) Write the simulate method, which simulates the frog attempting to hop in a straight line to a goal from the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 199

Multiple choice Using Objects
Consider the following code segment. String idk = "mnomnomno"; for (int i = 0; i < idk.length(); i++) { if (idk.substring(i, i + 1).equals("m")) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 200

Multiple choice Using Objects
Consider the following method. public String lengthen(String word) { int index = 0; while (index < word.length()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 191 of 546
Page 20 of 55