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 51–60 of 402
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

Multiple choice Writing Classes
Given the following code public class Storm { private int lighteningCount; private int precipTotal; private String precipType; public Storm(String precipType) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 52

Multiple choice Writing Classes
Which of the following is not part of the ACM Code of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 53

Multiple choice Writing Classes
Consider the following code segment: public static String mystery(String word, int i, int j) { String mystery = word.substring(i, i + 1); mystery +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 54

Multiple choice Writing Classes
Consider the following code segment: public static String mystery(String word, int i, int j) { String mystery = word.substring(i, i + 1); mystery + =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 55

Multiple choice Writing Classes
The Insect class will contain a String for the insect's name, an int for the number of legs it has, and a boolean for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 56

Multiple choice Writing Classes
What is the difference between a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 57

Multiple choice Writing Classes
What is the scope of private…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 58

Multiple choice Writing Classes
Accessors and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 59

Multiple choice Writing Classes
Classes' access…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 60

Multiple choice Writing Classes
The Glasses class represents a pair of eyeglasses. One of its instance variables is a Prescription object called script. The Prescription object has instance…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 51 of 402
Page 6 of 41