Сложная лабораторная работа 1

This commit is contained in:
Кашин Максим 2022-09-21 10:50:14 +04:00
parent 27b7577bb5
commit 44af2235aa
6 changed files with 6 additions and 24 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" project-jdk-name="19" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View File

@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ProjectGasolineTankerHard.iml" filepath="$PROJECT_DIR$/.idea/ProjectGasolineTankerHard.iml" /> <module fileurl="file://$PROJECT_DIR$/1 lab hard.iml" filepath="$PROJECT_DIR$/1 lab hard.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -2,7 +2,6 @@ public enum CountWheels {
Two(2), Two(2),
Three(3), Three(3),
Four(4); Four(4);
private final int Value; private final int Value;
CountWheels(int Count){ CountWheels(int Count){
Value=Count; Value=Count;

View File

@ -5,10 +5,6 @@ public class DrawingGasolineTanker {
public EntityGasolineTanker getGasolineTanker() { public EntityGasolineTanker getGasolineTanker() {
return GasolineTanker; return GasolineTanker;
} }
public void setGasolineTanker(EntityGasolineTanker GasolineTanker) {
this.GasolineTanker = GasolineTanker;
}
public DrawingWheels Wheels; public DrawingWheels Wheels;
private int _startPosX; private int _startPosX;
private int _startPosY; private int _startPosY;

View File

@ -2,31 +2,18 @@ import java.awt.*;
import java.util.Random; import java.util.Random;
public class EntityGasolineTanker { public class EntityGasolineTanker {
private int Speed; private int Speed;
public int getSpeed() { public int getSpeed() {
return Speed; return Speed;
} }
public void setSpeed(int Speed) {
this.Speed = Speed;
}
private float Weight; private float Weight;
public float getWeight() { public float getWeight() {
return Weight; return Weight;
} }
public void setWeight(float Weight) {
this.Weight = Weight;
}
private Color BodyColor; private Color BodyColor;
public Color getBodyColor() { public Color getBodyColor() {
return BodyColor; return BodyColor;
} }
public void setBodyColor(Color BodyColor) {
this.BodyColor = BodyColor;
}
public float Step; public float Step;
public void Init(int speed, float weight, Color bodyColor){ public void Init(int speed, float weight, Color bodyColor){

View File

@ -22,16 +22,16 @@ public class FormGasolineTanker extends JFrame{
JButton ButtonCreate=new JButton("Create"); JButton ButtonCreate=new JButton("Create");
Icon iconUp = new ImageIcon("C:\\Users\\Максим\\Desktop\\Универ\\3 семестр\\РПП\\Материал\\KeyUp.png"); Icon iconUp = new ImageIcon("C:\\Users\\kashi\\OneDrive\\Материал\\KeyUp.png");
JButton ButtonUp=new JButton(iconUp); JButton ButtonUp=new JButton(iconUp);
Icon iconDown = new ImageIcon("C:\\Users\\Максим\\Desktop\\Универ\\3 семестр\\РПП\\Материал\\KeyDown.png"); Icon iconDown = new ImageIcon("C:\\Users\\kashi\\OneDrive\\Материал\\KeyDown.png");
JButton ButtonDown=new JButton(iconDown); JButton ButtonDown=new JButton(iconDown);
Icon iconRight = new ImageIcon("C:\\Users\\Максим\\Desktop\\Универ\\3 семестр\\РПП\\Материал\\KeyRight.png"); Icon iconRight = new ImageIcon("C:\\Users\\kashi\\OneDrive\\Материал\\KeyRight.png");
JButton ButtonRight=new JButton(iconRight); JButton ButtonRight=new JButton(iconRight);
Icon iconLeft = new ImageIcon("C:\\Users\\Максим\\Desktop\\Универ\\3 семестр\\РПП\\Материал\\KeyLeft.png"); Icon iconLeft = new ImageIcon("C:\\Users\\kashi\\OneDrive\\Материал\\KeyLeft.png");
JButton ButtonLeft=new JButton(iconLeft); JButton ButtonLeft=new JButton(iconLeft);