Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //save as CircleInter.java
- package circlimplmnt.example
- interface Drawable{
- static int thickness = 2;
- public void draw(String color);
- public void erase(int p1, int p2, int p3, int p4);
- }
- public class Circle implements Drawable{
- private String color;
- @Override
- public void draw(String color){
- System.out.println(“Draw a default size color”);
- }
- @Override
- public void erase(int p1, int p2, int p3, int p4){
- system.out.println(“erase area between p1, p2, p3, p4”)
- }
- // And here will be getter and setter methods for variable “color”
- }
Add Comment
Please, Sign In to add comment