233k views
18 votes
The classes in this question refer to the lab in section 4.6 of your textbook. Which of the following assignment statements will compile without errors? Explain your answers.

a. RoundBalloon b1 = RoundBalloon();

b. Balloon b2 = new RoundBalloon(100, 100, 10, Color.RED);

c. Balloon b3 = new SquareBalloon();

d. RoundBalloon b5 = new Balloon();

Can someone help me answer this and explain? Thank you :)

1 Answer

6 votes
D because every other one will deflate
User Vicatcu
by
5.5k points