From 97686cf9b9c5d7da7280c405d9af0a8dc76a0d3b Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:14:12 +0200 Subject: [PATCH 01/13] 1. dodanie pliku gitignore --- .gitignore | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..87b91c78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# IntelliJ IDEA +.idea/ + +# Eclipse +.classpath +.project +.settings/ + +# Maven +target/ +*.iml +*.ipr +*.iws + +# Gradle +build/ +*.iml +*.ipr +*.iws + +# NetBeans +nbproject/private/ +build/ From 2ee58ef232281da79b4389b6c2dba491a1c41fea Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:16:09 +0200 Subject: [PATCH 02/13] 2. poprawa formatowania pliku HanoiRhymer --- src/main/java/edu/kis/vh/nursery/HanoiRhymer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java index 755b2d58..3c6dbf75 100644 --- a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java @@ -10,8 +10,8 @@ public int reportRejected() { public void countIn(int in) { if (!callCheck() && in > peekaboo()) - totalRejected++; - else - super.countIn(in); + totalRejected++; + else + super.countIn(in); } } From 74abf8ea26803ce18ac9d5bf725bf2c00225ab7d Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:24:14 +0200 Subject: [PATCH 03/13] 3. poprawa formatowania klas --- .../vh/nursery/defaultCountingOutRhymer.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index 199abf6d..d7122f38 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -11,24 +11,24 @@ public void countIn(int in) { NUMBERS[++total] = in; } - public boolean callCheck() { - return total == -1; - } + public boolean callCheck() { + return total == -1; + } - public boolean isFull() { - return total == 11; - } + public boolean isFull() { + return total == 11; + } - protected int peekaboo() { - if (callCheck()) - return -1; - return NUMBERS[total]; - } + protected int peekaboo() { + if (callCheck()) + return -1; + return NUMBERS[total]; + } - public int countOut() { - if (callCheck()) - return -1; - return NUMBERS[total--]; - } + public int countOut() { + if (callCheck()) + return -1; + return NUMBERS[total--]; + } } From 0999858b9a73ee0d6080458f2520ae6667316775 Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:40:14 +0200 Subject: [PATCH 04/13] =?UTF-8?q?5=20zmiana=20nazw=20p=C3=B3l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/edu/kis/vh/nursery/defaultCountingOutRhymer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index d7122f38..b70c2ca8 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -2,13 +2,13 @@ public class defaultCountingOutRhymer { - private int[] NUMBERS = new int[12]; + private int[] Numbers = new int[12]; public int total = -1; public void countIn(int in) { if (!isFull()) - NUMBERS[++total] = in; + Numbers[++total] = in; } public boolean callCheck() { @@ -22,13 +22,13 @@ public boolean isFull() { protected int peekaboo() { if (callCheck()) return -1; - return NUMBERS[total]; + return Numbers[total]; } public int countOut() { if (callCheck()) return -1; - return NUMBERS[total--]; + return Numbers[total--]; } } From 211719b34927cf05e5f32e551b1912e57e6415ff Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:34:13 +0200 Subject: [PATCH 05/13] 4.1 zmiana nazw klas wedug konwencji --- src/main/java/edu/kis/vh/nursery/FIFORhymer.java | 4 ++-- src/main/java/edu/kis/vh/nursery/HanoiRhymer.java | 2 +- .../kis/vh/nursery/defaultCountingOutRhymer.java | 2 +- .../vh/nursery/factory/DefaultRhymersFactory.java | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java index 28591ada..261201e3 100644 --- a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java +++ b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java @@ -1,8 +1,8 @@ package edu.kis.vh.nursery; -public class FIFORhymer extends defaultCountingOutRhymer { +public class FIFORhymer extends DefaultCountingOutRhymer { - public defaultCountingOutRhymer temp = new defaultCountingOutRhymer(); + public DefaultCountingOutRhymer temp = new DefaultCountingOutRhymer(); @Override public int countOut() { diff --git a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java index 3c6dbf75..4bf54116 100644 --- a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java @@ -1,6 +1,6 @@ package edu.kis.vh.nursery; -public class HanoiRhymer extends defaultCountingOutRhymer { +public class HanoiRhymer extends DefaultCountingOutRhymer { int totalRejected = 0; diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index b70c2ca8..c57f713a 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -1,6 +1,6 @@ package edu.kis.vh.nursery; -public class defaultCountingOutRhymer { +public class DefaultCountingOutRhymer { private int[] Numbers = new int[12]; diff --git a/src/main/java/edu/kis/vh/nursery/factory/DefaultRhymersFactory.java b/src/main/java/edu/kis/vh/nursery/factory/DefaultRhymersFactory.java index 60ba2a16..9d738ef2 100644 --- a/src/main/java/edu/kis/vh/nursery/factory/DefaultRhymersFactory.java +++ b/src/main/java/edu/kis/vh/nursery/factory/DefaultRhymersFactory.java @@ -1,6 +1,6 @@ package edu.kis.vh.nursery.factory; -import edu.kis.vh.nursery.defaultCountingOutRhymer; +import edu.kis.vh.nursery.DefaultCountingOutRhymer; import edu.kis.vh.nursery.FIFORhymer; import edu.kis.vh.nursery.HanoiRhymer; import edu.kis.vh.nursery.factory.Rhymersfactory; @@ -8,22 +8,22 @@ public class DefaultRhymersFactory implements Rhymersfactory { @Override - public defaultCountingOutRhymer GetStandardRhymer() { - return new defaultCountingOutRhymer(); + public DefaultCountingOutRhymer GetStandardRhymer() { + return new DefaultCountingOutRhymer(); } @Override - public defaultCountingOutRhymer GetFalseRhymer() { - return new defaultCountingOutRhymer(); + public DefaultCountingOutRhymer GetFalseRhymer() { + return new DefaultCountingOutRhymer(); } @Override - public defaultCountingOutRhymer GetFIFORhymer() { + public DefaultCountingOutRhymer GetFIFORhymer() { return new FIFORhymer(); } @Override - public defaultCountingOutRhymer GetHanoiRhymer() { + public DefaultCountingOutRhymer GetHanoiRhymer() { return new HanoiRhymer(); } From 40bb970815e6de74174a7087a4d28e5eda14ce75 Mon Sep 17 00:00:00 2001 From: anhelin2a Date: Wed, 24 Apr 2024 18:36:59 +0200 Subject: [PATCH 06/13] 4.2 zmiana nazw metod wedug konwencji --- src/main/java/edu/kis/vh/nursery/FIFORhymer.java | 12 ++++++------ src/main/java/edu/kis/vh/nursery/HanoiRhymer.java | 8 ++++---- .../edu/kis/vh/nursery/defaultCountingOutRhymer.java | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java index 261201e3..b8ad7f34 100644 --- a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java +++ b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java @@ -5,16 +5,16 @@ public class FIFORhymer extends DefaultCountingOutRhymer { public DefaultCountingOutRhymer temp = new DefaultCountingOutRhymer(); @Override - public int countOut() { - while (!callCheck()) + public int CountOut() { + while (!CallCheck()) - temp.countIn(super.countOut()); + temp.CountIn(super.CountOut()); - int ret = temp.countOut(); + int ret = temp.CountOut(); - while (!temp.callCheck()) + while (!temp.CallCheck()) - countIn(temp.countOut()); + CountIn(temp.CountOut()); return ret; } diff --git a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java index 4bf54116..af91b847 100644 --- a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java @@ -4,14 +4,14 @@ public class HanoiRhymer extends DefaultCountingOutRhymer { int totalRejected = 0; - public int reportRejected() { + public int ReportRejected() { return totalRejected; } - public void countIn(int in) { - if (!callCheck() && in > peekaboo()) + public void CountIn(int in) { + if (!CallCheck() && in > Peekaboo()) totalRejected++; else - super.countIn(in); + super.CountIn(in); } } diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index c57f713a..77ba670e 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -11,22 +11,22 @@ public void countIn(int in) { Numbers[++total] = in; } - public boolean callCheck() { + public boolean CallCheck() { return total == -1; } - public boolean isFull() { + public boolean IsFull() { return total == 11; } - protected int peekaboo() { - if (callCheck()) + protected int Peekaboo() { + if (CallCheck()) return -1; return Numbers[total]; } - public int countOut() { - if (callCheck()) + public int CountOut() { + if (CallCheck()) return -1; return Numbers[total--]; } From c97ad095335584a084c56e28fb584f3df9d9c0b8 Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 9 May 2024 15:02:14 +0200 Subject: [PATCH 07/13] issue fix --- .metadata/.lock | 0 .metadata/.log | 41 + .metadata/.mylyn/.taskListIndex/segments_1 | Bin 0 -> 69 bytes .metadata/.mylyn/.taskListIndex/write.lock | 0 .metadata/.mylyn/repositories.xml.zip | Bin 0 -> 439 bytes .../.org.eclipse.egit.core.cmp/.location | Bin 0 -> 167 bytes .../.root/.indexes/history.version | 1 + .../.root/.indexes/properties.index | Bin 0 -> 57 bytes .../.root/.indexes/properties.version | 1 + .../org.eclipse.core.resources/.root/1.tree | Bin 0 -> 304 bytes .../.safetable/org.eclipse.core.resources | Bin 0 -> 606 bytes .../org.eclipse.e4.workbench/workbench.xmi | 2426 +++++++++++++++++ .../assumedExternalFilesCache | Bin 0 -> 4 bytes .../org.eclipse.jdt.core/externalFilesCache | Bin 0 -> 4 bytes .../org.eclipse.jdt.core/javaLikeNames.txt | 1 + .../org.eclipse.jdt.core/nonChainingJarsCache | Bin 0 -> 4 bytes .../variablesAndContainers.dat | Bin 0 -> 110 bytes .../org.eclipse.jdt.ui/OpenTypeHistory.xml | 2 + .../QualifiedTypeNameHistory.xml | 2 + .../org.eclipse.jdt.ui/dialog_settings.xml | 10 + .../org.eclipse.m2e.core/workspaceState.ser | Bin 0 -> 538 bytes .../.plugins/org.eclipse.m2e.logback/0.log | 1 + .../logback.2.2.1.20231030-1438.xml | 41 + .../org.eclipse.mylyn.github.ui/avatars.ser | Bin 0 -> 175 bytes .../org.eclipse.oomph.setup/workspace.setup | 6 + .../org.eclipse.tips.ide/dialog_settings.xml | 3 + .../org.eclipse.ui.ide/dialog_settings.xml | 12 + .../.plugins/org.eclipse.ui.intro/introstate | 2 + .../dialog_settings.xml | 3 + .../org.eclipse.ui.workbench/workingsets.xml | 6 + .metadata/version.ini | 3 + 31 files changed, 2561 insertions(+) create mode 100644 .metadata/.lock create mode 100644 .metadata/.log create mode 100644 .metadata/.mylyn/.taskListIndex/segments_1 create mode 100644 .metadata/.mylyn/.taskListIndex/write.lock create mode 100644 .metadata/.mylyn/repositories.xml.zip create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.root/1.tree create mode 100644 .metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources create mode 100644 .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi create mode 100644 .metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache create mode 100644 .metadata/.plugins/org.eclipse.jdt.core/externalFilesCache create mode 100644 .metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt create mode 100644 .metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache create mode 100644 .metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat create mode 100644 .metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml create mode 100644 .metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml create mode 100644 .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml create mode 100644 .metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser create mode 100644 .metadata/.plugins/org.eclipse.m2e.logback/0.log create mode 100644 .metadata/.plugins/org.eclipse.m2e.logback/logback.2.2.1.20231030-1438.xml create mode 100644 .metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser create mode 100644 .metadata/.plugins/org.eclipse.oomph.setup/workspace.setup create mode 100644 .metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml create mode 100644 .metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml create mode 100644 .metadata/.plugins/org.eclipse.ui.intro/introstate create mode 100644 .metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml create mode 100644 .metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml create mode 100644 .metadata/version.ini diff --git a/.metadata/.lock b/.metadata/.lock new file mode 100644 index 00000000..e69de29b diff --git a/.metadata/.log b/.metadata/.log new file mode 100644 index 00000000..fe48c926 --- /dev/null +++ b/.metadata/.log @@ -0,0 +1,41 @@ +!SESSION 2024-05-09 14:44:42.761 ----------------------------------------------- +eclipse.buildId=4.30.0.20231201-1200 +java.version=21.0.2 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2024-05-09 14:44:45.064 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY ch.qos.logback.classic 1 0 2024-05-09 14:45:00.075 +!MESSAGE Logback config file: C:\Users\student\Desktop\pio_git_rhymers\.metadata\.plugins\org.eclipse.m2e.logback\logback.2.2.1.20231030-1438.xml + +!ENTRY org.eclipse.jface 2 0 2024-05-09 14:45:01.934 +!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation. +!SUBENTRY 1 org.eclipse.jface 2 0 2024-05-09 14:45:01.934 +!MESSAGE A conflict occurred for CTRL+SHIFT+T: +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type, + Open a type in a Java editor, + Category(org.eclipse.ui.category.navigate,Navigate,null,true), + WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.navigate.open.type"), + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace, + , + Category(org.eclipse.lsp4e.category,Language Servers,null,true), + WorkbenchHandlerServiceHandler("org.eclipse.lsp4e.symbolinworkspace"), + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) + +!ENTRY org.eclipse.egit.ui 2 0 2024-05-09 14:45:05.550 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\student'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. diff --git a/.metadata/.mylyn/.taskListIndex/segments_1 b/.metadata/.mylyn/.taskListIndex/segments_1 new file mode 100644 index 0000000000000000000000000000000000000000..9eeaf5a0f08f87f4965d6d91c2e3d2035cd96bb0 GIT binary patch literal 69 zcmcD&o+HjtoSL4SnpaZHz`($zuRANH_R72C=kA<5{OJ9TrHqE091NU584zHCPzN+7 Ozksk97!)SVQ2+ozl@s#- literal 0 HcmV?d00001 diff --git a/.metadata/.mylyn/.taskListIndex/write.lock b/.metadata/.mylyn/.taskListIndex/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/.metadata/.mylyn/repositories.xml.zip b/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 0000000000000000000000000000000000000000..e64b47e7707a6807c47a3172b708a8b1c21f0a3e GIT binary patch literal 439 zcmWIWW@Zs#;Nak3SY5g@f&mE#0NF*U1^LC9CHX~}sl|E~xjActeS;4x2>jLNDetWM z6mV+UCPyuwhB>{x~n8wVr9O-1B($d@uXHH+7>`NY|AIdrW3s)-Lnp zd~ru4DBrU7)}7cp7p@j<6x>(ClD)^}u}Z}!feUOk?<%jCG-P^cmL6Pbv@>7|%W}K( z@kfs>)D*`Pxk9!%gi> z_gn%_XzpULe_kDUII3d5`MMvvg%Uv=A>HbJ6q|87N-^!>lc@lrljVT=)0sA zXP4v`=oe(>$ERnO#1~~$=7Qw)a#KqZQxZ!O_4NvJO4Bp*iuLo0()Ci4b21BxQ}t4T jYW0%yi&FLVunOxX=N2%afCCY~KZBhW__?Qgclj{@1&ljv literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 00000000..25cb955b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 0000000000000000000000000000000000000000..d23725117953ccb8c46434a9aa1306408ddc9166 GIT binary patch literal 57 zcmZQ%U|?WmVAN+|WMUA>FG|--P0q+8Xk5CFi6j7P+M6lqAOI7p3c^Cg)@p6sPK?q$ZW7 z>m}zGrP`Jhl>$w~p)M<>ga}o+MybT8s?4d((<@0V&Mwv~&4k*U0&<#bML}j!Vo7Fx z9*QI3mK&NIni`o}m>U@zm{{;~9f + + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration + + + + + + + + topLevel + + + Minimized + MinimizedByZoom + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.text.quicksearch.actionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewRecordCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.editorOnboardingImageUri:platform:/plugin/org.eclipse.jdt.ui/$nl$/icons/full/onboarding_jperspective.png + persp.editorOnboardingText:Open a file or drop files here to open them. + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.editorOnboardingCommand:Find Actions$$$Ctrl+3 + persp.editorOnboardingCommand:Show Key Assist$$$Ctrl+Shift+L + persp.editorOnboardingCommand:New$$$Ctrl+N + persp.editorOnboardingCommand:Open Type$$$Ctrl+Shift+T + persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks + persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.newWizSC:org.eclipse.m2e.core.wizards.Maven2ProjectWizard + persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet + persp.showIn:org.eclipse.eclemma.ui.CoverageView + persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.viewSC:org.eclipse.jdt.bcoview.views.BytecodeOutlineView + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.viewSC:org.eclipse.ant.ui.views.AntView + + + + org.eclipse.e4.primaryNavigationStack + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + + + + + + View + categoryTag:Mylyn + + + + org.eclipse.e4.secondaryNavigationStack + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Ant + + + + + + org.eclipse.e4.secondaryDataStack + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Terminal + + + + + + + + active + Maximized + + View + categoryTag:Help + + + View + categoryTag:General + + + View + categoryTag:Help + + + + + + + View + categoryTag:Help + + + + + + View + categoryTag:General + active + activeOnClose + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Help + + + + org.eclipse.e4.primaryDataStack + EditorStack + + + + + + + View + categoryTag:Java + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:Mylyn + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Git + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Ant + + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + Draggable + + + + + toolbarSeparator + + + + Draggable + + + Draggable + + + Draggable + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + + stretch + SHOW_RESTORE_MENU + + + Draggable + HIDEABLE + SHOW_RESTORE_MENU + + + + + stretch + + + Draggable + + + Draggable + + + + + TrimStack + Draggable + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor + removeOnHide + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + NoRestore + + + + + View + categoryTag:Git + + + + + View + categoryTag:Help + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Oomph + + + + + View + categoryTag:General + + + + + View + categoryTag:Version Control (Team) + + + + + View + categoryTag:Version Control (Team) + + + View + categoryTag:Help + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Other + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache new file mode 100644 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 GIT binary patch literal 4 LcmZQzU|;|M00aO5 literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache new file mode 100644 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 GIT binary patch literal 4 LcmZQzU|;|M00aO5 literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt new file mode 100644 index 00000000..85863977 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt @@ -0,0 +1 @@ +java \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 GIT binary patch literal 4 LcmZQzU|;|M00aO5 literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 0000000000000000000000000000000000000000..0edae4b20855dcd5c83bdac184b9ed16afb1b634 GIT binary patch literal 110 zcmZQzU|?c^05&ki?iJ)3@8jvj2;?y`aD#ZkLC!(`{vjX{CI&9AP(RO*cn^PHSC9ZR e16Tu435dtSzz2~A^5IHY8Q6V|;)7fR{22i=Q4xRu literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 00000000..a4ee3cbc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 00000000..9e390f50 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml new file mode 100644 index 00000000..48622854 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -0,0 +1,10 @@ + +
+
+ + + + + +
+
diff --git a/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser b/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser new file mode 100644 index 0000000000000000000000000000000000000000..abbf8e5211b6a04431b29bc5ab1269fb2676782d GIT binary patch literal 538 zcmc(bO-{ow5QRs9@+$-d#4%inEfPPi6oC|^stc9~;|z^cCw9j!O(n`PI0aW=QE>s- zus~daJCHP?RP0#c&3NAPeDmbTPpDafLrqoNGVs$kd9F}M%b0s z(TKH6p;PtPoUD&~PcI&T$p~71q&2yf;urE_eE0D7aT$BC6u?dupv4WpmP$H_*1={F z^IP5+IH?-v+#LM8>tKH%2@_16?ZZ8I0qjz#h4YNc+a7A_S;GaMkdrrD%%zrT zD*VQ6%p0X>GL!#gy~xChOzf1~D9=?}exE$=UA-=V=fj%PJoNJon$BR=MT9oeD$Hk( Tj$wL+D|y)}uGy5k_)o?cALX5n literal 0 HcmV?d00001 diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/0.log b/.metadata/.plugins/org.eclipse.m2e.logback/0.log new file mode 100644 index 00000000..a5ca78e0 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback/0.log @@ -0,0 +1 @@ +2024-05-09 14:45:05,303 [Worker-5: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.2.1.20231030-1438.xml b/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.2.1.20231030-1438.xml new file mode 100644 index 00000000..9effde76 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.2.1.20231030-1438.xml @@ -0,0 +1,41 @@ + + + + %date [%thread] %-5level %logger{35} - %msg%n + + + ${org.eclipse.m2e.log.console.threshold:-OFF} + + + + + ${org.eclipse.m2e.log.dir}/0.log + + ${org.eclipse.m2e.log.dir}/%i.log + 1 + 10 + + + 10MB + + + %date [%thread] %-5level %logger{35} - %msg%n + + + + + + WARN + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser b/.metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser new file mode 100644 index 0000000000000000000000000000000000000000..1e9a069ce2c81f1416dddc1758ee55385f17251d GIT binary patch literal 175 zcmZ4UmVvdnh`}JgC|xf#IVZEAI8`sVGN&?6FEg(swJ0w!M=w3IB%?G*uQXH7u`ID9 zu_(ACzbJL`{gq3@erB~ZF);ctuqT2gic1*yeX@XT{nC=m9DU!!0_%zbpy7fbF+Gr& zo=0MF22h-p{no+5VhI + diff --git a/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml new file mode 100644 index 00000000..5ca0b776 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml new file mode 100644 index 00000000..fc7dad10 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -0,0 +1,12 @@ + +
+
+ + + + + + + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.intro/introstate b/.metadata/.plugins/org.eclipse.ui.intro/introstate new file mode 100644 index 00000000..02f134f0 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.intro/introstate @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 00000000..5ca0b776 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 00000000..08bf541f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.metadata/version.ini b/.metadata/version.ini new file mode 100644 index 00000000..e7c37daf --- /dev/null +++ b/.metadata/version.ini @@ -0,0 +1,3 @@ +#Thu May 09 14:44:59 CEST 2024 +org.eclipse.core.runtime=2 +org.eclipse.platform=4.30.0.v20231201-0110 From 29de43a11fbddd9e0ee9f4eea8925cbeabe09f5a Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 9 May 2024 15:15:00 +0200 Subject: [PATCH 08/13] issues fixed on constants --- .../java/edu/kis/vh/nursery/HanoiRhymer.java | 2 ++ .../vh/nursery/defaultCountingOutRhymer.java | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java index af91b847..58b4e9b5 100644 --- a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java @@ -8,6 +8,8 @@ public int ReportRejected() { return totalRejected; } + @Override + public void CountIn(int in) { if (!CallCheck() && in > Peekaboo()) totalRejected++; diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index 77ba670e..b6ab26ff 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -1,10 +1,15 @@ package edu.kis.vh.nursery; + + public static int TOTAL_NUMBER = 12; + public static final int EMPT = -1; + public static int MAX_CAPACIT = TOTAL_NUMBER; + public class DefaultCountingOutRhymer { - private int[] Numbers = new int[12]; + private int[] Numbers = new int[TOTAL_NUMBER]; - public int total = -1; + public int total = EMPT; public void countIn(int in) { if (!isFull()) @@ -12,22 +17,22 @@ public void countIn(int in) { } public boolean CallCheck() { - return total == -1; + return total == EMPT; } public boolean IsFull() { - return total == 11; + return total == TOTAL_NUMBER; } protected int Peekaboo() { if (CallCheck()) - return -1; + return EMPT; return Numbers[total]; } public int CountOut() { if (CallCheck()) - return -1; + return EMPT; return Numbers[total--]; } From 325b9b1f96d48a3849aa4039e00cb1a28358ad25 Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 23 May 2024 11:39:48 +0200 Subject: [PATCH 09/13] visibility changes --- src/main/java/edu/kis/vh/nursery/FIFORhymer.java | 2 +- src/main/java/edu/kis/vh/nursery/HanoiRhymer.java | 2 +- .../kis/vh/nursery/defaultCountingOutRhymer.java | 14 +++++++------- .../edu/kis/vh/nursery/list/IntLinkedList.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java index b8ad7f34..ecafb89e 100644 --- a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java +++ b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java @@ -2,7 +2,7 @@ public class FIFORhymer extends DefaultCountingOutRhymer { - public DefaultCountingOutRhymer temp = new DefaultCountingOutRhymer(); + private final DefaultCountingOutRhymer temp = new DefaultCountingOutRhymer(); @Override public int CountOut() { diff --git a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java index 58b4e9b5..6cfaef83 100644 --- a/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/HanoiRhymer.java @@ -2,7 +2,7 @@ public class HanoiRhymer extends DefaultCountingOutRhymer { -int totalRejected = 0; +private int totalRejected = 0; public int ReportRejected() { return totalRejected; diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index b6ab26ff..e5748f6e 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -1,15 +1,15 @@ package edu.kis.vh.nursery; - public static int TOTAL_NUMBER = 12; - public static final int EMPT = -1; - public static int MAX_CAPACIT = TOTAL_NUMBER; - + private static final int TOTAL_NUMBER = 12; + private static final int EMPTY = -1; + private static final int MAX_CAPACITY = TOTAL_NUMBER; + public class DefaultCountingOutRhymer { - private int[] Numbers = new int[TOTAL_NUMBER]; - - public int total = EMPT; + private final int[] Numbers = new int[TOTAL_NUMBER]; + + private int total = EMPT; public void countIn(int in) { if (!isFull()) diff --git a/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java b/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java index 07efc0a2..af3427fd 100644 --- a/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java +++ b/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java @@ -2,8 +2,8 @@ public class IntLinkedList { - Node last; - int i; + private Node last; + private int i; public void push(int i) { if (last == null) From 1d685902fb6c9adf38e4c0ea01b7d90c4b2e8e40 Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 23 May 2024 11:45:51 +0200 Subject: [PATCH 10/13] getters generation --- src/main/java/edu/kis/vh/nursery/FIFORhymer.java | 1 + src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java index ecafb89e..1f806d57 100644 --- a/src/main/java/edu/kis/vh/nursery/FIFORhymer.java +++ b/src/main/java/edu/kis/vh/nursery/FIFORhymer.java @@ -17,5 +17,6 @@ public int CountOut() { CountIn(temp.CountOut()); return ret; + } } diff --git a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java index e5748f6e..950f894a 100644 --- a/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java +++ b/src/main/java/edu/kis/vh/nursery/defaultCountingOutRhymer.java @@ -15,6 +15,9 @@ public void countIn(int in) { if (!isFull()) Numbers[++total] = in; } + public int getTotal() { + return total; +} public boolean CallCheck() { return total == EMPT; From 10c7067f5a96bcd89113adea959292405800d16b Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 23 May 2024 11:50:05 +0200 Subject: [PATCH 11/13] hermetyzacja --- .../kis/vh/nursery/list/IntLinkedList.java | 1 + .../java/edu/kis/vh/nursery/list/Node.java | 34 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java b/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java index af3427fd..0a07af8f 100644 --- a/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java +++ b/src/main/java/edu/kis/vh/nursery/list/IntLinkedList.java @@ -15,6 +15,7 @@ public void push(int i) { } } + public boolean isEmpty() { return last == null; } diff --git a/src/main/java/edu/kis/vh/nursery/list/Node.java b/src/main/java/edu/kis/vh/nursery/list/Node.java index 0a2cd75e..3e742c91 100644 --- a/src/main/java/edu/kis/vh/nursery/list/Node.java +++ b/src/main/java/edu/kis/vh/nursery/list/Node.java @@ -2,10 +2,38 @@ public class Node { - public int value; - public Node prev, next; + private int value; + private Node prev, next; - public Node(int i) { +public Node(int value) { + this.value = value; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public Node getPrev() { + return prev; + } + + public void setPrev(Node prev) { + this.prev = prev; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + public Node(int i) { value = i; } From 060147207077a279c0d06b61c10d8711748d086f Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 23 May 2024 11:53:33 +0200 Subject: [PATCH 12/13] hermetyzacja --- src/main/java/edu/kis/vh/nursery/list/Node.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/kis/vh/nursery/list/Node.java b/src/main/java/edu/kis/vh/nursery/list/Node.java index 3e742c91..78c71bd9 100644 --- a/src/main/java/edu/kis/vh/nursery/list/Node.java +++ b/src/main/java/edu/kis/vh/nursery/list/Node.java @@ -13,6 +13,8 @@ public int getValue() { return value; } + + public void setValue(int value) { this.value = value; } @@ -21,7 +23,7 @@ public Node getPrev() { return prev; } - public void setPrev(Node prev) { + public void setPrev(Node prev) { this.prev = prev; } From e22be4fa451fb3e426f1ef2e9ac75e010f211d41 Mon Sep 17 00:00:00 2001 From: miraslauuu <248655@edu.p.lodz.pl> Date: Thu, 23 May 2024 11:55:12 +0200 Subject: [PATCH 13/13] removing unused setters --- src/main/java/edu/kis/vh/nursery/list/Node.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/edu/kis/vh/nursery/list/Node.java b/src/main/java/edu/kis/vh/nursery/list/Node.java index 78c71bd9..df7af96e 100644 --- a/src/main/java/edu/kis/vh/nursery/list/Node.java +++ b/src/main/java/edu/kis/vh/nursery/list/Node.java @@ -15,26 +15,19 @@ public int getValue() { - public void setValue(int value) { - this.value = value; - } + public Node getPrev() { return prev; } - public void setPrev(Node prev) { - this.prev = prev; - } + public Node getNext() { return next; } - public void setNext(Node next) { - this.next = next; - } - + public Node(int i) { value = i; }