Ball ball_1, ball_2; void setup(){ size(400, 400); ball_1 = new Ball(); ball_2 = new Ball(200, 200, 250); } void draw(){ ball_1.zeichne(); ball_2.zeichne(); } class Ball{ // --Felder-- int x, y; // Position int g; // Farbe (Grauwert) int radius; // --Konstruktoren-- // Konstruktor OHNE Übergabeparameter Ball(){ x = 100; y = 100; g = 126; radius = 50; } // Konstruktor MIT Übergabeparameter Ball(int input_x, int input_y, int input_g){ x = input_x; y = input_y; g = input_g; radius = 50; } // --Methoden-- void zeichne(){ fill(g); ellipse(x, y, radius, radius); } }