Verityprep
Question Bank · Unit 3

AP® Computer Science A Class Creation Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Class Creation, 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.

Questions 261–270 of 359
  1. 261
  2. 262
  3. 263
  4. 264
  5. 265
  6. 266
  7. 267
  8. 268
  9. 269
  10. 270

Question 261

Multiple choice Writing Classes
Consider the following classes. public class Rectangle { private int width; public Rectangle(int w) { width = w; } public void grow(int amount) { width = width…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 262

Multiple choice Writing Classes
Consider the following classes. public class Counter { private int value; public Counter(int v) { value = v; } public void increment() { value++; } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 263

Multiple choice Writing Classes
Consider the following classes. public class Box { private int size; public Box(int s) { size = s; } public void grow() { size = size + 3; } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 264

Multiple choice Writing Classes
Consider the following class. public class Counter { private static int count = 0; public Counter() { count++; } public int getCount() { return count; } } What…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 265

Multiple choice Writing Classes
Consider the following class. public class Example { private int value = 5;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 266

Multiple choice Writing Classes
Consider the following class. public class MathTools { public static int square(int x) { return x…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 267

Multiple choice Writing Classes
Consider the following class. public class Box { private int size; public Box(int s) { size = s; } public int getSize() {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 268

Multiple choice Writing Classes
Consider the following class. public class Box { private int size; public Box(int s) { size = s; } public int getSize() { return size; } public static…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 269

Multiple choice Writing Classes
Consider the following class. public class Box { private int size; public void setSize(int size) { size = size; } public int getSize()…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 270

Multiple choice Writing Classes
Consider the following class. public class Box { private int size; public void setSize(int size) { this.size = size; } public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 261 of 359
Page 27 of 36