Verityprep
Question Bank · Unit 3

AP® Computer Science A Class Creation Practice Questions

Work through AP Computer Science A practice 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.

Subtopic: Writing Classes Clear filter

Questions 291–300 of 402
  1. 291
  2. 292
  3. 293
  4. 294
  5. 295
  6. 296
  7. 297
  8. 298
  9. 299
  10. 300

Question 291

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 292

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 293

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 294

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 295

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 296

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 297

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 298

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 299

Multiple choice Writing Classes
Consider the following class. public class Counter { private int value; public void add(int n) { value = value + n; } public void increase() { this.add(3); }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 300

Free response Writing Classes
This question involves the implementation of a fitness tracking system that is represented by the StepTracker class. A StepTracker object is created with a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 291 of 402
Page 30 of 41