AP CSP Day 59: Digital Citizenship

Big Idea 3: Algorithms & Programming
Cycle 2 • Day 59 Practice • Hard Difficulty
Focus: Procedural Abstraction

Practice Question

Two programmers are building a weather app. Programmer A writes a procedure called convertTemp that takes a Fahrenheit value and returns the Celsius equivalent. Programmer B displays the converted temperature in the user interface but does not know the conversion formula.

Which of the following best describes how procedural abstraction benefits this collaboration?

Why This Answer?

Procedural abstraction provides a clear interface: Programmer B knows that convertTemp accepts a Fahrenheit number and returns a Celsius number. This is sufficient to use the procedure correctly without understanding the internal formula (C = (F-32) * 5/9).

Why Not the Others?

A) The entire point of abstraction is that Programmer B does NOT need to understand the internal formula. C) A procedure is written once and called from multiple locations — no rewriting is needed. B) Abstraction enables independent work; both programmers do not need to collaborate on every detail.

Common Mistake
Watch Out!

Students think that to use a procedure, you must understand how it works internally. Procedural abstraction specifically means you only need to know the interface (inputs and outputs), not the implementation.

AP Exam Tip

Procedural abstraction enables collaboration: one person writes the procedure, another uses it. The user only needs the interface (what goes in, what comes out), not the implementation details.

Keep Practicing!

Consistent daily practice is the key to AP CSP success.

AP CSP Resources Get 1-on-1 Help
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.