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 131–140 of 359
  1. 131
  2. 132
  3. 133
  4. 134
  5. 135
  6. 136
  7. 137
  8. 138
  9. 139
  10. 140

Question 131

Multiple choice Writing Classes
public class Student { private String name; private double gpa; public Student(String newName, double newGPA) { name = newName; gpa = newGPA; } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 132

Multiple choice Writing Classes
public class Student { private String name; private double gpa; public Student(String newName, double newGPA) { name = newName; gpa = newGPA; } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 133

Multiple choice Writing Classes
public class Student { private String name; private double gpa; public Student(String newName, double newGPA) { name = newName; gpa = newGPA; } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 134

Multiple choice Writing Classes
public class Student { private String name; private double gpa; public Student(String newName, double newGPA) { name = newName; gpa = newGPA; } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 135

Multiple choice Writing Classes
Consider the following method. public int calculate(int a, int b) { a = a - b; int c = b; b = a * a; a = b - (a + c); return a; } The following code segment…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 136

Multiple choice Writing Classes
Consider the following method. public int calculate(int a, int b) { a = a - b; int c = b; b = a * a; a = b - (a + c); return a; } The following code segment…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 137

Multiple choice Writing Classes
Consider the following calculation of the area of a circle. double…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 138

Multiple choice Writing Classes
Having multiple methods in a class with the same name but with…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 139

Multiple choice Writing Classes
Consider the following method. public int mystery(int a, int b, int c) { if (a < b && a < c) { return a; } if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 140

Multiple choice Writing Classes
🟢 🟥 ⚠️ Consider the following method. public int mystery2(int a, int b, int c) { if (a < b && a < c)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 131 of 359
Page 14 of 36