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 151–160 of 402
  1. 151
  2. 152
  3. 153
  4. 154
  5. 155
  6. 156
  7. 157
  8. 158
  9. 159
  10. 160

Question 151

Multiple choice Writing Classes
Consider the following method declaration. public int workaround(int a, double b) Which of these method declarations would correctly overload the given method?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 152

Free response Writing Classes
Free-Response Practice: Dream Vacation Class Everyone fantasizes about taking a dream vacation. Write a full DreamVacation class that contains the following: An…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 153

Free response Writing Classes
Free-Response Practice: The Height Class The purpose of the Height class is to hold a measurement in feet and inches, facilitate additions to that measurement,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 154

Multiple choice Writing Classes
public class Worker { private String name; private double hourlyWage; private boolean isUnionMember; public Worker() { /* implementation not shown */ } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 155

Multiple choice Writing Classes
public class Worker { private String name; private double hourlyWage; private boolean isUnionMember; public Worker() { /* implementation not shown */ } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 156

Multiple choice Writing Classes
public class Worker { private String name; private double hourlyWage; private boolean isUnionMember; public Worker() { /* implementation not shown */ } public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 157

Multiple choice Writing Classes
An Insect class is to be written, containing the following data fields. age, which will be initialized to 0 when an Insect is constructed. nextAvailableID,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 158

Multiple choice Writing Classes
public class Address { private String street; private String city; private String state; private int zipCode; public Address(String aStreet, String aCity,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 159

Multiple choice Writing Classes
public class Address { private String street; private String city; private String state; private int zipCode; public Address(String aStreet, String aCity,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 160

Multiple choice Writing Classes
public class AutoPart { private String description; private int partNum; private double price; public AutoPart(String desc, int pNum, double aPrice) { /*…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 151 of 402
Page 16 of 41