Online Course Discussion Forum

AP CSA - Lab 4.6

 
 
TangAlbert的头像
AP CSA - Lab 4.6
TangAlbert - 2021年10月13日 Wednesday 17:27
 

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! 

 
WangDr. Kevin的头像
Re: AP CSA - Lab 4.6
WangDr. Kevin - 2021年10月13日 Wednesday 18:21
 

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.

TangAlbert的头像
Re: AP CSA - Lab 4.6
TangAlbert - 2021年10月13日 Wednesday 18:41
 

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!