AP Computer Science Principles Quiz
20 questions · no time limit
0:00
ALGORITHMS AND PROGRAMMING
Question 1 of 20
No time limit
Current
Answered
Flagged
Not seen
A city builds a Traffic Management System to reduce rush-hour delays using data abstraction. Road sensors stream raw records like (timestamp, intersectionID, laneID, speed, vehicleCount). To simplify, the system classifies each intersection into an abstract summary: totalVehiclesPerMinute, averageSpeed, and a congestionLevel label (LOW/MED/HIGH). It stores these summaries in a list of IntersectionStatus objects instead of keeping every raw sensor record for decision-making. An algorithm runs every minute to adjust signal timing: it finds intersections with HIGH congestion, then increases their green time by 5 seconds while decreasing nearby LOW intersections by 5 seconds, keeping total cycle time constant. Example pseudocode: FOR each status IN intersectionStatuses: IF status.congestionLevel = "HIGH": status.greenTime ← status.greenTime + 5 ELSE IF status.congestionLevel = "LOW": status.greenTime ← status.greenTime - 5 Based on the scenario described, how does data abstraction facilitate algorithmic processing in the described system?
YOUR PROGRESS
20
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F