Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Using Objects and Methods, 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: Using Objects Clear filter

Questions 341–350 of 454
  1. 341
  2. 342
  3. 343
  4. 344
  5. 345
  6. 346
  7. 347
  8. 348
  9. 349
  10. 350

Question 341

Multiple choice Using Objects
What is printed? Math.PI is approximately 3.14159.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 342

Multiple choice Using Objects
Which output is guaranteed every time this code executes? double r =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 343

Multiple choice Using Objects
A game must choose one of the even scores 4, 6, 8, and 10, with approximately equal…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 344

Multiple choice Using Objects
A program must generate a random integer from 7 through 19, including both endpoints, with approximately…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 345

Multiple choice Using Objects
Which range contains all and only the possible values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 346

Multiple choice Using Objects
The same random value r is used in both assignments. Which offered pair a:b…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 347

Multiple choice Using Objects
Over many executions, which value of prize should occur approximately twice as often as either of the other two values?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 348

Multiple choice Using Objects
A program must generate every integer satisfying -6 <= value < 2, with approximately equal probabilities and no…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 349

Multiple choice Using Objects
Which statement correctly describes hits after the loop? int hits = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 350

Multiple choice Using Objects
For this execution only, the three calls to Math.random() return 0.125, 0.875, and 0.375, in that order. What is printed? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 341 of 454
Page 35 of 46