Skip to content
Snippets Groups Projects
Commit 3049a187 authored by AREZKI Celia's avatar AREZKI Celia
Browse files

I corrected a few small errors in different classes because yesterday...

I corrected a few small errors in different classes because yesterday everything I did was on my own computer using Visual Studio, and I couldn't see the errors
parent 1f421f65
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="corretto-16" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -24,14 +24,14 @@ public class App extends Application { ...@@ -24,14 +24,14 @@ public class App extends Application {
ShapeContainer shapeContainer = new ShapeContainer(); ShapeContainer shapeContainer = new ShapeContainer();
Shape rect = new Rectangle(Color.GRAY, new Point2D(150, 150), new Point2D(250, 250)); Shape rect = new Rectangle(Color.GRAY, new Point2D(150, 150), new Point2D(250, 250));
Shape decoratedRect = new BorderDecorator(new CenterDecorator(rect, 5, Color.RED), 5, Color.BLUE); Shape decoratedRect = new BorderDecorator(new CenterDecorator(rect, 5), 5);
shapeContainer.addShape(decoratedRect); shapeContainer.addShape(decoratedRect);
Shape triangle = new Polygon(Color.GRAY, Shape triangle = new Polygon(Color.GRAY,
new Point2D(100, 50), new Point2D(100, 50),
new Point2D(150, 150), new Point2D(150, 150),
new Point2D(50, 150)); new Point2D(50, 150));
Shape decoratedTriangle = new BorderDecorator(new CenterDecorator(triangle, 5, Color.RED), 5, Color.BLUE); Shape decoratedTriangle = new BorderDecorator(new CenterDecorator(triangle, 5), 5);
shapeContainer.addShape(decoratedTriangle); shapeContainer.addShape(decoratedTriangle);
shapeContainer.draw(graphicsContext); shapeContainer.draw(graphicsContext);
......
package shape; package shape;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
public class Circle implements Shape { public class Circle implements Shape {
......
package shape; package shape;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
...@@ -16,7 +17,7 @@ public class Rectangle implements Shape { ...@@ -16,7 +17,7 @@ public class Rectangle implements Shape {
@Override @Override
public int pointsCount() { public int pointsCount() {
return 2;
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment