Brandon Defrancis 6 jaren geleden
bovenliggende
commit
f92c86b3fa
3 gewijzigde bestanden met toevoegingen van 169 en 59 verwijderingen
  1. 109
    59
      arraz/.idea/workspace.xml
  2. 30
    0
      arraz/src/main/java/MinMax.java
  3. 30
    0
      arraz/src/main/java/OddEven.java

+ 109
- 59
arraz/.idea/workspace.xml Bestand weergeven

@@ -2,16 +2,9 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="14b40778-1ff7-45a6-b9a6-ec49ada97c90" name="Default Changelist" comment="">
5
-      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
7
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
8
-      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
9
-      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
10
-      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
11
-      <change beforePath="$PROJECT_DIR$/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz.iml" afterDir="false" />
12
-      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
13
-      <change beforePath="$PROJECT_DIR$/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Arraz.java" afterDir="false" />
14
-      <change beforePath="$PROJECT_DIR$/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/ArrazTest.java" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/MinMax.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/src/main/java/OddEven.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
15 8
     </list>
16 9
     <ignored path="$PROJECT_DIR$/target/" />
17 10
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -24,37 +17,38 @@
24 17
     <session id="70438997">
25 18
       <usages-collector id="statistics.lifecycle.project">
26 19
         <counts>
27
-          <entry key="project.closed" value="7" />
20
+          <entry key="project.closed" value="10" />
28 21
           <entry key="project.open.time.0" value="1" />
29 22
           <entry key="project.open.time.1" value="4" />
23
+          <entry key="project.open.time.3" value="3" />
30 24
           <entry key="project.open.time.7" value="1" />
31
-          <entry key="project.open.time.8" value="1" />
32
-          <entry key="project.opened" value="7" />
25
+          <entry key="project.open.time.8" value="2" />
26
+          <entry key="project.opened" value="11" />
33 27
         </counts>
34 28
       </usages-collector>
35 29
       <usages-collector id="statistics.file.extensions.open">
36 30
         <counts>
37 31
           <entry key="class" value="7" />
38
-          <entry key="java" value="3" />
32
+          <entry key="java" value="5" />
39 33
           <entry key="xml" value="1" />
40 34
         </counts>
41 35
       </usages-collector>
42 36
       <usages-collector id="statistics.file.types.open">
43 37
         <counts>
44 38
           <entry key="CLASS" value="7" />
45
-          <entry key="JAVA" value="3" />
39
+          <entry key="JAVA" value="5" />
46 40
           <entry key="XML" value="1" />
47 41
         </counts>
48 42
       </usages-collector>
49 43
       <usages-collector id="statistics.file.extensions.edit">
50 44
         <counts>
51
-          <entry key="java" value="7860" />
45
+          <entry key="java" value="7946" />
52 46
           <entry key="xml" value="2" />
53 47
         </counts>
54 48
       </usages-collector>
55 49
       <usages-collector id="statistics.file.types.edit">
56 50
         <counts>
57
-          <entry key="JAVA" value="7860" />
51
+          <entry key="JAVA" value="7946" />
58 52
           <entry key="XML" value="2" />
59 53
         </counts>
60 54
       </usages-collector>
@@ -67,12 +61,10 @@
67 61
           <file pinned="false" current-in-tab="true">
68 62
             <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
69 63
               <provider selected="true" editor-type-id="text-editor">
70
-                <state relative-caret-position="1987">
71
-                  <caret line="183" column="17" selection-start-line="183" selection-start-column="17" selection-end-line="183" selection-end-column="17" />
64
+                <state relative-caret-position="657">
65
+                  <caret line="287" column="20" selection-start-line="287" selection-start-column="20" selection-end-line="287" selection-end-column="20" />
72 66
                   <folding>
73 67
                     <element signature="imports" expanded="true" />
74
-                    <element signature="e#465#466#0" expanded="true" />
75
-                    <element signature="e#528#529#0" expanded="true" />
76 68
                   </folding>
77 69
                 </state>
78 70
               </provider>
@@ -91,17 +83,42 @@
91 83
       </split-first>
92 84
       <split-second>
93 85
         <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
94
-          <file pinned="false" current-in-tab="true">
86
+          <file pinned="false" current-in-tab="false">
95 87
             <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
96 88
               <provider selected="true" editor-type-id="text-editor">
97
-                <state relative-caret-position="3015">
98
-                  <caret line="209" column="4" selection-start-line="209" selection-start-column="4" selection-end-line="209" selection-end-column="4" />
89
+                <state relative-caret-position="4951">
90
+                  <caret line="448" column="5" selection-start-line="448" selection-start-column="5" selection-end-line="448" selection-end-column="5" />
99 91
                   <folding>
100 92
                     <element signature="imports" expanded="true" />
101
-                    <element signature="e#7436#7437#0" expanded="true" />
102
-                    <element signature="e#7501#7502#0" expanded="true" />
103
-                    <element signature="e#7735#7736#0" expanded="true" />
104
-                    <element signature="e#7803#7804#0" expanded="true" />
93
+                  </folding>
94
+                </state>
95
+              </provider>
96
+            </entry>
97
+          </file>
98
+          <file pinned="false" current-in-tab="false">
99
+            <entry file="file://$PROJECT_DIR$/src/main/java/OddEven.java">
100
+              <provider selected="true" editor-type-id="text-editor">
101
+                <state relative-caret-position="420">
102
+                  <caret line="28" lean-forward="true" selection-start-line="28" selection-end-line="28" />
103
+                  <folding>
104
+                    <element signature="e#193#194#0" expanded="true" />
105
+                    <element signature="e#219#220#0" expanded="true" />
106
+                    <element signature="e#247#248#0" expanded="true" />
107
+                    <element signature="e#274#275#0" expanded="true" />
108
+                  </folding>
109
+                </state>
110
+              </provider>
111
+            </entry>
112
+          </file>
113
+          <file pinned="false" current-in-tab="true">
114
+            <entry file="file://$PROJECT_DIR$/src/main/java/MinMax.java">
115
+              <provider selected="true" editor-type-id="text-editor">
116
+                <state relative-caret-position="150">
117
+                  <caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
118
+                  <folding>
119
+                    <element signature="e#203#204#0" expanded="true" />
120
+                    <element signature="e#230#231#0" expanded="true" />
121
+                    <element signature="e#256#257#0" expanded="true" />
105 122
                   </folding>
106 123
                 </state>
107 124
               </provider>
@@ -111,6 +128,13 @@
111 128
       </split-second>
112 129
     </splitter>
113 130
   </component>
131
+  <component name="FileTemplateManagerImpl">
132
+    <option name="RECENT_TEMPLATES">
133
+      <list>
134
+        <option value="Class" />
135
+      </list>
136
+    </option>
137
+  </component>
114 138
   <component name="Git.Settings">
115 139
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
116 140
   </component>
@@ -118,8 +142,10 @@
118 142
     <option name="CHANGED_PATHS">
119 143
       <list>
120 144
         <option value="$PROJECT_DIR$/pom.xml" />
121
-        <option value="$PROJECT_DIR$/src/main/java/Arraz.java" />
122 145
         <option value="$PROJECT_DIR$/src/test/java/ArrazTest.java" />
146
+        <option value="$PROJECT_DIR$/src/main/java/Arraz.java" />
147
+        <option value="$PROJECT_DIR$/src/main/java/OddEven.java" />
148
+        <option value="$PROJECT_DIR$/src/main/java/MinMax.java" />
123 149
       </list>
124 150
     </option>
125 151
   </component>
@@ -136,10 +162,11 @@
136 162
       </MavenImportingSettings>
137 163
     </option>
138 164
   </component>
139
-  <component name="ProjectFrameBounds" extendedState="6">
140
-    <option name="y" value="23" />
141
-    <option name="width" value="1440" />
142
-    <option name="height" value="826" />
165
+  <component name="ProjectFrameBounds">
166
+    <option name="x" value="-119" />
167
+    <option name="y" value="-1057" />
168
+    <option name="width" value="1894" />
169
+    <option name="height" value="1006" />
143 170
   </component>
144 171
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
145 172
   <component name="ProjectView">
@@ -148,7 +175,6 @@
148 175
     </navigator>
149 176
     <panes>
150 177
       <pane id="PackagesPane" />
151
-      <pane id="Scope" />
152 178
       <pane id="ProjectPane">
153 179
         <subPane>
154 180
           <expand>
@@ -191,13 +217,14 @@
191 217
           <select />
192 218
         </subPane>
193 219
       </pane>
220
+      <pane id="Scope" />
194 221
     </panes>
195 222
   </component>
196 223
   <component name="PropertiesComponent">
197 224
     <property name="WebServerToolWindowFactoryState" value="false" />
198 225
     <property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
199 226
     <property name="aspect.path.notification.shown" value="true" />
200
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544221195198" />
227
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544449685203" />
201 228
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
202 229
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
203 230
     <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
@@ -228,7 +255,7 @@
228 255
       </list>
229 256
     </option>
230 257
   </component>
231
-  <component name="RunManager" selected="JUnit.ArrazTest">
258
+  <component name="RunManager" selected="JUnit.ArrazTest.removeDupeFromArrayTest2">
232 259
     <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
233 260
       <module name="arraz" />
234 261
       <option name="PACKAGE_NAME" value="" />
@@ -257,11 +284,11 @@
257 284
         <option name="Make" enabled="true" />
258 285
       </method>
259 286
     </configuration>
260
-    <configuration name="ArrazTest.oddsArrayTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
287
+    <configuration name="ArrazTest.removeDupeFromArrayTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
261 288
       <module name="arraz" />
262 289
       <option name="PACKAGE_NAME" value="" />
263 290
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
264
-      <option name="METHOD_NAME" value="oddsArrayTest" />
291
+      <option name="METHOD_NAME" value="removeDupeFromArrayTest2" />
265 292
       <option name="TEST_OBJECT" value="method" />
266 293
       <method v="2">
267 294
         <option name="Make" enabled="true" />
@@ -280,17 +307,17 @@
280 307
     <list>
281 308
       <item itemvalue="JUnit.ArrazTest.sortArrayIntoEvensThenOddstest" />
282 309
       <item itemvalue="JUnit.ArrazTest.mergeArraysTest" />
283
-      <item itemvalue="JUnit.ArrazTest.oddsArrayTest" />
284 310
       <item itemvalue="JUnit.ArrazTest.makeMeAnArrayFromArrayList" />
285 311
       <item itemvalue="JUnit.ArrazTest" />
312
+      <item itemvalue="JUnit.ArrazTest.removeDupeFromArrayTest2" />
286 313
     </list>
287 314
     <recent_temporary>
288 315
       <list>
316
+        <item itemvalue="JUnit.ArrazTest.removeDupeFromArrayTest2" />
289 317
         <item itemvalue="JUnit.ArrazTest" />
290 318
         <item itemvalue="JUnit.ArrazTest.makeMeAnArrayFromArrayList" />
291 319
         <item itemvalue="JUnit.ArrazTest.sortArrayIntoEvensThenOddstest" />
292 320
         <item itemvalue="JUnit.ArrazTest.mergeArraysTest" />
293
-        <item itemvalue="JUnit.ArrazTest.oddsArrayTest" />
294 321
       </list>
295 322
     </recent_temporary>
296 323
   </component>
@@ -311,13 +338,14 @@
311 338
       <workItem from="1544188517785" duration="17334000" />
312 339
       <workItem from="1544211958720" duration="91000" />
313 340
       <workItem from="1544216171486" duration="4638000" />
341
+      <workItem from="1544292209130" duration="470000" />
342
+      <workItem from="1544389019575" duration="774000" />
343
+      <workItem from="1544393824470" duration="214000" />
344
+      <workItem from="1544449342392" duration="341000" />
314 345
     </task>
315 346
     <servers />
316 347
   </component>
317 348
   <component name="TestHistory">
318
-    <history-entry file="ArrazTest_evensArrayTest - 2018.12.07 at 16h 47m 50s.xml">
319
-      <configuration name="ArrazTest.evensArrayTest" configurationId="JUnit" />
320
-    </history-entry>
321 349
     <history-entry file="ArrazTest_oddsArrayTest - 2018.12.07 at 16h 47m 53s.xml">
322 350
       <configuration name="ArrazTest.oddsArrayTest" configurationId="JUnit" />
323 351
     </history-entry>
@@ -345,15 +373,18 @@
345 373
     <history-entry file="ArrazTest - 2018.12.07 at 17h 19m 57s.xml">
346 374
       <configuration name="ArrazTest" configurationId="JUnit" />
347 375
     </history-entry>
376
+    <history-entry file="ArrazTest_removeDupeFromArrayTest2 - 2018.12.09 at 15h 59m 46s.xml">
377
+      <configuration name="ArrazTest.removeDupeFromArrayTest2" configurationId="JUnit" />
378
+    </history-entry>
348 379
   </component>
349 380
   <component name="TimeTrackingManager">
350
-    <option name="totallyTimeSpent" value="42905000" />
381
+    <option name="totallyTimeSpent" value="44704000" />
351 382
   </component>
352 383
   <component name="ToolWindowManager">
353
-    <frame x="0" y="23" width="1440" height="826" extended-state="6" />
384
+    <frame x="-119" y="-1057" width="1894" height="1006" extended-state="0" />
354 385
     <editor active="true" />
355 386
     <layout>
356
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14306152" />
387
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.11447084" />
357 388
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
358 389
       <window_info id="Image Layers" order="2" />
359 390
       <window_info id="Designer" order="3" />
@@ -411,6 +442,16 @@
411 442
         </state>
412 443
       </provider>
413 444
     </entry>
445
+    <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
446
+      <provider selected="true" editor-type-id="text-editor">
447
+        <state relative-caret-position="657">
448
+          <caret line="287" column="20" selection-start-line="287" selection-start-column="20" selection-end-line="287" selection-end-column="20" />
449
+          <folding>
450
+            <element signature="imports" expanded="true" />
451
+          </folding>
452
+        </state>
453
+      </provider>
454
+    </entry>
414 455
     <entry file="file://$PROJECT_DIR$/pom.xml">
415 456
       <provider selected="true" editor-type-id="text-editor">
416 457
         <state relative-caret-position="255">
@@ -418,28 +459,37 @@
418 459
         </state>
419 460
       </provider>
420 461
     </entry>
421
-    <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
462
+    <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
422 463
       <provider selected="true" editor-type-id="text-editor">
423
-        <state relative-caret-position="1987">
424
-          <caret line="183" column="17" selection-start-line="183" selection-start-column="17" selection-end-line="183" selection-end-column="17" />
464
+        <state relative-caret-position="4951">
465
+          <caret line="448" column="5" selection-start-line="448" selection-start-column="5" selection-end-line="448" selection-end-column="5" />
425 466
           <folding>
426 467
             <element signature="imports" expanded="true" />
427
-            <element signature="e#465#466#0" expanded="true" />
428
-            <element signature="e#528#529#0" expanded="true" />
429 468
           </folding>
430 469
         </state>
431 470
       </provider>
432 471
     </entry>
433
-    <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
472
+    <entry file="file://$PROJECT_DIR$/src/main/java/OddEven.java">
434 473
       <provider selected="true" editor-type-id="text-editor">
435
-        <state relative-caret-position="3015">
436
-          <caret line="209" column="4" selection-start-line="209" selection-start-column="4" selection-end-line="209" selection-end-column="4" />
474
+        <state relative-caret-position="420">
475
+          <caret line="28" lean-forward="true" selection-start-line="28" selection-end-line="28" />
437 476
           <folding>
438
-            <element signature="imports" expanded="true" />
439
-            <element signature="e#7436#7437#0" expanded="true" />
440
-            <element signature="e#7501#7502#0" expanded="true" />
441
-            <element signature="e#7735#7736#0" expanded="true" />
442
-            <element signature="e#7803#7804#0" expanded="true" />
477
+            <element signature="e#193#194#0" expanded="true" />
478
+            <element signature="e#219#220#0" expanded="true" />
479
+            <element signature="e#247#248#0" expanded="true" />
480
+            <element signature="e#274#275#0" expanded="true" />
481
+          </folding>
482
+        </state>
483
+      </provider>
484
+    </entry>
485
+    <entry file="file://$PROJECT_DIR$/src/main/java/MinMax.java">
486
+      <provider selected="true" editor-type-id="text-editor">
487
+        <state relative-caret-position="150">
488
+          <caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
489
+          <folding>
490
+            <element signature="e#203#204#0" expanded="true" />
491
+            <element signature="e#230#231#0" expanded="true" />
492
+            <element signature="e#256#257#0" expanded="true" />
443 493
           </folding>
444 494
         </state>
445 495
       </provider>

+ 30
- 0
arraz/src/main/java/MinMax.java Bestand weergeven

@@ -0,0 +1,30 @@
1
+import java.util.Objects;
2
+
3
+public class MinMax {
4
+
5
+    private int Min;
6
+    private int Max;
7
+
8
+    public MinMax(int min, int max) {
9
+        Min = min;
10
+        Max = max;
11
+    }
12
+
13
+    public int getMin() {
14
+        return Min;
15
+    }
16
+
17
+    public int getMax() {
18
+        return Max;
19
+    }
20
+
21
+    @Override
22
+    public boolean equals(Object o) {
23
+        if (this == o) return true;
24
+        if (o == null || getClass() != o.getClass()) return false;
25
+        MinMax minMax = (MinMax) o;
26
+        return Min == minMax.Min &&
27
+                Max == minMax.Max;
28
+    }
29
+
30
+}

+ 30
- 0
arraz/src/main/java/OddEven.java Bestand weergeven

@@ -0,0 +1,30 @@
1
+import java.util.Objects;
2
+
3
+public class OddEven {
4
+
5
+    private int odd;
6
+    private int even;
7
+
8
+    public OddEven(int odd, int even) {
9
+        this.odd = odd;
10
+        this.even = even;
11
+    }
12
+
13
+    public int getOdd() {
14
+        return odd;
15
+    }
16
+
17
+    public int getEven() {
18
+        return even;
19
+    }
20
+
21
+    @Override
22
+    public boolean equals(Object o) {
23
+        if (this == o) return true;
24
+        if (o == null || getClass() != o.getClass()) return false;
25
+        OddEven oddEven = (OddEven) o;
26
+        return odd == oddEven.odd &&
27
+                even == oddEven.even;
28
+    }
29
+
30
+}