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.

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

Question 191

Multiple choice Writing Classes
Which of the following statements would best describe…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 192

Multiple choice Writing Classes
public class Chair { private int numberOfLegs = 4; private boolean padded; public Chair(boolean soft) { if (soft) padded = true; else padded = false; } } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 193

Multiple choice Writing Classes
public class Chair { private int numberOfLegs = 4; private boolean padded; public Chair(boolean soft) { if (soft) padded = true; else padded = false; } } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 194

Multiple choice Writing Classes
Consider the following method: public double halfRoot(int n) { return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 195

Multiple choice Writing Classes
The changeVal method in Number should reassign value to be the value taken as the parameter and return the original value.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 196

Multiple choice Writing Classes
public class Number { private int value; public Number(int someNum) { if (someNum >= 0) value = someNum; } public int changeVal(int newVal) { / * missing code *…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 197

Multiple choice Writing Classes
The following method is intended to output "Strings match." if the two strings contain identical data and otherwise print "Strings do not match.". public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 198

Multiple choice Writing Classes
A class called ComputerMouse has a static variable connector and a static method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 199

Multiple choice Writing Classes
A development team is building an online bookstore that customers can use to order books. Information about inventory and customer orders is kept in a database.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 200

Multiple choice Writing Classes
In Java, instance fields (also known as instance variables) and methods can be designated…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 191 of 402
Page 20 of 41