Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods FRQ

Work through AP Computer Science A free-response 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 61–70 of 95
  1. 61
  2. 62
  3. 63
  4. 64
  5. 65
  6. 66
  7. 67
  8. 68
  9. 69
  10. 70

Question 61

Free response Using Objects
Given a string, look for a mirror image (backwards) string at both the beginning and end of the given string. In other words, zero or more characters at the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 62

Free response Using Objects
Given a string, return the length of the largest "block" in the string. A block is a run of adjacent chars that are the same.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 63

Free response Using Objects
Given a string, return a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should not be immediately…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 64

Free response Using Objects
This question involves reasoning about strings made up of uppercase letters. You will implement two related methods that appear in the same class (not shown).…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 65

Free response Using Objects
This question involves a game in which a player tries to hit a target by throwing a ball. You will write two static methods of the following BallGame class.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 66

Free response Using Objects
Consider the following class, FrogSimulation: (a) Write the simulate method, which simulates the frog attempting to hop in a straight line to a goal from the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 67

Free response Primitive Types
A mathematical sequence is an ordered list of numbers. This question involves a sequence called a hailstone sequence. If \(n\) is the value of a term in the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 68

Free response Using Objects
A Password class contains methods used to determine information about passwords. You will write two methods of the class. public class Password { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 69

Free response Using Objects
In the seventeenth century, Location Numerals were invented as a new way to represent numbers. Location Numerals have a lot in common with the binary number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 70

Free response Using Objects
This question uses a password checker to report whether a given password is weak, medium, or strong. The PasswordChecker class is shown below. You will write…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 61 of 95
Page 7 of 10