Lab3 Done done+

This commit is contained in:
Yunusov_Niyaz 2023-11-18 02:36:55 +04:00
parent f7be8b6d55
commit 68312fa3c3
3 changed files with 0 additions and 9 deletions

View File

@ -2,7 +2,6 @@ import java.awt.*;
public class DrawingDoors implements IDrawDoors{
private DoorsNumber number;
@Override
public int getNumber(){
int x = 0;
if(number == DoorsNumber.THREE)
@ -14,7 +13,6 @@ public class DrawingDoors implements IDrawDoors{
return x;
}
public int getType(){return 0;}
@Override
public void setNumber(int x){
if(x <= 3)
number = DoorsNumber.THREE;
@ -23,7 +21,6 @@ public class DrawingDoors implements IDrawDoors{
if(x >= 5)
number = DoorsNumber.FIVE;
}
@Override
public void drawDoors(Graphics2D graphics2D, int _startX, int _startY){
graphics2D.fillRect(_startX+52, _startY+81, 25, 40);
graphics2D.fillRect(_startX+85, _startY+81, 25, 40);

View File

@ -2,7 +2,6 @@ import java.awt.*;
public class DrawingDoorsRoundedUp implements IDrawDoors{
private DoorsNumber number;
@Override
public int getNumber(){
int x = 0;
if(number == DoorsNumber.THREE)
@ -14,7 +13,6 @@ public class DrawingDoorsRoundedUp implements IDrawDoors{
return x;
}
public int getType(){return 1;}
@Override
public void setNumber(int x){
if(x <= 2)
number = DoorsNumber.THREE;
@ -23,7 +21,6 @@ public class DrawingDoorsRoundedUp implements IDrawDoors{
if(x >= 6)
number = DoorsNumber.FIVE;
}
@Override
public void drawDoors(Graphics2D graphics2D, int _startX, int _startY){
graphics2D.fillRect(_startX+52, _startY+86, 25, 35);
graphics2D.fillOval(_startX+52, _startY+81, 25, 12);

View File

@ -2,7 +2,6 @@ import java.awt.*;
public class DrawingDoorsRoundedUpAndDown implements IDrawDoors{
private DoorsNumber number;
@Override
public int getNumber(){
int x = 0;
if(number == DoorsNumber.THREE)
@ -14,7 +13,6 @@ public class DrawingDoorsRoundedUpAndDown implements IDrawDoors{
return x;
}
public int getType(){return 2;}
@Override
public void setNumber(int x){
if(x <= 2)
number = DoorsNumber.THREE;
@ -23,7 +21,6 @@ public class DrawingDoorsRoundedUpAndDown implements IDrawDoors{
if(x >= 6)
number = DoorsNumber.FIVE;
}
@Override
public void drawDoors(Graphics2D graphics2D, int _startX, int _startY){
graphics2D.fillRect(_startX+52, _startY+86, 25, 30);
graphics2D.fillOval(_startX+52, _startY+81, 25, 12);