Online Course Discussion Forum

AP CSA - Lab 4.6

 
 
Picture of Albert Tang
AP CSA - Lab 4.6
by Albert Tang - Wednesday, October 13, 2021, 5:27 PM
 

Hello. I was wondering if we could go over the Lab 4.6 in class? I am trying to follow the textbook directions for the lab, but I am getting very confused. 

For example, when the book says to remove all methods of "RoundBalloon.java" except for "draw", I am confused because I could not find a pre-existing method named "draw" in the "DrawBalloon" file that the lab is based off of. Additionally, wouldn't that also mean removing the main method, which would result in an error (my program now says it is missing a main method). Because of this, I have been stuck so I have not gotten a chance to continue onto further steps.  I have also tried to restart multiple times, but I still cannot figure it out. 

Thank you for your help! 

 
Picture of Dr. Kevin Wang
Re: AP CSA - Lab 4.6
by Dr. Kevin Wang - Wednesday, October 13, 2021, 6:21 PM
 

There is a Balloon.java file in the given source files, right?  Your RoundBalloon class should be based on that file.  The BalloonDraw.java file should not be used as the base class for different kinds of balloons.

Picture of Albert Tang
Re: AP CSA - Lab 4.6
by Albert Tang - Wednesday, October 13, 2021, 6:41 PM
 

Thank you for replying! That makes more sense. I was originally using the DrawBalloon.java class as the starting point for my RoundBalloon.java class, but I will try using the Balloon.java class file as the starting point. Thank you!