From b6af2bfbc67b31a081c8eeea3c4587edbe717481 Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Sun, 29 Oct 2023 18:19:20 +0400 Subject: [PATCH] Lab2 defenetly Done --- ...rawingEngines2.java => DrawingEnginesNotRounded.java} | 2 +- ...awingEngines1.java => DrawingEnginesRoundedBack.java} | 2 +- ...wingEngines3.java => DrawingEnginesRoundedFront.java} | 2 +- src/drawing_objects/DrawingPlane.java | 9 ++++----- 4 files changed, 7 insertions(+), 8 deletions(-) rename src/drawing_objects/{DrawingEngines2.java => DrawingEnginesNotRounded.java} (93%) rename src/drawing_objects/{DrawingEngines1.java => DrawingEnginesRoundedBack.java} (95%) rename src/drawing_objects/{DrawingEngines3.java => DrawingEnginesRoundedFront.java} (95%) diff --git a/src/drawing_objects/DrawingEngines2.java b/src/drawing_objects/DrawingEnginesNotRounded.java similarity index 93% rename from src/drawing_objects/DrawingEngines2.java rename to src/drawing_objects/DrawingEnginesNotRounded.java index 4c1819f..28a92bb 100644 --- a/src/drawing_objects/DrawingEngines2.java +++ b/src/drawing_objects/DrawingEnginesNotRounded.java @@ -3,7 +3,7 @@ package drawing_objects; import enums.*; import java.awt.*; -public class DrawingEngines2 implements IDrawEngines{ +public class DrawingEnginesNotRounded implements IDrawEngines{ private EngineNumber number; public void setNumber(int x){ if(x <= 2) diff --git a/src/drawing_objects/DrawingEngines1.java b/src/drawing_objects/DrawingEnginesRoundedBack.java similarity index 95% rename from src/drawing_objects/DrawingEngines1.java rename to src/drawing_objects/DrawingEnginesRoundedBack.java index b23012a..5fc9108 100644 --- a/src/drawing_objects/DrawingEngines1.java +++ b/src/drawing_objects/DrawingEnginesRoundedBack.java @@ -3,7 +3,7 @@ package drawing_objects; import enums.*; import java.awt.*; -public class DrawingEngines1 implements IDrawEngines { +public class DrawingEnginesRoundedBack implements IDrawEngines { private EngineNumber number; public void setNumber(int x){ if(x <= 2) diff --git a/src/drawing_objects/DrawingEngines3.java b/src/drawing_objects/DrawingEnginesRoundedFront.java similarity index 95% rename from src/drawing_objects/DrawingEngines3.java rename to src/drawing_objects/DrawingEnginesRoundedFront.java index 1f2b43c..95010af 100644 --- a/src/drawing_objects/DrawingEngines3.java +++ b/src/drawing_objects/DrawingEnginesRoundedFront.java @@ -3,7 +3,7 @@ package drawing_objects; import enums.*; import java.awt.*; -public class DrawingEngines3 implements IDrawEngines { +public class DrawingEnginesRoundedFront implements IDrawEngines { private EngineNumber number; public void setNumber(int x){ if(x <= 2) diff --git a/src/drawing_objects/DrawingPlane.java b/src/drawing_objects/DrawingPlane.java index 7a3c43b..a48f135 100644 --- a/src/drawing_objects/DrawingPlane.java +++ b/src/drawing_objects/DrawingPlane.java @@ -2,9 +2,8 @@ package drawing_objects; import entities.EntityPlane; import enums.*; -import javax.swing.*; + import java.awt.*; -import java.util.function.Supplier; public class DrawingPlane { protected EntityPlane entityPlane; @@ -31,13 +30,13 @@ public class DrawingPlane { entityPlane = new EntityPlane(speed, weight, bodyColor); switch (enginesType){ case 1: - drawingEngines = new DrawingEngines2(); + drawingEngines = new DrawingEnginesNotRounded(); break; case 2: - drawingEngines = new DrawingEngines3(); + drawingEngines = new DrawingEnginesRoundedFront(); break; default: - drawingEngines = new DrawingEngines1(); + drawingEngines = new DrawingEnginesRoundedBack(); break; } drawingEngines.setNumber(enginesNumber);