zuai-logo
zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank
GlossaryGlossary

Using Objects in AP Computer Science A

Question 1
college-boardComputer Science AAPExam Style
1 mark

What do you necessarily need to provide when calling any non-default constructor or non-void methods/parameters in your program?

Question 2
college-boardComputer Science AAPExam Style
1 mark

If you must choose between two void methods with parameters that manipulate data structures—one employing tail recursion and another utilizing head recursion—which should generally be prioritized for efficiency reasons?

Question 3
college-boardComputer Science AAPExam Style
1 mark

In what scenario would calling updateRecord(void recordUpdater(), String id) cause potential issues without proper validation checks inside recordUpdater()?

Question 4
college-boardComputer Science AAPExam Style
1 mark

If we call printSum(5,10); assuming it's properly defined elsewhere in our program, what would be expected to happen next?

Question 5
college-boardComputer Science AAPExam Style
1 mark

In order to process multiple conditions where each condition has its separate set of actions to perform, which control structure would typically be most efficient?

Question 6
college-boardComputer Science AAPExam Style
1 mark

Given an existing “Vehicle” class, which scenario demonstrates using composition as opposed to inheritance when introducing “Engine” behavior?

Question 7
college-boardComputer Science AAPExam Style
1 mark

Given a void method configure(Settings setup) in a base class Device, how should it be called correctly from within another void method initialize() of its subclass 'Smartphone' without altering the original settings object passed as an argument?

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
college-boardComputer Science AAPExam Style
1 mark

If you want to ensure that your program checks at least once whether certain conditions are met before executing related tasks, which control structure would be most appropriate?

Question 9
college-boardComputer Science AAPExam Style
1 mark

What type of control structure would best allow a method to choose among many possible execution paths based on the value of a single variable?

Question 10
college-boardComputer Science AAPExam Style
1 mark

When would using a RuntimeException in a method signature be appropriate?