generated from mate-academy/jv-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e62eca
commit 450a4cd
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package core.basesyntax; | ||
|
||
public interface AreaCalculable { | ||
public abstract double getArea(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package core.basesyntax; | ||
|
||
public interface Drowbale { | ||
public abstract void draw(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package core.basesyntax; | ||
|
||
public abstract class Figure { | ||
public class Figure implements Drowbale, AreaCalculable { | ||
private String color; | ||
|
||
public Figure(String color) { | ||
this.color = color; | ||
} | ||
|
||
public abstract double getArea(); | ||
|
||
public abstract void draw(); | ||
|
||
public String getColor() { | ||
return color; | ||
} | ||
|
||
public void setColor(String color) { | ||
this.color = color; | ||
} | ||
|
||
@Override | ||
public double getArea() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void draw() { | ||
|
||
} | ||
} |