Objects: Instances of Classes FRQ Practice

Responses receive AI feedback against a rubric after submission. Scores are practice estimates.

Question 1 of 5

A rec center uses class PoolLane. One object is named sprintLane and currently has length 25.

(a) Distinguish the class from the object. (b) Identify sprintLane’s state in this description. (c) Explain whether another PoolLane object must have length 25.

Question 2 of 5

A study sheet lists Object, then Vehicle, then Ferry as a more specific Vehicle. No student code uses extends.

(a) Name the root class. (b) Explain the conceptual relationship among Ferry, Vehicle, and Object. (c) Explain what students are not required to implement for this topic.

Question 3 of 5

The table describes two independent bakery ovens that already exist.

Reference Class temp
deckOven BakeryOven 450
rackOven BakeryOven 325

(a) Are these objects the same class? (b) If only rackOven’s temp is set to 300, what is deckOven’s temp? (c) Explain why changing one does not reclassify the other.

Question 4 of 5

Trace this code. Gondola(int seats) constructs a gondola with that seat count.

Gondola alpha = new Gondola(8);
Gondola beta = new Gondola(12);
Gondola gamma = alpha;
alpha = beta;

(a) After all four statements, which variables refer to the 12-seat gondola? (b) Which variable still refers to the 8-seat gondola? (c) How many Gondola objects exist?

Question 5 of 5

A dock program contains:

Crane arm = null;
arm = new Crane(6);
Crane spare = arm;

(a) What does arm hold before new Crane(6)? (b) After the last statement, do arm and spare share a reference value? (c) Explain what a reference value is in this example.