From 2f4b0a65e7f112322dcadb7303633135345533d9 Mon Sep 17 00:00:00 2001 From: Safgerd Date: Tue, 22 Nov 2022 16:01:36 +0400 Subject: [PATCH] =?UTF-8?q?LabWork03:=20=D0=A4=D0=B8=D0=BA=D1=81=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EntityWithRollers.java | 10 +++++----- FormGallery.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/EntityWithRollers.java b/EntityWithRollers.java index 0539c01..09ff219 100644 --- a/EntityWithRollers.java +++ b/EntityWithRollers.java @@ -16,21 +16,21 @@ public class EntityWithRollers= entities.length) { - return false; - } + return false; + } entities[entitiesCount++] = entity; return true; } public boolean add(U roller) { if (rollersCount >= rollers.length) { - return false; - } + return false; + } rollers[rollersCount++] = roller; return true; } - public IDrawningObject constructArtillery() { + public IDrawningObject constructTracktor() { if (entitiesCount == 0 || rollersCount == 0) { return null; } diff --git a/FormGallery.java b/FormGallery.java index f59dd45..f62b8c0 100644 --- a/FormGallery.java +++ b/FormGallery.java @@ -40,9 +40,9 @@ public class FormGallery extends JFrame { } buttonRefresh.addActionListener(e -> { - first = storage.constructArtillery(); - second = storage.constructArtillery(); - third = storage.constructArtillery(); + first = storage.constructTracktor(); + second = storage.constructTracktor(); + third = storage.constructTracktor(); first.setObject(0, 10, pictureBox.getWidth(), pictureBox.getHeight()); second.setObject(150, 10, pictureBox.getWidth(), pictureBox.getHeight());