Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice 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.

Questions 621–630 of 776
  1. 621
  2. 622
  3. 623
  4. 624
  5. 625
  6. 626
  7. 627
  8. 628
  9. 629
  10. 630

Question 621

Multiple choice Primitive Types
Which statement uses the variables below to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 622

Multiple choice Primitive Types
What visible output does this statement produce? Ignore the final…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 623

Multiple choice Primitive Types
An audio clip lasts 2 minutes and 45 seconds. The code below incorrectly stores 2.0 in duration. Which replacement for the last line correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 624

Multiple choice Primitive Types
A shipping program packs items into boxes that each hold capacity items. Both variables are int, with 1 <= items <= 1000 and 1…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 625

Multiple choice Primitive Types
The following code appears inside a method. Which outcome is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 626

Multiple choice Primitive Types
An order contains 4 items costing 7 credits each, plus a single shipping charge of 3 credits. The program prints 49 instead of the intended total 31. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 627

Multiple choice Primitive Types
The int variables completed and total satisfy 0 <= completed <= total <= 1000 and total > 0. A progress indicator should store the percentage…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 628

Multiple choice Primitive Types
A temperature converter uses the formula Fahrenheit = (9/5) × Celsius + 32, where the fraction represents real-number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 629

Multiple choice Primitive Types
A display should rotate three stored counts: red receives the original blue count, blue receives the original green count, and green receives the original red…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 630

Multiple choice Primitive Types
The int variable badge is a four-digit positive number (1000 through 9999). A machine removes the hundreds digit and keeps the other digits…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 621 of 776
Page 63 of 78