Lab2 defenetly Done
This commit is contained in:
parent
884f71077d
commit
b6af2bfbc6
@ -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)
|
@ -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)
|
@ -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)
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user