Question: Assume that r1 and r2 are variables that reference Rectangle objects, and the following statements are executed: R1.setLength(5.0); R2.setLength(10.0); R1.setWidth(20.0); R2.setWidth(15.0); Fill in the boxes

Assume that r1 and r2 are variables that reference Rectangle objects, and the following statements are executed:

R1.setLength(5.0);
R2.setLength(10.0);
R1.setWidth(20.0);
R2.setWidth(15.0);

Fill in the boxes in Figure 6-21 that represent each object’s length and width fields.


Data in Figure 6-21

rl address r2 address A Rectangle object length: width: A Rectangle object

rl address r2 address A Rectangle object length: width: A Rectangle object length: width:

Step by Step Solution

3.41 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Data in Figure 621 A Rectangle object r1 address A Rectangle object length 50 width 200 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!