diff --git a/src/main/java/core/basesyntax/HelloWorld.java b/src/main/java/core/basesyntax/HelloWorld.java deleted file mode 100644 index 97db782bf7..0000000000 --- a/src/main/java/core/basesyntax/HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -package core.basesyntax; - -/** - * Feel free to remove this class and create your own. - */ -public class HelloWorld { - -} diff --git a/src/main/java/core/basesyntax/Main.java b/src/main/java/core/basesyntax/Main.java new file mode 100644 index 0000000000..c4a0541963 --- /dev/null +++ b/src/main/java/core/basesyntax/Main.java @@ -0,0 +1,20 @@ +package core.basesyntax; + +import core.basesyntax.model.AreaCalculator; +import core.basesyntax.model.Circle; +import core.basesyntax.model.Figure; + +/** + * Feel free to remove this class and create your own. + */ +public class HelloWorld { + public static void main(String[] args) { + + System.out.print(String.format("%s. Color: %s. ", this.getClass().getSimpleName(), color)); + final int amountFigures = 6; + final int HALF_FIGURES_COUNT = 3; + AreaCalculator figure = new Circle(); + figure.setColor(""); + figure.getArea(); + } +} diff --git a/src/main/java/core/basesyntax/model/Circle.java b/src/main/java/core/basesyntax/model/Circle.java new file mode 100644 index 0000000000..36a93010fc --- /dev/null +++ b/src/main/java/core/basesyntax/model/Circle.java @@ -0,0 +1,8 @@ +package core.basesyntax; + +public class Circle extends Figure { + @Override + public void draw() { + System.out.println("Circle"); + } +} diff --git a/src/main/java/core/basesyntax/model/Color.java b/src/main/java/core/basesyntax/model/Color.java new file mode 100644 index 0000000000..b78d7db779 --- /dev/null +++ b/src/main/java/core/basesyntax/model/Color.java @@ -0,0 +1,4 @@ +package core.basesyntax.model; + +public enum Color { +} diff --git a/src/main/java/core/basesyntax/model/Figure.java b/src/main/java/core/basesyntax/model/Figure.java new file mode 100644 index 0000000000..9d307f1a04 --- /dev/null +++ b/src/main/java/core/basesyntax/model/Figure.java @@ -0,0 +1,9 @@ +package core.basesyntax; + +import java.awt.*; + +public abstract class Figure { + String color; + + public abstract void draw(); +} diff --git a/src/main/java/core/basesyntax/model/IsoscelesTrapezoid.java b/src/main/java/core/basesyntax/model/IsoscelesTrapezoid.java new file mode 100644 index 0000000000..efe3e842f4 --- /dev/null +++ b/src/main/java/core/basesyntax/model/IsoscelesTrapezoid.java @@ -0,0 +1,8 @@ +package core.basesyntax; + +public class IsoscelesTrapezoid extends Figure implements Drawable { + @Override + public void draw() { + System.out.println("Isosceles Trapezoid"); + } +} diff --git a/src/main/java/core/basesyntax/model/Rectangle.java b/src/main/java/core/basesyntax/model/Rectangle.java new file mode 100644 index 0000000000..3669ac783a --- /dev/null +++ b/src/main/java/core/basesyntax/model/Rectangle.java @@ -0,0 +1,8 @@ +package core.basesyntax; + +public class Rectangle extends Figure implements Drawable { + @Override + public void draw() { + System.out.println("Drawing a rectangle"); + } +} diff --git a/src/main/java/core/basesyntax/model/RightTriangle.java b/src/main/java/core/basesyntax/model/RightTriangle.java new file mode 100644 index 0000000000..469fe97e3f --- /dev/null +++ b/src/main/java/core/basesyntax/model/RightTriangle.java @@ -0,0 +1,8 @@ +package core.basesyntax; + +public class RightTriangle extends Figure implements Drawable { + @Override + public void draw() { + System.out.println("Right Triangle"); + } +} diff --git a/src/main/java/core/basesyntax/model/Square.java b/src/main/java/core/basesyntax/model/Square.java new file mode 100644 index 0000000000..40c511ca39 --- /dev/null +++ b/src/main/java/core/basesyntax/model/Square.java @@ -0,0 +1,8 @@ +package core.basesyntax; + +public class Square extends Figure implements Drawable { + @Override + public void draw() { + System.out.println("Square"); + } +} diff --git a/src/main/java/core/basesyntax/service/AreaCalculator.java b/src/main/java/core/basesyntax/service/AreaCalculator.java new file mode 100644 index 0000000000..36b3c8245b --- /dev/null +++ b/src/main/java/core/basesyntax/service/AreaCalculator.java @@ -0,0 +1,7 @@ +package core.basesyntax.model; + +public interface AreaCalculator { + String color = ""; + + void getArea(); +} diff --git a/src/main/java/core/basesyntax/service/ColorSupplier.java b/src/main/java/core/basesyntax/service/ColorSupplier.java new file mode 100644 index 0000000000..643b456baa --- /dev/null +++ b/src/main/java/core/basesyntax/service/ColorSupplier.java @@ -0,0 +1,4 @@ +package core.basesyntax.service; + +public class ColorSupplier { +} diff --git a/src/main/java/core/basesyntax/service/Drawable.java b/src/main/java/core/basesyntax/service/Drawable.java new file mode 100644 index 0000000000..8ce6c2ab0b --- /dev/null +++ b/src/main/java/core/basesyntax/service/Drawable.java @@ -0,0 +1,4 @@ +package core.basesyntax.service; + +public interface Drawable { +} diff --git a/src/main/java/core/basesyntax/service/FigureSupplier.java b/src/main/java/core/basesyntax/service/FigureSupplier.java new file mode 100644 index 0000000000..97486c189d --- /dev/null +++ b/src/main/java/core/basesyntax/service/FigureSupplier.java @@ -0,0 +1,4 @@ +package core.basesyntax.service; + +public class FigureSupplier { +}