Lab2 defenetly Done

This commit is contained in:
Artyom_Yashin 2023-10-29 18:19:20 +04:00
parent 884f71077d
commit b6af2bfbc6
4 changed files with 7 additions and 8 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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);