Nuridalia.Hernandez 6 vuotta sitten
vanhempi
commit
0fe0dd55aa

+ 1
- 1
.idea/compiler.xml Näytä tiedosto

@@ -10,7 +10,7 @@
10 10
       </profile>
11 11
     </annotationProcessing>
12 12
     <bytecodeTargetLevel>
13
-      <module name="arraz" target="1.5" />
13
+      <module name="arraz" target="6" />
14 14
     </bytecodeTargetLevel>
15 15
   </component>
16 16
 </project>

+ 4
- 0
.idea/encodings.xml Näytä tiedosto

@@ -0,0 +1,4 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
+</project>

+ 138
- 147
.idea/workspace.xml Näytä tiedosto

@@ -2,11 +2,14 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
-      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
7 8
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8 9
       <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/arraz/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/pom.xml" afterDir="false" />
9 11
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
10 13
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
11 14
     </list>
12 15
     <ignored path="$PROJECT_DIR$/arraz/target/" />
@@ -16,78 +19,36 @@
16 19
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
17 20
     <option name="LAST_RESOLUTION" value="IGNORE" />
18 21
   </component>
19
-  <component name="FUSProjectUsageTrigger">
20
-    <session id="-1521478867">
21
-      <usages-collector id="statistics.lifecycle.project">
22
-        <counts>
23
-          <entry key="project.open.time.1" value="1" />
24
-          <entry key="project.opened" value="1" />
25
-        </counts>
26
-      </usages-collector>
27
-      <usages-collector id="statistics.file.extensions.edit">
28
-        <counts>
29
-          <entry key="java" value="2310" />
30
-        </counts>
31
-      </usages-collector>
32
-      <usages-collector id="statistics.file.types.edit">
33
-        <counts>
34
-          <entry key="JAVA" value="2310" />
35
-        </counts>
36
-      </usages-collector>
37
-      <usages-collector id="statistics.file.extensions.open">
38
-        <counts>
39
-          <entry key="java" value="3" />
40
-        </counts>
41
-      </usages-collector>
42
-      <usages-collector id="statistics.file.types.open">
43
-        <counts>
44
-          <entry key="JAVA" value="3" />
45
-        </counts>
46
-      </usages-collector>
47
-    </session>
48
-  </component>
49 22
   <component name="FileEditorManager">
50 23
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
51 24
       <file pinned="false" current-in-tab="false">
52
-        <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
53
-          <provider selected="true" editor-type-id="text-editor" />
54
-        </entry>
55
-      </file>
56
-      <file pinned="false" current-in-tab="true">
57 25
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
58 26
           <provider selected="true" editor-type-id="text-editor">
59
-            <state relative-caret-position="263">
60
-              <caret line="128" lean-forward="true" selection-start-line="128" selection-end-line="128" />
27
+            <state relative-caret-position="278">
28
+              <caret line="256" column="45" selection-start-line="256" selection-start-column="17" selection-end-line="256" selection-end-column="45" />
61 29
               <folding>
62
-                <element signature="imports" expanded="true" />
63
-                <element signature="e#468#469#0" expanded="true" />
64
-                <element signature="e#492#493#0" expanded="true" />
30
+                <element signature="e#5834#5835#0" expanded="true" />
31
+                <element signature="e#5891#5892#0" expanded="true" />
32
+                <element signature="e#6824#6833#0" expanded="true" />
33
+                <element signature="e#6877#6886#0" expanded="true" />
65 34
               </folding>
66 35
             </state>
67 36
           </provider>
68 37
         </entry>
69 38
       </file>
70
-      <file pinned="false" current-in-tab="false">
39
+      <file pinned="false" current-in-tab="true">
71 40
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
72 41
           <provider selected="true" editor-type-id="text-editor">
73
-            <state relative-caret-position="308">
74
-              <caret line="115" selection-start-line="115" selection-end-line="115" />
42
+            <state relative-caret-position="274">
43
+              <caret line="428" column="43" selection-start-line="428" selection-start-column="43" selection-end-line="428" selection-end-column="43" />
75 44
               <folding>
76 45
                 <element signature="imports" expanded="true" />
46
+                <element signature="e#8533#8542#0" expanded="true" />
77 47
               </folding>
78 48
             </state>
79 49
           </provider>
80 50
         </entry>
81 51
       </file>
82
-      <file pinned="false" current-in-tab="false">
83
-        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
84
-          <provider selected="true" editor-type-id="text-editor">
85
-            <state relative-caret-position="60">
86
-              <caret line="4" column="41" selection-start-line="4" selection-start-column="41" selection-end-line="4" selection-end-column="41" />
87
-            </state>
88
-          </provider>
89
-        </entry>
90
-      </file>
91 52
     </leaf>
92 53
   </component>
93 54
   <component name="FileTemplateManagerImpl">
@@ -101,29 +62,17 @@
101 62
   <component name="Git.Settings">
102 63
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
103 64
   </component>
104
-  <component name="GradleLocalSettings">
105
-    <option name="projectSyncType">
106
-      <map>
107
-        <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
108
-      </map>
109
-    </option>
110
-  </component>
111 65
   <component name="IdeDocumentHistory">
112 66
     <option name="CHANGED_PATHS">
113 67
       <list>
114 68
         <option value="$PROJECT_DIR$/README.md" />
115
-        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
69
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
116 70
         <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
117 71
         <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
72
+        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
118 73
       </list>
119 74
     </option>
120 75
   </component>
121
-  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
122
-  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
123
-  <component name="JsGulpfileManager">
124
-    <detection-done>true</detection-done>
125
-    <sorting>DEFINITION_ORDER</sorting>
126
-  </component>
127 76
   <component name="MavenImportPreferences">
128 77
     <option name="importingSettings">
129 78
       <MavenImportingSettings>
@@ -132,7 +81,7 @@
132 81
     </option>
133 82
   </component>
134 83
   <component name="ProjectFrameBounds">
135
-    <option name="y" value="23" />
84
+    <option name="y" value="26" />
136 85
     <option name="width" value="1280" />
137 86
     <option name="height" value="713" />
138 87
   </component>
@@ -198,15 +147,15 @@
198 147
           <select />
199 148
         </subPane>
200 149
       </pane>
201
-      <pane id="PackagesPane" />
202 150
       <pane id="Scope" />
151
+      <pane id="PackagesPane" />
203 152
     </panes>
204 153
   </component>
205 154
   <component name="PropertiesComponent">
206 155
     <property name="GO_FMT" value="false" />
207 156
     <property name="WebServerToolWindowFactoryState" value="false" />
208 157
     <property name="aspect.path.notification.shown" value="true" />
209
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544070069932" />
158
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544325400918" />
210 159
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
211 160
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
212 161
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
@@ -233,8 +182,8 @@
233 182
       </list>
234 183
     </option>
235 184
   </component>
236
-  <component name="RunManager" selected="JUnit.ArrazTest.testReverseArray">
237
-    <configuration default="true" type="Applet" factoryName="Applet">
185
+  <component name="RunManager" selected="JUnit.ArrazTest.test1findSmallerAndSecondSmaller">
186
+    <configuration default="true" type="Applet">
238 187
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
239 188
       <method v="2">
240 189
         <option name="Make" enabled="true" />
@@ -246,55 +195,53 @@
246 195
         <option name="Make" enabled="true" />
247 196
       </method>
248 197
     </configuration>
249
-    <configuration name="ArrazTest.test1AverageOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
198
+    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
250 199
       <module name="arraz" />
251 200
       <option name="PACKAGE_NAME" value="" />
252 201
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
253
-      <option name="METHOD_NAME" value="test1AverageOfArray" />
254
-      <option name="TEST_OBJECT" value="method" />
255 202
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
256 203
       <method v="2">
257 204
         <option name="Make" enabled="true" />
258 205
       </method>
259 206
     </configuration>
260
-    <configuration name="ArrazTest.test1DoubleAverageOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
207
+    <configuration name="ArrazTest.test1FindValueAt" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
261 208
       <module name="arraz" />
262 209
       <option name="PACKAGE_NAME" value="" />
263 210
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
264
-      <option name="METHOD_NAME" value="test1DoubleAverageOfArray" />
211
+      <option name="METHOD_NAME" value="test1FindValueAt" />
265 212
       <option name="TEST_OBJECT" value="method" />
266 213
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
267 214
       <method v="2">
268 215
         <option name="Make" enabled="true" />
269 216
       </method>
270 217
     </configuration>
271
-    <configuration name="ArrazTest.test2AverageOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
218
+    <configuration name="ArrazTest.test1findSmallerAndSecondSmaller" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272 219
       <module name="arraz" />
273 220
       <option name="PACKAGE_NAME" value="" />
274 221
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
275
-      <option name="METHOD_NAME" value="test2AverageOfArray" />
222
+      <option name="METHOD_NAME" value="test1findSmallerAndSecondSmaller" />
276 223
       <option name="TEST_OBJECT" value="method" />
277 224
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
278 225
       <method v="2">
279 226
         <option name="Make" enabled="true" />
280 227
       </method>
281 228
     </configuration>
282
-    <configuration name="ArrazTest.test2DoubleAverageOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
229
+    <configuration name="ArrazTest.test1getOddEvensOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
283 230
       <module name="arraz" />
284 231
       <option name="PACKAGE_NAME" value="" />
285 232
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
-      <option name="METHOD_NAME" value="test2DoubleAverageOfArray" />
233
+      <option name="METHOD_NAME" value="test1getOddEvensOfArray" />
287 234
       <option name="TEST_OBJECT" value="method" />
288 235
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
289 236
       <method v="2">
290 237
         <option name="Make" enabled="true" />
291 238
       </method>
292 239
     </configuration>
293
-    <configuration name="ArrazTest.testReverseArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
240
+    <configuration name="ArrazTest.test2FindValueAt" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
294 241
       <module name="arraz" />
295 242
       <option name="PACKAGE_NAME" value="" />
296 243
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
297
-      <option name="METHOD_NAME" value="testReverseArray" />
244
+      <option name="METHOD_NAME" value="test2FindValueAt" />
298 245
       <option name="TEST_OBJECT" value="method" />
299 246
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
300 247
       <method v="2">
@@ -307,7 +254,7 @@
307 254
         <option name="Make" enabled="true" />
308 255
       </method>
309 256
     </configuration>
310
-    <configuration default="true" type="TestNG" factoryName="TestNG">
257
+    <configuration default="true" type="TestNG">
311 258
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
312 259
       <properties />
313 260
       <listeners />
@@ -315,29 +262,29 @@
315 262
         <option name="Make" enabled="true" />
316 263
       </method>
317 264
     </configuration>
318
-    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
265
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType">
319 266
       <module name="" />
320 267
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
321 268
       <option name="PROGRAM_PARAMETERS" />
322
-      <predefined_log_file id="idea.log" enabled="true" />
269
+      <predefined_log_file enabled="true" id="idea.log" />
323 270
       <method v="2">
324 271
         <option name="Make" enabled="true" />
325 272
       </method>
326 273
     </configuration>
327 274
     <list>
328
-      <item itemvalue="JUnit.ArrazTest.test1AverageOfArray" />
329
-      <item itemvalue="JUnit.ArrazTest.test2AverageOfArray" />
330
-      <item itemvalue="JUnit.ArrazTest.test1DoubleAverageOfArray" />
331
-      <item itemvalue="JUnit.ArrazTest.test2DoubleAverageOfArray" />
332
-      <item itemvalue="JUnit.ArrazTest.testReverseArray" />
275
+      <item itemvalue="JUnit.ArrazTest" />
276
+      <item itemvalue="JUnit.ArrazTest.test1getOddEvensOfArray" />
277
+      <item itemvalue="JUnit.ArrazTest.test1FindValueAt" />
278
+      <item itemvalue="JUnit.ArrazTest.test2FindValueAt" />
279
+      <item itemvalue="JUnit.ArrazTest.test1findSmallerAndSecondSmaller" />
333 280
     </list>
334 281
     <recent_temporary>
335 282
       <list>
336
-        <item itemvalue="JUnit.ArrazTest.testReverseArray" />
337
-        <item itemvalue="JUnit.ArrazTest.test2DoubleAverageOfArray" />
338
-        <item itemvalue="JUnit.ArrazTest.test1DoubleAverageOfArray" />
339
-        <item itemvalue="JUnit.ArrazTest.test2AverageOfArray" />
340
-        <item itemvalue="JUnit.ArrazTest.test1AverageOfArray" />
283
+        <item itemvalue="JUnit.ArrazTest.test1findSmallerAndSecondSmaller" />
284
+        <item itemvalue="JUnit.ArrazTest" />
285
+        <item itemvalue="JUnit.ArrazTest.test2FindValueAt" />
286
+        <item itemvalue="JUnit.ArrazTest.test1FindValueAt" />
287
+        <item itemvalue="JUnit.ArrazTest.test1getOddEvensOfArray" />
341 288
       </list>
342 289
     </recent_temporary>
343 290
   </component>
@@ -354,7 +301,9 @@
354 301
       <workItem from="1543955862749" duration="2347000" />
355 302
       <workItem from="1543958998826" duration="113000" />
356 303
       <workItem from="1544020724645" duration="762000" />
357
-      <workItem from="1544059069745" duration="8232000" />
304
+      <workItem from="1544059069745" duration="36974000" />
305
+      <workItem from="1544314595903" duration="34000" />
306
+      <workItem from="1544314708566" duration="9408000" />
358 307
     </task>
359 308
     <task id="LOCAL-00001" summary="readme and docs">
360 309
       <created>1544021313039</created>
@@ -367,56 +316,55 @@
367 316
     <servers />
368 317
   </component>
369 318
   <component name="TestHistory">
370
-    <history-entry file="ArrazTest_test2AverageOfArray - 2018.12.05 at 22h 20m 25s.xml">
371
-      <configuration name="ArrazTest.test2AverageOfArray" configurationId="JUnit" />
319
+    <history-entry file="ArrazTest_test1SortArrayIntoEvensThenOdds - 2018.12.08 at 22h 03m 18s.xml">
320
+      <configuration name="ArrazTest.test1SortArrayIntoEvensThenOdds" configurationId="JUnit" />
372 321
     </history-entry>
373
-    <history-entry file="ArrazTest_test1DoubleAverageOfArray - 2018.12.05 at 22h 22m 18s.xml">
374
-      <configuration name="ArrazTest.test1DoubleAverageOfArray" configurationId="JUnit" />
322
+    <history-entry file="ArrazTest_test1SortArrayIntoEvensThenOdds - 2018.12.08 at 22h 04m 50s.xml">
323
+      <configuration name="ArrazTest.test1SortArrayIntoEvensThenOdds" configurationId="JUnit" />
375 324
     </history-entry>
376
-    <history-entry file="ArrazTest_test1DoubleAverageOfArray - 2018.12.05 at 22h 22m 45s.xml">
377
-      <configuration name="ArrazTest.test1DoubleAverageOfArray" configurationId="JUnit" />
325
+    <history-entry file="ArrazTest_test1SortArrayIntoEvensThenOdds - 2018.12.08 at 22h 05m 42s.xml">
326
+      <configuration name="ArrazTest.test1SortArrayIntoEvensThenOdds" configurationId="JUnit" />
378 327
     </history-entry>
379
-    <history-entry file="ArrazTest_test2DoubleAverageOfArray - 2018.12.05 at 22h 23m 59s.xml">
380
-      <configuration name="ArrazTest.test2DoubleAverageOfArray" configurationId="JUnit" />
328
+    <history-entry file="ArrazTest_test2SortArrayIntoEvensThenOdds - 2018.12.08 at 22h 07m 16s.xml">
329
+      <configuration name="ArrazTest.test2SortArrayIntoEvensThenOdds" configurationId="JUnit" />
381 330
     </history-entry>
382
-    <history-entry file="ArrazTest_test2DoubleAverageOfArray - 2018.12.05 at 22h 24m 27s.xml">
383
-      <configuration name="ArrazTest.test2DoubleAverageOfArray" configurationId="JUnit" />
331
+    <history-entry file="ArrazTest_test2InsertAtStatAndCopy - 2018.12.08 at 22h 07m 35s.xml">
332
+      <configuration name="ArrazTest.test2InsertAtStatAndCopy" configurationId="JUnit" />
384 333
     </history-entry>
385
-    <history-entry file="ArrazTest_testReverseArray - 2018.12.05 at 22h 34m 11s.xml">
386
-      <configuration name="ArrazTest.testReverseArray" configurationId="JUnit" />
334
+    <history-entry file="ArrazTest - 2018.12.08 at 22h 07m 48s.xml">
335
+      <configuration name="ArrazTest" configurationId="JUnit" />
387 336
     </history-entry>
388
-    <history-entry file="ArrazTest_testReverseArray - 2018.12.05 at 22h 35m 06s.xml">
389
-      <configuration name="ArrazTest.testReverseArray" configurationId="JUnit" />
337
+    <history-entry file="ArrazTest_test1getOddEvensOfArray - 2018.12.08 at 22h 08m 35s.xml">
338
+      <configuration name="ArrazTest.test1getOddEvensOfArray" configurationId="JUnit" />
390 339
     </history-entry>
391
-    <history-entry file="ArrazTest_testReverseArray - 2018.12.05 at 22h 35m 44s.xml">
392
-      <configuration name="ArrazTest.testReverseArray" configurationId="JUnit" />
340
+    <history-entry file="ArrazTest_test1FindValueAt - 2018.12.08 at 22h 11m 58s.xml">
341
+      <configuration name="ArrazTest.test1FindValueAt" configurationId="JUnit" />
393 342
     </history-entry>
394
-    <history-entry file="ArrazTest_testReverseArray - 2018.12.05 at 22h 36m 59s.xml">
395
-      <configuration name="ArrazTest.testReverseArray" configurationId="JUnit" />
343
+    <history-entry file="ArrazTest_test1FindValueAt - 2018.12.08 at 22h 12m 11s.xml">
344
+      <configuration name="ArrazTest.test1FindValueAt" configurationId="JUnit" />
396 345
     </history-entry>
397
-    <history-entry file="ArrazTest_testReverseArray - 2018.12.05 at 22h 37m 12s.xml">
398
-      <configuration name="ArrazTest.testReverseArray" configurationId="JUnit" />
346
+    <history-entry file="ArrazTest_test2FindValueAt - 2018.12.08 at 22h 12m 43s.xml">
347
+      <configuration name="ArrazTest.test2FindValueAt" configurationId="JUnit" />
399 348
     </history-entry>
400 349
   </component>
401 350
   <component name="TimeTrackingManager">
402
-    <option name="totallyTimeSpent" value="11454000" />
351
+    <option name="totallyTimeSpent" value="49638000" />
403 352
   </component>
404 353
   <component name="ToolWindowManager">
405
-    <frame x="0" y="23" width="1280" height="713" extended-state="0" />
354
+    <frame x="0" y="26" width="1280" height="713" extended-state="0" />
406 355
     <editor active="true" />
407 356
     <layout>
408
-      <window_info content_ui="combo" id="Project" order="0" weight="0.54362416" />
409
-      <window_info id="Structure" order="1" weight="0.25" />
357
+      <window_info content_ui="combo" id="Project" order="0" weight="0.5589661" />
358
+      <window_info id="Structure" order="1" weight="0.24959612" />
410 359
       <window_info id="Image Layers" order="2" />
411 360
       <window_info id="Designer" order="3" />
412 361
       <window_info id="UI Designer" order="4" />
413 362
       <window_info id="Capture Tool" order="5" />
414 363
       <window_info id="Favorites" order="6" side_tool="true" />
415
-      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
416
-      <window_info anchor="bottom" id="Messages" weight="0.32876712" />
364
+      <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
417 365
       <window_info anchor="bottom" id="Message" order="0" />
418
-      <window_info anchor="bottom" id="Find" order="1" />
419
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.38647342" />
366
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32876712" />
367
+      <window_info anchor="bottom" id="Run" order="2" weight="0.38486314" />
420 368
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
421 369
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
422 370
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -424,7 +372,9 @@
424 372
       <window_info anchor="bottom" id="Terminal" order="7" />
425 373
       <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
426 374
       <window_info anchor="bottom" id="Version Control" order="9" />
427
-      <window_info anchor="right" id="SciView" />
375
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
376
+      <window_info active="true" anchor="bottom" id="Messages" order="11" visible="true" weight="0.3252818" />
377
+      <window_info anchor="right" id="Maven" />
428 378
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
429 379
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
430 380
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -434,22 +384,17 @@
434 384
       <window_info anchor="right" id="Database" order="6" />
435 385
       <window_info anchor="right" id="Palette&#9;" order="7" />
436 386
       <window_info anchor="right" id="Maven Projects" order="8" />
387
+      <window_info anchor="right" id="SciView" order="9" />
437 388
     </layout>
438 389
   </component>
439 390
   <component name="TypeScriptGeneratedFilesManager">
440 391
     <option name="version" value="1" />
441 392
   </component>
442
-  <component name="VcsContentAnnotationSettings">
443
-    <option name="myLimit" value="2678400000" />
444
-  </component>
445 393
   <component name="VcsManagerConfiguration">
446 394
     <MESSAGE value="readme and docs" />
447 395
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
448 396
   </component>
449 397
   <component name="editorHistoryManager">
450
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
451
-      <provider selected="true" editor-type-id="text-editor" />
452
-    </entry>
453 398
     <entry file="file://$PROJECT_DIR$/README.md">
454 399
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
455 400
         <state split_layout="SPLIT">
@@ -460,38 +405,84 @@
460 405
         </state>
461 406
       </provider>
462 407
     </entry>
463
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
408
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/Iterator.java">
464 409
       <provider selected="true" editor-type-id="text-editor">
465
-        <state relative-caret-position="308">
466
-          <caret line="115" selection-start-line="115" selection-end-line="115" />
410
+        <state relative-caret-position="383">
411
+          <caret line="53" column="17" selection-start-line="53" selection-start-column="17" selection-end-line="53" selection-end-column="17" />
412
+        </state>
413
+      </provider>
414
+    </entry>
415
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/Arrays.java">
416
+      <provider selected="true" editor-type-id="text-editor">
417
+        <state relative-caret-position="-19610">
418
+          <caret line="70" column="13" selection-start-line="70" selection-start-column="13" selection-end-line="70" selection-end-column="13" />
419
+        </state>
420
+      </provider>
421
+    </entry>
422
+    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
423
+      <provider selected="true" editor-type-id="text-editor" />
424
+    </entry>
425
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
426
+      <provider selected="true" editor-type-id="text-editor">
427
+        <state relative-caret-position="255">
428
+          <caret line="25" selection-start-line="25" selection-end-line="25" />
467 429
           <folding>
468
-            <element signature="imports" expanded="true" />
430
+            <element signature="e#180#181#0" expanded="true" />
431
+            <element signature="e#206#207#0" expanded="true" />
432
+            <element signature="e#241#242#0" expanded="true" />
433
+            <element signature="e#271#272#0" expanded="true" />
434
+            <element signature="e#298#299#0" expanded="true" />
435
+            <element signature="e#324#325#0" expanded="true" />
436
+            <element signature="e#359#360#0" expanded="true" />
437
+            <element signature="e#389#390#0" expanded="true" />
469 438
           </folding>
470 439
         </state>
471 440
       </provider>
472 441
     </entry>
473
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
442
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/tools.jar!/com/sun/tools/javac/util/ArrayUtils.class">
474 443
       <provider selected="true" editor-type-id="text-editor">
475
-        <state relative-caret-position="60">
476
-          <caret line="4" column="41" selection-start-line="4" selection-start-column="41" selection-end-line="4" selection-end-column="41" />
444
+        <state relative-caret-position="83">
445
+          <caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
477 446
         </state>
478 447
       </provider>
479 448
     </entry>
480
-    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/Iterator.java">
449
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
481 450
       <provider selected="true" editor-type-id="text-editor">
482
-        <state relative-caret-position="383">
483
-          <caret line="53" column="17" selection-start-line="53" selection-start-column="17" selection-end-line="53" selection-end-column="17" />
451
+        <state relative-caret-position="-231">
452
+          <caret line="4" column="22" selection-start-line="4" selection-start-column="22" selection-end-line="4" selection-end-column="22" />
453
+          <folding>
454
+            <element signature="e#195#196#0" expanded="true" />
455
+            <element signature="e#222#223#0" expanded="true" />
456
+            <element signature="e#259#260#0" expanded="true" />
457
+            <element signature="e#291#292#0" expanded="true" />
458
+            <element signature="e#320#321#0" expanded="true" />
459
+            <element signature="e#348#349#0" expanded="true" />
460
+            <element signature="e#387#388#0" expanded="true" />
461
+            <element signature="e#421#422#0" expanded="true" />
462
+          </folding>
484 463
         </state>
485 464
       </provider>
486 465
     </entry>
487 466
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
488 467
       <provider selected="true" editor-type-id="text-editor">
489
-        <state relative-caret-position="263">
490
-          <caret line="128" lean-forward="true" selection-start-line="128" selection-end-line="128" />
468
+        <state relative-caret-position="278">
469
+          <caret line="256" column="45" selection-start-line="256" selection-start-column="17" selection-end-line="256" selection-end-column="45" />
470
+          <folding>
471
+            <element signature="e#5834#5835#0" expanded="true" />
472
+            <element signature="e#5891#5892#0" expanded="true" />
473
+            <element signature="e#6824#6833#0" expanded="true" />
474
+            <element signature="e#6877#6886#0" expanded="true" />
475
+          </folding>
476
+        </state>
477
+      </provider>
478
+    </entry>
479
+    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
480
+      <provider selected="true" editor-type-id="text-editor">
481
+        <state relative-caret-position="274">
482
+          <caret line="428" column="43" selection-start-line="428" selection-start-column="43" selection-end-line="428" selection-end-column="43" />
491 483
           <folding>
492 484
             <element signature="imports" expanded="true" />
493
-            <element signature="e#468#469#0" expanded="true" />
494
-            <element signature="e#492#493#0" expanded="true" />
485
+            <element signature="e#8533#8542#0" expanded="true" />
495 486
           </folding>
496 487
         </state>
497 488
       </provider>

+ 1
- 1
arraz/arraz.iml Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
4 4
     <output url="file://$MODULE_DIR$/target/classes" />
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">

+ 12
- 0
arraz/pom.xml Näytä tiedosto

@@ -7,6 +7,18 @@
7 7
     <groupId>rocks.zipcode.arraysgonewild</groupId>
8 8
     <artifactId>arraz</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <build>
11
+        <plugins>
12
+            <plugin>
13
+                <groupId>org.apache.maven.plugins</groupId>
14
+                <artifactId>maven-compiler-plugin</artifactId>
15
+                <configuration>
16
+                    <source>6</source>
17
+                    <target>6</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
10 22
     <dependencies>
11 23
         <dependency>
12 24
             <groupId>junit</groupId>

+ 216
- 39
arraz/src/main/java/Arraz.java Näytä tiedosto

@@ -1,17 +1,18 @@
1
-import java.util.Arrays;
2
-import java.util.Iterator;
1
+
2
+
3
+import java.util.*;
3 4
 
4 5
 public class Arraz {
5
-    public  static int  sumValuesOfArray(int [] arr){
6
-        int sum = 0 ;
7
-        for (int i: arr) {
6
+    public   Integer  sumValuesOfArray(Integer [] arr){
7
+        Integer sum = 0 ;
8
+        for (Integer i: arr) {
8 9
             sum += i;
9 10
 
10 11
         }
11 12
         return sum;
12 13
 
13 14
     }
14
-    public static  double sumDoublesOfArray(double [] arr){
15
+    public  double sumDoublesOfArray(double [] arr){
15 16
         double sum = 0;
16 17
         for (double i: arr) {
17 18
             sum += i;
@@ -19,16 +20,16 @@ public class Arraz {
19 20
             return sum;
20 21
 
21 22
     }
22
-    public static int averageOfArray( int [] arr){
23
+    public  Integer averageOfArray( Integer [] arr){
23 24
 
24 25
 
25 26
         return sumValuesOfArray(arr) / arr.length;
26 27
     }
27
-    public  static double  doubleAverageOfArray (double [] arr){
28
+    public   double  doubleAverageOfArray (double [] arr){
28 29
         return  sumDoublesOfArray(arr) / arr.length;
29 30
     }
30 31
 
31
-    public static boolean containValue( int [] arr, int number){
32
+    public  boolean containValue( Integer [] arr, int number){
32 33
         for (int i : arr) {
33 34
 
34 35
             if (i == number ){
@@ -39,25 +40,15 @@ public class Arraz {
39 40
         return false;
40 41
     }
41 42
 
42
-    public static   int [] reverseArray (int [] arr){
43
-        int [] result = new int [arr.length];
44
-        int index = 0;
45
-
46
-        for (int  i = arr.length -1; i>=0; i --) {
47
-
48
-            result[index] = arr[i];
49
-            index++;
50
-
43
+    public  Integer [] reverseArray (Integer [] arr){
44
+       List <Integer> list = Arrays.asList(arr);
45
+        Collections.reverse(list);
51 46
 
52 47
 
53
-
54
-        }
55
-
56
-
57
-        return result;
48
+        return makeMeAnArrayFromArrayList(list);
58 49
     }
59 50
 
60
-    public static OddEven getOddEvensOfArray(int [] arr){
51
+    public  OddEven getOddEvensOfArray(int [] arr){
61 52
 
62 53
         int odd = 0;
63 54
         int even = 0;
@@ -69,17 +60,17 @@ public class Arraz {
69 60
                 even ++;
70 61
             }
71 62
 
72
-        } {
73
-
74 63
         }
75 64
         return new OddEven(odd,even) ;
76 65
 
77 66
     }
78 67
 
79
-    public static int findIndexOf( int [] arr, int value){
68
+    public  Integer findIndexOf( Integer [] arr, Integer value){
69
+
70
+     int num = 0;
71
+        for (int i = 0; i <arr.length-1 ; i++) {
72
+
80 73
 
81
-     int num = -1;
82
-        for (int i: arr) {
83 74
             if (value == arr[i]){
84 75
                 num = i;
85 76
 
@@ -88,9 +79,23 @@ public class Arraz {
88 79
         }
89 80
         return num;
90 81
     }
82
+    public  Integer findValueAt( Integer [] arr, int index){
91 83
 
92
-    public static Integer [] copyArrayByInterator( Integer [] arr){
93
-        Iterator <Integer> integerIterator = (Iterator<Integer>) Arrays.asList(arr);
84
+        int num = 0;
85
+        for (int i = 0; i <arr.length-1 ; i++) {
86
+
87
+
88
+            if (index == i){
89
+                num = arr[i];
90
+
91
+            }
92
+
93
+        }
94
+        return num;
95
+    }
96
+
97
+    public  Integer [] copyArrayByInterator( Integer [] arr){
98
+        Iterator <Integer> integerIterator = Arrays.asList(arr).iterator();
94 99
         Integer [] copyArr = new Integer[arr.length];
95 100
         int index=0;
96 101
 
@@ -104,7 +109,7 @@ public class Arraz {
104 109
    return copyArr;
105 110
     }
106 111
 
107
-    public static int [] copyArrayByloop( int [] arr){
112
+    public int [] copyArrayByloop( int [] arr){
108 113
         int [] copyArr = new int [arr.length];
109 114
 
110 115
         int index = 0;
@@ -117,20 +122,192 @@ public class Arraz {
117 122
         return copyArr;
118 123
     }
119 124
 
120
-    public static int [] removeElemetFromArray( int [] arr, int value){
121
-        int [] result = new int [arr.length-1];
122
-        int index = 0;
123
-        for (int i:arr) {
124
-            if (arr [i] != value){
125
-                result[index]= arr[i];
125
+    public  Integer [] removeElemetFromArray( Integer [] arr, int value){
126
+        int size = arr.length;
127
+
128
+        int index = findIndexOf(arr,value);
129
+
130
+        for (int i = index; i < size -1; i++) {
131
+
132
+            arr[i] = arr[i+1];
133
+        }
134
+        size = size - 1;
135
+
136
+        Integer[] copyarr = Arrays.copyOf(arr,size);
137
+        return copyarr;
138
+
139
+    }
140
+
141
+    public  Integer [] insertIntoArrayAt(Integer [] arr, Integer num, int index){
142
+   Integer [] result = new Integer[arr.length+1];
143
+        for (int i = 0; i <result.length ; i++) {
144
+            if (i < index){
145
+                result [i] =arr[i];
146
+            }else if (i ==index){
147
+                result [i]=  num;
148
+
149
+            }else {
150
+                result [i]= arr[i-1];
151
+            }
152
+
153
+        }
154
+   return result ;
155
+    }
156
+
157
+   public MaxMin findMaxMinOfArray(Integer [] arr ){
158
+     int  max = arr[0];
159
+     int min = arr [0];
160
+       for (Integer i: arr) {
161
+           if (arr[i]> max){
162
+               max = arr[i];
163
+           } else if (arr[i]< min){
164
+               min = arr[i];
165
+           }
166
+
167
+       }
168
+
169
+        return new MaxMin(max,min);
170
+   }
171
+
172
+
173
+    public  Integer [] removeDupesFromArray( Integer [] arr) {
174
+        List <Integer> list = new ArrayList<Integer>();
175
+        list.add(arr[0]);
176
+        for (Integer i: arr) {
177
+            if(!list.contains(i)){
178
+                list.add(i);
179
+            }
180
+
181
+        }
182
+        return makeMeAnArrayFromArrayList(list);
183
+    }
184
+
185
+
186
+ public  double find2ndLargestValueFromArrayDouble( double [] arr){
187
+        double largest = arr[0];
188
+        double secondLargest = arr[0];
189
+
190
+     for (int i = 0; i <arr.length ; i++) {
191
+
192
+         if(arr[i]> largest){
193
+             secondLargest = largest;
194
+             largest = arr[i];
195
+         } else if (arr[i]> secondLargest){
196
+             secondLargest = arr [i];
197
+         }
198
+
199
+     }
200
+
201
+
202
+        return secondLargest ;
203
+   }
204
+
205
+
206
+   public   List<Integer> makeMeAnArrayListFromArray( Integer [] arr){
207
+
208
+        return Arrays.asList(arr);
209
+
210
+    }
211
+
212
+    public  Integer [] makeMeAnArrayFromArrayList(List <Integer> list){
213
+        return list.toArray(new Integer[list.size()]);
214
+
215
+
216
+
217
+
218
+       }
219
+
220
+    public  boolean check2ArraysForEqual( int [] array , int [] arr){
221
+
222
+
223
+        return Arrays.equals(array,arr);
224
+    }
225
+    public Integer averageArrayWithoutMaxMin(Integer [] arr){
226
+        MaxMin maxMin = findMaxMinOfArray(arr);
227
+        Integer[] removeMax = removeElemetFromArray(arr, maxMin.getMax());
228
+        Integer [] result = removeElemetFromArray(removeMax, maxMin.getMin());
229
+
230
+        return averageOfArray(result);
231
+    }
232
+
233
+    public  boolean arrayHas65and77( Integer [] arr) {
234
+
235
+            if (containValue(arr,65) &&
236
+                    containValue(arr, 77)) {
237
+                return true;
126 238
             }
127 239
 
240
+
241
+        return false;
242
+    }
243
+
244
+    public  boolean theTotalofTensIs30(int []arr){
245
+       int sum = 0;
246
+       for(int i: arr){
247
+
248
+       if(i == 10) sum +=i;
249
+
250
+       if (sum ==30)return true;
251
+
252
+       }
253
+       return false;
254
+    }
255
+
256
+
257
+    public  int  findSmallerAndSecondSmaller( Integer [] arr){
258
+        MaxMin maxMin = findMaxMinOfArray(arr);
259
+        Integer [] removeMin = removeElemetFromArray( arr,maxMin.getMin());
260
+         MaxMin secondSmaller = findMaxMinOfArray(removeMin);
261
+
262
+
263
+        return   maxMin.getMin() + secondSmaller.getMin() ;
264
+    }
265
+
266
+
267
+
268
+    public  Integer[] removeLastItemAndCopy(Integer [] arr){
269
+
270
+        return Arrays.copyOf(arr, arr.length-1);
128 271
         }
129 272
 
130
-return result;
273
+    public  Integer[] removeFirstItemAndCopy(Integer [] arr) {
274
+        return removeElemetFromArray(arr, arr[0]);
131 275
     }
132 276
 
133 277
 
134 278
 
279
+    public  Integer [] insertAtStartAndCopy(Integer [] arr, int value){
280
+
281
+            return insertIntoArrayAt(arr,value,0);
282
+        }
283
+
284
+
285
+
286
+
287
+    public Integer [] insertAtEndAndCopy (Integer [] arr, Integer value){
288
+
289
+
290
+        return insertIntoArrayAt(arr,value , arr.length);
291
+    }
292
+    public Integer [] sortArrayIntoEvensThenOdds(Integer [] arr){
293
+
294
+      List <Integer> even = new ArrayList<Integer>();
295
+      List <Integer> odd = new ArrayList<Integer>();
296
+        for ( Integer i: arr) {
297
+            if (i %2 ==0){
298
+                even.add(i);
299
+            } else {
300
+                odd.add(i);
301
+
302
+            }
303
+
304
+        }
305
+        Collections.sort(even);
306
+        Collections.sort(odd);
307
+        even.addAll(odd);
308
+        return even.toArray(new  Integer[even.size()]);
309
+    }
310
+
311
+
135 312
 }
136 313
 

+ 27
- 0
arraz/src/main/java/MaxMin.java Näytä tiedosto

@@ -0,0 +1,27 @@
1
+public class MaxMin {
2
+    public int max;
3
+    public int min;
4
+
5
+    public MaxMin(int max, int min) {
6
+        this.max = max;
7
+        this.min = min;
8
+    }
9
+
10
+    public int getMax() {
11
+        return max;
12
+    }
13
+
14
+    public void setMax(int max) {
15
+        this.max = max;
16
+    }
17
+
18
+    public int getMin() {
19
+        return min;
20
+    }
21
+
22
+    public void setMin(int min) {
23
+        this.min = min;
24
+    }
25
+
26
+
27
+}

+ 34
- 0
arraz/src/main/java/OddEven.java Näytä tiedosto

@@ -2,8 +2,42 @@ public class OddEven {
2 2
     public int odds;
3 3
     public int evens;
4 4
 
5
+    public OddEven() {
6
+    }
7
+
5 8
     public OddEven(int odds, int evens) {
6 9
         this.odds = odds;
7 10
         this.evens = evens;
8 11
     }
12
+
13
+    public int getOdds() {
14
+        return odds;
15
+    }
16
+
17
+    public void setOdds(int odds) {
18
+        this.odds = odds;
19
+    }
20
+
21
+    public int getEvens() {
22
+        return evens;
23
+    }
24
+
25
+    public void setEvens(int evens) {
26
+        this.evens = evens;
27
+    }
28
+
29
+    @Override
30
+    public boolean equals(Object obj) {
31
+        if (this == obj) {return true;
32
+        } else if (obj ==null || getClass() != obj.getClass()) {
33
+            return false;
34
+        }
35
+        OddEven oddEven = (OddEven) obj;
36
+
37
+
38
+        return odds == oddEven.odds &&
39
+                evens== oddEven.evens;
40
+    }
41
+
42
+
9 43
 }

+ 456
- 47
arraz/src/test/java/ArrazTest.java Näytä tiedosto

@@ -1,119 +1,528 @@
1 1
 import org.junit.Assert;
2 2
 import org.junit.Test;
3 3
 
4
-import static org.junit.Assert.*;
4
+import java.util.ArrayList;
5
+import java.util.Arrays;
6
+import java.util.List;
7
+
8
+
5 9
 
6 10
 public class ArrazTest {
7
-    int[] spiffyHandyIntArray = new int[] {4,5,102,6,-7,12,-32,92,8};
11
+   Arraz arraz = new Arraz();
8 12
 
9 13
     @Test
10
-    public void test1SumValueOfArrayInt(){
11
-        int[] spiffyHandyIntArray = new int[] {4,5,102,6,-7,12,-32,92,8};
12
-
13
-        int expecte = 190;
14
-        int actual = Arraz.sumValuesOfArray(spiffyHandyIntArray);
15
-        Assert.assertEquals(expecte,actual);
14
+    public void test1SumValueOfArrayInt() {
15
+        Integer[] spiffyHandyIntArray ={4, 5, 102, 6, -7, 12, -32, 92, 8};
16 16
 
17
+        int expected = 190;
18
+        int actual = arraz.sumValuesOfArray(spiffyHandyIntArray);
19
+        Assert.assertEquals(expected, actual);
17 20
 
18 21
 
19 22
     }
23
+
20 24
     @Test
21
-    public void test2SumValueOfArrayInt(){
22
-        int[] spiffyHandyIntArray = new int[] {4,5,6,-7,12,-32,92,};
25
+    public void test2SumValueOfArrayInt() {
26
+        Integer[] spiffyHandyIntArray = { 4, 5, 6, -7, 12, -32, 92};
23 27
 
24 28
         int expecte = 80;
25
-        int actual = Arraz.sumValuesOfArray(spiffyHandyIntArray);
26
-        Assert.assertEquals(expecte,actual);
27
-
29
+        int actual = arraz.sumValuesOfArray(spiffyHandyIntArray);
30
+        Assert.assertEquals(expecte, actual);
28 31
 
29 32
 
30 33
     }
31 34
 
32 35
 
33 36
     @Test
34
-    public void test1SumValueOfArrayDouble(){
35
-        double[] spiffyHandyDoubleArray = new double[] {1.0, 0.5, 3.6, 3.14159};
37
+    public void test1SumValueOfArrayDouble() {
38
+        double[] spiffyHandyDoubleArray = new double[]{1.0, 0.5, 3.6, 3.14159};
36 39
 
37 40
 
38 41
         double expecte = 8.24159;
39
-        double actual = Arraz.sumDoublesOfArray(spiffyHandyDoubleArray);
40
-        Assert.assertEquals(expecte,actual,0.00001);
41
-
42
+        double actual = arraz.sumDoublesOfArray(spiffyHandyDoubleArray);
43
+        Assert.assertEquals(expecte, actual, 0.00001);
42 44
 
43 45
 
44 46
     }
45 47
 
46 48
     @Test
47
-    public void test2SumValueOfArrayDouble(){
48
-        double[] spiffyHandyDoubleArray = new double[] {1.0, 0.5, 3.6 -0.8};
49
+    public void test2SumValueOfArrayDouble() {
50
+        double[] spiffyHandyDoubleArray = new double[]{1.0, 0.5, 3.6 - 0.8};
49 51
 
50 52
 
51 53
         double expecte = 4.3;
52
-        double actual = Arraz.sumDoublesOfArray(spiffyHandyDoubleArray);
53
-        Assert.assertEquals(expecte,actual,0.01);
54
+        double actual = arraz.sumDoublesOfArray(spiffyHandyDoubleArray);
55
+        Assert.assertEquals(expecte, actual, 0.01);
54 56
 
55 57
 
56 58
     }
57 59
 
58 60
     @Test
59
-    public void test1AverageOfArray(){
60
-        int[] spiffyHandyIntArray = new int[] {4,5,6,-7,12,-32,92,};
61
-         int expected = 11;
62
-         int actual = Arraz.averageOfArray(spiffyHandyIntArray);
63
-         Assert.assertEquals(expected, actual);
61
+    public void test1AverageOfArray() {
62
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
63
+        int expected = 11;
64
+        int actual = arraz.averageOfArray(spiffyHandyIntArray);
65
+        Assert.assertEquals(expected, actual);
64 66
     }
67
+
65 68
     @Test
66
-    public void test2AverageOfArray(){
67
-        int[] spiffyHandyIntArray = new int[] {4,5,6,10};
69
+    public void test2AverageOfArray() {
70
+        Integer[] spiffyHandyIntArray = {4, 5, 6, 10};
68 71
         int expected = 6;
69
-        int actual = Arraz.averageOfArray(spiffyHandyIntArray);
72
+        int actual = arraz.averageOfArray(spiffyHandyIntArray);
70 73
         Assert.assertEquals(expected, actual);
71 74
     }
72 75
 
73 76
     @Test
74
-    public void test1DoubleAverageOfArray(){
75
-        double[] spiffyHandyIntArray = new double[] {4.3,5.9,6.09,10.8};
77
+    public void test1DoubleAverageOfArray() {
78
+        double[] spiffyHandyIntArray = new double[]{4.3, 5.9, 6.09, 10.8};
76 79
         double expected = 6.77;
77
-        double actual = Arraz.doubleAverageOfArray(spiffyHandyIntArray);
80
+        double actual = arraz.doubleAverageOfArray(spiffyHandyIntArray);
78 81
         Assert.assertEquals(expected, actual, 0.01);
79 82
     }
80 83
 
81 84
     @Test
82
-    public void test2DoubleAverageOfArray(){
83
-        double[] spiffyHandyIntArray = new double[] {8.0,9.9,8.009,77.06};
85
+    public void test2DoubleAverageOfArray() {
86
+        double[] spiffyHandyIntArray = new double[]{8.0, 9.9, 8.009, 77.06};
84 87
         double expected = 25.742;
85
-        double actual = Arraz.doubleAverageOfArray(spiffyHandyIntArray);
88
+        double actual = arraz.doubleAverageOfArray(spiffyHandyIntArray);
86 89
         Assert.assertEquals(expected, actual, 0.001);
87 90
     }
88 91
 
89 92
 
90 93
     @Test
91
-    public void test1ContainsValue(){
92
-        int[] spiffyHandyIntArray = new int[] {4,5,6,-7,12,-32,92,};
93
-         int num = -32;
94
-        Assert.assertTrue(Arraz.containValue(spiffyHandyIntArray,num));
94
+    public void test1ContainsValue() {
95
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
96
+        int num = -32;
97
+        Assert.assertTrue(arraz.containValue(spiffyHandyIntArray, num));
95 98
 
96 99
 
97 100
     }
98 101
 
99 102
     @Test
100
-    public void test2ContainsValue(){
101
-        int[] spiffyHandyIntArray = new int[] {4,5,6,-7,12,-32,92,};
103
+    public void test2ContainsValue() {
104
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
102 105
         int num = 6;
103
-        Assert.assertTrue(Arraz.containValue(spiffyHandyIntArray,num));
106
+        Assert.assertTrue(arraz.containValue(spiffyHandyIntArray, num));
107
+
108
+
109
+    }
110
+
111
+
112
+    @Test
113
+    public void test1ReverseArray() {
114
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
115
+
116
+        Integer[] expected = {92, -32, 12, -7, 6, 5, 4};
117
+        Integer[] actual = arraz.reverseArray(spiffyHandyIntArray);
118
+         Assert.assertTrue(Arrays.equals(expected,actual));
119
+
120
+
121
+    }
122
+
123
+    @Test
124
+    public void test2ReverseArray() {
125
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
126
+
127
+        Integer[] expected = {92, -32, 12, -7, 6, 5, 4};
128
+        Integer[] actual = arraz.reverseArray(spiffyHandyIntArray);
129
+         Assert.assertTrue(Arrays.equals(expected,actual));
104 130
 
105 131
 
106 132
     }
107 133
 
134
+    @Test
135
+    public void test1getOddEvensOfArray() {
136
+
137
+        int[] spiffyHandyIntArray = {4, 5, 6};
138
+        OddEven expected = new OddEven(5, 4);
139
+        OddEven actual = arraz.getOddEvensOfArray(spiffyHandyIntArray);
140
+        Assert.assertEquals( expected, actual);
141
+
142
+
143
+    }
144
+
145
+    @Test
146
+    public void test2getOddEvensOfArray() {
147
+        int[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92,};
148
+        OddEven expected = new OddEven(-7, 12);
149
+        OddEven actual = arraz.getOddEvensOfArray(spiffyHandyIntArray);
150
+        Assert.assertEquals(expected, actual);
151
+
152
+
153
+    }
154
+
155
+    @Test
156
+    public void test1FindIndexOff() {
157
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
158
+
159
+        int expected = 3;
160
+        int actual = arraz.findIndexOf(spiffyHandyIntArray, -7);
161
+        Assert.assertEquals(expected, actual);
162
+    }
163
+
164
+    @Test
165
+    public void test2FindIndexOff() {
166
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
167
+        int expected = 0;
168
+        int actual = arraz.findIndexOf(spiffyHandyIntArray, 4);
169
+        Assert.assertEquals(expected, actual);
170
+    }
171
+    @Test
172
+    public void test1FindValueAt(){
173
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
174
+        int expected = 12;
175
+        int actual = arraz.findValueAt(spiffyHandyIntArray, 4);
176
+        Assert.assertEquals(expected,actual);
177
+    }@Test
178
+    public void test2FindValueAt(){
179
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
180
+        int expected = -32;
181
+        int actual = arraz.findValueAt(spiffyHandyIntArray, 5);
182
+        Assert.assertEquals(expected,actual);
183
+    }
184
+
108 185
 
186
+    @Test
187
+    public void test1CopyArrayByInterator() {
188
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
189
+        Integer[] expected = {4, 5, 6, -7, 12, -32, 92};
190
+        Integer[] actual = arraz.copyArrayByInterator(spiffyHandyIntArray);
191
+
192
+        Assert.assertEquals(expected, actual);
193
+
194
+
195
+    }
196
+
197
+    @Test
198
+    public void test2CopyArrayByInterator() {
199
+        Integer[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
200
+        Integer[] expected = {4, 5, 6, -7, 12, -32, 92};
201
+        Integer[] actual = arraz.copyArrayByInterator(spiffyHandyIntArray);
202
+
203
+        Assert.assertEquals(expected, actual);
204
+
205
+
206
+    }
207
+
208
+    @Test
209
+    public void test1CopyArrayByLoop() {
210
+        int[] spiffyHandyIntArray = {4, 5, 6, -7, 12, -32, 92};
211
+        int[] expected = {4, 5, 6, -7, 12, -32, 92};
212
+        int [] actual = arraz.copyArrayByloop(spiffyHandyIntArray);
213
+
214
+        Assert.assertTrue(Arrays.equals(expected,actual));
215
+
216
+
217
+    }
218
+
219
+    @Test
220
+    public void test2CopyArrayByLoop() {
221
+        int[] spiffyHandyIntArray = {4, 5, 6};
222
+        int[] expected = {4, 5, 6};
223
+        int [] actual = arraz.copyArrayByloop(spiffyHandyIntArray);
224
+
225
+        Assert.assertTrue(Arrays.equals(expected, actual));
226
+
227
+
228
+    }
229
+    @Test
230
+    public void test1RemoveElementFromArray(){
231
+        Integer[] spiffyHandyIntArray = {4, 5, 6};
232
+
233
+        arraz.removeElemetFromArray(spiffyHandyIntArray, 2);
234
+        Assert.assertFalse(arraz.containValue(spiffyHandyIntArray,2));
235
+    }
236
+    @Test
237
+    public void test2RemoveElementFromArray(){
238
+        Integer[] spiffyHandyIntArray = {4, 5, 6};
239
+        int expected = 0;
240
+        arraz.removeElemetFromArray(spiffyHandyIntArray, 6);
241
+        Assert.assertEquals(arraz.findIndexOf(spiffyHandyIntArray,5), expected);
242
+}
109 243
 
110 244
 @Test
111
-    public void testReverseArray(){
112
-        int[] spiffyHandyIntArray =  {4,5,6,-7,12,-32,92,};
245
+    public void test1InsertIntoArrayAt(){
246
+    Integer[] spiffyHandyIntArray = {4, 5, 6};
247
+    Integer  num = 8;
248
+    int expected = 0;
113 249
 
114
-        int [] expected =  {92,-32,12,-7,6,5,4};
115
-        int [] actual = Arraz.reverseArray(spiffyHandyIntArray);
250
+    arraz.insertIntoArrayAt(spiffyHandyIntArray, num, 0);
116 251
 
252
+    Assert.assertEquals(expected, arraz.findIndexOf(spiffyHandyIntArray, 8));
117 253
 
118 254
 }
255
+    @Test
256
+    public void test2InsertIntoArrayAt() {
257
+        Integer[] spiffyHandyIntArray = {4, 5, 6};
258
+        Integer num = 7;
259
+        int expected = 0;
260
+
261
+        arraz.insertIntoArrayAt(spiffyHandyIntArray, num, 2);
262
+
263
+
264
+        Assert.assertEquals(expected, arraz.findIndexOf(spiffyHandyIntArray, 8));
265
+    }
266
+    @Test
267
+    public void test1FindMaxMinOfArray() {
268
+
269
+        Integer[] spiffyHandyIntArray = {4, 5, 6};
270
+        MaxMin expected = new MaxMin(6, 4);
271
+        MaxMin actual = arraz.findMaxMinOfArray(spiffyHandyIntArray);
272
+        Assert.assertEquals(expected, actual);
273
+    }
274
+    @Test
275
+    public void test2FindMaxMinOfArray() {
276
+
277
+        Integer[] spiffyHandyIntArray = {8,3,90};
278
+        MaxMin expected = new MaxMin(90, 3);
279
+        MaxMin actual = arraz.findMaxMinOfArray(spiffyHandyIntArray);
280
+        Assert.assertEquals(expected, actual);
281
+    }
282
+@Test
283
+    public void test1RemoveDupesFromArray(){
284
+    Integer[] spiffyHandyIntArray = {8, 8, 3,90, 90,77,8};
285
+    Integer [] expected = {8,3,90,77};
286
+    Integer [] actual = arraz.removeDupesFromArray(spiffyHandyIntArray);
287
+    Assert.assertTrue(Arrays.equals(expected,actual));
288
+}
289
+
290
+    @Test
291
+    public void test2RemoveDupesFromArray(){
292
+        Integer[] spiffyHandyIntArray = {-1,-1,22,66,22,8,90,90};
293
+        Integer [] expected = {-1,22,66,8,90};
294
+        Integer [] actual = arraz.removeDupesFromArray(spiffyHandyIntArray);
295
+        Assert.assertTrue(Arrays.equals(expected,actual));
296
+    }
297
+    @Test
298
+     public void test1find2ndLargestValueFromArray(){
299
+        double[] spiffyHandyIntArray = {8.3, 8.7, 3.90, 90.77};
300
+        double expected = 8.7;
301
+
302
+        double actual = arraz.find2ndLargestValueFromArrayDouble(spiffyHandyIntArray);
303
+         Assert.assertEquals(expected,actual, 0.001);
304
+    }
305
+
306
+    @Test
307
+    public void test2find2ndLargestValueFromArray(){
308
+        double[] spiffyHandyIntArray = {4.99,99.5,8.95};
309
+        double expected = 8.95;
310
+
311
+        double actual = arraz.find2ndLargestValueFromArrayDouble(spiffyHandyIntArray);
312
+        Assert.assertEquals(expected,actual, 0.001);
313
+    }
314
+    @Test
315
+   public void test1makeMeAnArrayListFromArray(){
316
+        Integer[] spiffyHandyIntArray = {4,99,8,};
317
+        List<Integer> list = new ArrayList<Integer>();
318
+        list.add(4);
319
+        list.add(99);
320
+        list.add(8);
321
+        List<Integer> actual = arraz.makeMeAnArrayListFromArray(spiffyHandyIntArray);
322
+
323
+        Assert.assertEquals(list,actual);
324
+
325
+
326
+    }
327
+    @Test
328
+    public void test2makeMeAnArrayListFromArray(){
329
+        Integer[] spiffyHandyIntArray = {22,100,3};
330
+        List<Integer> list = new ArrayList<Integer>();
331
+        list.add(22);
332
+        list.add(100);
333
+        list.add(3);
334
+        List<Integer> actual = arraz.makeMeAnArrayListFromArray(spiffyHandyIntArray);
335
+
336
+        Assert.assertEquals(list,actual);
337
+
338
+
339
+    }
340
+    @Test
341
+    public void test1MakeAnArrayFromList(){
342
+
343
+        List<Integer> list = new ArrayList<Integer>();
344
+        list.add(22);
345
+        list.add(100);
346
+        list.add(3);
347
+        Integer [] expecte = {22,100,3};
348
+       Integer [] actual = arraz.makeMeAnArrayFromArrayList(list);
349
+
350
+
351
+        Assert.assertEquals(expecte,actual);
352
+
353
+
354
+    }
355
+
356
+    @Test
357
+    public void test2MakeAnArrayFromList(){
358
+
359
+        List<Integer> list = new ArrayList<Integer>();
360
+        list.add(1);
361
+        list.add(10);
362
+        list.add(3);
363
+        Integer [] expecte = {1,10,3};
364
+        Integer [] actual = arraz.makeMeAnArrayFromArrayList(list);
365
+
366
+
367
+        Assert.assertEquals(expecte,actual);
368
+
369
+
370
+    }
371
+    @Test
372
+    public void test1check2ArraysForEqual(){
373
+        int [] arr1 = {1,2,3};
374
+        int [] arr2 = { 1,2,3};
375
+        Assert.assertTrue(arraz.check2ArraysForEqual(arr1,arr2));
376
+    }
377
+
378
+    @Test
379
+    public void test2check2ArraysForEqual(){
380
+        int [] arr1 = {1,2,22,3,45};
381
+        int [] arr2 = { 1,2,22,3,45};
382
+        Assert.assertTrue(arraz.check2ArraysForEqual(arr1,arr2));
383
+    }
384
+    @Test
385
+    public void test1averageArrayWithoutMaxMin(){
386
+        Integer [] arr1 = {1,2,22,3,45,33};
387
+        int expected = 9;
388
+        int actual = arraz.averageArrayWithoutMaxMin(arr1);
389
+        Assert.assertEquals(expected,actual);
390
+    }
391
+    @Test
392
+    public void test2averageArrayWithoutMaxMin(){
393
+        Integer [] arr1 = {1,2,3,4,33};
394
+        int expected = 3;
395
+        int actual = arraz.averageArrayWithoutMaxMin(arr1);
396
+        Assert.assertEquals(expected,actual);
397
+    }
398
+    @Test
399
+     public void test1arrayHas65and77(){
400
+        Integer [] arr1 = {65,77};
401
+
402
+        Assert.assertTrue(arraz.arrayHas65and77(arr1));
403
+
404
+     }
405
+    @Test
406
+    public void test2arrayHas65and77(){
407
+        Integer[] arr1 = {1,2,3,4,33};
408
+
409
+        Assert.assertFalse(arraz.arrayHas65and77(arr1));
410
+
411
+    }
412
+
413
+    @Test
414
+    public void test1theTotalOfTensIs30(){
415
+        int [] arr1 = {1,20,10,4,10,5,6,10};
416
+        Assert.assertTrue(arraz.theTotalofTensIs30(arr1));
417
+    }
418
+    @Test
419
+    public void test2theTotalOfTensIs30(){
420
+        int [] arr1 = {1,20,10,4,5,6,10};
421
+        Assert.assertFalse(arraz.theTotalofTensIs30(arr1));
422
+    }
423
+
424
+    @Test
425
+    public void test1findSmallerAndSecondSmaller(){
426
+        Integer[] arr1 = {1,20,10,4,5,6,10};
427
+        int expected = 14;
428
+        int actual = arraz.findSmallerAndSecondSmaller(arr1);
429
+        Assert.assertEquals(expected,actual);
430
+    }
431
+    @Test
432
+    public void test2findSmallerAndSecondSmaller(){
433
+        Integer[] arr1 = {7,20,10,4,5,6,10};
434
+        int expected = 45;
435
+        int actual = arraz.findSmallerAndSecondSmaller(arr1);
436
+        Assert.assertEquals(expected,actual);
437
+    }
438
+
439
+   @Test
440
+    public void test1RemoveLastItemAndCopy(){
441
+       Integer[] arr1 = {1,20,10,4,5,6,10};
442
+       Integer[] expected= {1,20,10,4,5,6};
443
+       Integer [] actual = arraz.removeLastItemAndCopy(arr1);
444
+       Assert.assertTrue(Arrays.equals(expected,actual));
445
+
446
+   }
447
+    @Test
448
+    public void test2RemoveLastItemAndCopy(){
449
+        Integer[] arr1 = {5,6,10};
450
+        Integer[] expected= {5,6};
451
+        Integer [] actual = arraz.removeLastItemAndCopy(arr1);
452
+        Assert.assertTrue(Arrays.equals(expected,actual));
453
+
454
+    }
455
+
456
+
457
+    @Test
458
+    public void test1RemoveFirstItemAndCopy() {
459
+        Integer[] arr1 = {5, 6, 10};
460
+        Integer[] expected = {6, 10};
461
+        Integer[] actual = arraz.removeFirstItemAndCopy(arr1);
462
+        Assert.assertTrue(Arrays.equals(expected, actual));
463
+
464
+    }
465
+    @Test
466
+    public void test2RemoveFirstItemAndCopy() {
467
+        Integer[] arr1 = { 6,10,88,9};
468
+        Integer[] expected = {10,88,9};
469
+        Integer[] actual = arraz.removeFirstItemAndCopy(arr1);
470
+        Assert.assertTrue(Arrays.equals(expected, actual));
471
+
472
+    }
473
+    @Test
474
+    public void test1InsertAtStatAndCopy() {
475
+        Integer [] arr1 = {6,10,88,9};
476
+        Integer num = 2;
477
+        Integer [] expected = {2,6,10,88,9};
478
+        Integer[] actual = arraz.insertAtStartAndCopy(arr1,num);
479
+      Assert.assertEquals(expected, actual);
480
+
481
+    }
482
+    @Test
483
+    public void test2InsertAtStatAndCopy() {
484
+        Integer [] arr1 = {6,10,88,9};
485
+        Integer num = 88;
486
+        Integer [] expected = {88,6,10,88,9};
487
+        Integer[] actual = arraz.insertAtStartAndCopy(arr1,num);
488
+        Assert.assertEquals(expected, actual);
489
+
490
+    }
491
+    @Test
492
+    public void test1InsertAtEndAndCopy() {
493
+        Integer [] arr1 = {6,10,88,9};
494
+        Integer num = 82;
495
+        Integer [] expected = {6,10,88,9,82};
496
+        Integer[] actual = arraz.insertAtEndAndCopy(arr1,num);
497
+        Assert.assertEquals(expected, actual);
498
+
499
+    }
500
+    @Test
501
+    public void test2InsertAtEndAndCopy() {
502
+        Integer [] arr1 = {6,10,88,9};
503
+        Integer num = 3;
504
+        Integer [] expected = {6,10,88,9,3};
505
+        Integer[] actual = arraz.insertAtEndAndCopy(arr1,num);
506
+        Assert.assertEquals(expected, actual);
507
+
508
+    }
509
+    @Test
510
+    public void test1SortArrayIntoEvensThenOdds(){
511
+        Integer [] arr1 = {1,2,3,4,5,6};
512
+        Integer[] expected = {2,4,6,1,3,5};
513
+        Integer[] actual = arraz.sortArrayIntoEvensThenOdds(arr1);
514
+        //System.out.println(Arrays.toString(actual));
515
+        Assert.assertEquals(expected,actual);
516
+    }
517
+    @Test
518
+    public void test2SortArrayIntoEvensThenOdds(){
519
+        Integer [] arr1 = {7,22,33,44,5};
520
+        Integer[] expected = {22,44,5,7,33};
521
+        Integer[] actual = arraz.sortArrayIntoEvensThenOdds(arr1);
522
+        //System.out.println(Arrays.toString(actual));
523
+        Assert.assertEquals(expected,actual);
524
+    }
525
+
526
+
527
+
119 528
 }