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 211–220 of 402
  1. 211
  2. 212
  3. 213
  4. 214
  5. 215
  6. 216
  7. 217
  8. 218
  9. 219
  10. 220

Question 211

Multiple choice Writing Classes
Consider the following class declaration. public class Point { private int xCoor; // the x-coordinate of the point private int yCoor; // the y-coordinate of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 212

Free response Writing Classes
The CupcakeMachine class, which you will write, represents a cupcake vending machine, an automated machine that dispenses cupcakes. CupcakeMachine objects are…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 213

Free response Writing Classes
This question involves the SignedText class, which contains methods that are used to include a signature as part of a string of text. You will write the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 214

Multiple choice Writing Classes
Consider the following class declaration. public class DoSomething { private String str; private static int num = 0; public DoSomething (String s) { str = s;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 215

Multiple choice Writing Classes
Consider the following class used to represent a movie. public class Movie { private String title; private int year; public Movie() { title = "title"; year = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 216

Multiple choice Writing Classes
public class Student { private String firstName; private String lastName; private int stuId; private static int lastIdAssigned = 1000; public Student(String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 217

Multiple choice Writing Classes
public class Student { private String firstName; private String lastName; private int stuId; private static int lastIdAssigned = 1000; public Student(String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 218

Multiple choice Writing Classes
Which of the following correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 219

Multiple choice Writing Classes
public class Vehicle { private int fuel; public Vehicle() { fuel = 0; } public Vehicle(int fuelAmt) { fuel = fuelAmt; } public void start() {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 220

Multiple choice Writing Classes
public class Vehicle { private int fuel; public Vehicle() { fuel = 0; } public Vehicle(int fuelAmt) { fuel = fuelAmt; } public void start() {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 211 of 402
Page 22 of 41