Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+6 votes

Hey guys, when I tried to run my code, the bubbles do not appear in the window of the fish tank, how could I make the bubbles to appear in my window? Thank you

asked in CSC201 Spring 2021 by (8 points)

3 Answers

+5 votes

In the main function you should call setupBubbles(numBubbles). The output will be a list of bubbles, so you need to use for loop to go through each bubble in the list and then draw it.

answered by (8 points)
+3 votes

Did you draw the fish in the main function?

answered by (8 points)
+1 vote

You need to create a draw function in your bubbles class and call the draw function later in your setupBubbles(numBubbles) function.

answered by (8 points)