import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.Random; public class BubbleGameSkeleton { private static final int X_SIZE=800, Y_SIZE=800; public static void main(String[] args) { JFrame f=new JFrame("Bubble Game"); f.setSize(X_SIZE,Y_SIZE); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); BP bubblePanel=new BP(); f.add(bubblePanel); f.setVisible(true); } private static class BP extends JPanel implements ActionListener, MouseListener { // declare the following variables, all private: // an array of Bubble called bubbles // int values for num of bubbles (num), score, collisions, numClicks // a random number Generator (g) // a Timer (t) public BP() { // instantiate g and t // initialize all int variables to 0 except // for num, set that to the number of Bubbles // you want in your game, 20 is recommended bubbles=new Bubble[num]; for(int i=0;i50) size=.5; else if(numClicks>40) size=.3; else if(numClicks>30) size=.25; else if(numClicks>20) size=.2; else if(numClicks>15) size=.15; else if(numClicks>10) size=.1; else size=.05; // add a for-loop to increase each bubble[i]'s size // the following nested for loops will test to // see if any two Bubbles, i and j, have touched for(int i=0;i