Guest User

Untitled

a guest
Mar 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. //save as CircleInter.java
  2. package circlimplmnt.example
  3. interface Drawable{
  4. static int thickness = 2;
  5. public void draw(String color);
  6. public void erase(int p1, int p2, int p3, int p4);
  7. }
  8.  
  9. public class Circle implements Drawable{
  10. private String color;
  11.  
  12. @Override
  13. public void draw(String color){
  14. System.out.println(“Draw a default size color”);
  15. }
  16.  
  17. @Override
  18. public void erase(int p1, int p2, int p3, int p4){
  19. system.out.println(“erase area between p1, p2, p3, p4”)
  20. }
  21.  
  22. // And here will be getter and setter methods for variable “color”
  23. }
Add Comment
Please, Sign In to add comment