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 111–120 of 359
  1. 111
  2. 112
  3. 113
  4. 114
  5. 115
  6. 116
  7. 117
  8. 118
  9. 119
  10. 120

Question 111

Multiple choice Writing Classes
public class Rational { private int numerator; private int denominator; /** default constructor */ Rational() { /* implementation not shown */ } /** Constructs…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 112

Multiple choice Writing Classes
public class Rational { private int numerator; private int denominator; /** default constructor */ Rational() { /* implementation not shown */ } /** Constructs…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 113

Multiple choice Writing Classes
public class Rational { private int numerator; private int denominator; /** default constructor */ Rational() { /* implementation not shown */ } /** Constructs…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 114

Multiple choice Writing Classes
public class Temperature { private String scale; //valid values are "F" or "C" private double degrees; /** constructor with specified degrees and scale */…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 115

Multiple choice Writing Classes
public class Temperature { private String scale; //valid values are "F" or "C" private double degrees; /** constructor with specified degrees and scale */…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 116

Multiple choice Writing Classes
public class Temperature { private String scale; //valid values are "F" or "C" private double degrees; /** constructor with specified degrees and scale */…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 117

Multiple choice Writing Classes
Consider this program. public class CountStuff { public static void doSomething() { int count = 0; ... //code to do something - no screen output produced…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 118

Multiple choice Writing Classes
This question refers to the following class. public class IntObject { private int num; public IntObject() //default constructor { num = 0; } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 119

Multiple choice Writing Classes
Consider the following program. public class Tester { public void someMethod(int a, int b) { int temp = a; a = b; b = temp; } } public class TesterMain { public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 120

Multiple choice Writing Classes
Consider the following partial class declaration. public class Park { private String name; private boolean playground; private int acres; public Park(String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 111 of 359
Page 12 of 36