Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.awt.*;
  2.  
  3. abstract class Bird {
  4.  
  5. protected int x;
  6. protected int y;
  7. protected int size=50;
  8. protected Color color = Color.black;
  9. public Bird(){
  10. System.out.println("Я - птица");
  11. }
  12. public abstract void fly();
  13.  
  14.  
  15. public void draw(Graphics g){
  16. g.setColor(color);
  17. g.fillOval(x,y,size,size);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement