C c1 = new C(); } public void method() { B b = new B(); b.sleep(); } } public class Y extends B { A [] a = new A[5]; } public class A extends B { C c1, c2; public A() { c1 = new C(); } public void method(D d) { d.working(); } } public class X { private String s; public void m() { B var = new A(); double x – Math.sqrt(5); } }
this GUI using J a v a : 1. Blue b a r a t the top with your n a me. 2. A grid a t the center. Use MouseListener to a llow the user to click on a squ a re a nd ch a nge the color to yellow 3. The f ive buttons on the bottom. Only “Cle a r" need to work. Ignore the others. 4. The gr a y-box over the grid with the sliders c a n be ignored. Do not a dd it a t this moment. 27
[email protected] Summer 2025 Copyright. These slides can only be used as study material for the class CSC305 at Cal Poly. They cannot be distributed or used for another purpose.