This commit is contained in:
Anitonchik 2024-06-10 21:19:03 +04:00
parent e67ef3d181
commit b50cb4a9f4

View File

@ -1,33 +0,0 @@
import java.awt.*;
public class DrawningWeels {
private int count;
DrawningWeels (int n){
count = n;
}
public int get_countWheels(){
return count;
}
public void DrawningWeel (Graphics g, int x, int y){
g.setColor(Color.BLACK);
switch (get_countWheels()){
case 2:
g.fillOval(x + 10, y + 67, 25, 25);
g.fillOval(x + 85, y + 67, 25, 25);
break;
case 3:
g.fillOval(x + 10, y + 67, 25, 25);
g.fillOval(x + 38, y + 67, 25, 25);
g.fillOval(x + 85, y + 67, 25, 25);
break;
case 4:
g.fillOval(x + 5, y + 67, 25, 25);
g.fillOval(x + 32, y + 67, 25, 25);
g.fillOval(x + 61, y + 67, 25, 25);
g.fillOval(x + 88, y + 67, 25, 25);
break;
}
}
}