Przeglądaj źródła

almost finished mostly completed .. concepts understood

Elliott Stansbury 6 lat temu
rodzic
commit
8b44ca2b3c

+ 4
- 0
.idea/encodings.xml Wyświetl plik

@@ -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>

+ 1
- 0
.idea/misc.xml Wyświetl plik

@@ -7,4 +7,5 @@
7 7
       </list>
8 8
     </option>
9 9
   </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8.0_192" project-jdk-type="JavaSDK" />
10 11
 </project>

+ 287
- 97
.idea/workspace.xml Wyświetl plik

@@ -2,7 +2,12 @@
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$/.idea/encodings.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
5 9
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
6 11
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
7 12
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
8 13
     </list>
@@ -22,7 +27,7 @@
22 27
               <entry file="file://$PROJECT_DIR$/README.md">
23 28
                 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
24 29
                   <state split_layout="SPLIT">
25
-                    <first_editor relative-caret-position="270">
30
+                    <first_editor relative-caret-position="97">
26 31
                       <caret line="18" selection-start-line="18" selection-end-line="18" />
27 32
                     </first_editor>
28 33
                     <second_editor />
@@ -35,25 +40,9 @@
35 40
       </content>
36 41
     </window>
37 42
   </component>
38
-  <component name="FUSProjectUsageTrigger">
39
-    <session id="1306093486">
40
-      <usages-collector id="statistics.lifecycle.project">
41
-        <counts>
42
-          <entry key="project.open.time.3" value="1" />
43
-          <entry key="project.opened" value="1" />
44
-        </counts>
45
-      </usages-collector>
46
-      <usages-collector id="statistics.file.types.open">
47
-        <counts>
48
-          <entry key="Markdown" value="1" />
49
-        </counts>
50
-      </usages-collector>
51
-      <usages-collector id="statistics.file.types.edit">
52
-        <counts>
53
-          <entry key="JAVA" value="2511" />
54
-        </counts>
55
-      </usages-collector>
56
-    </session>
43
+  <component name="ErrorTreeViewConfiguration">
44
+    <option name="hideWarnings" value="true" />
45
+    <option name="HIDE_WARNINGS" value="true" />
57 46
   </component>
58 47
   <component name="FileEditorManager">
59 48
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
@@ -62,26 +51,44 @@
62 51
           <provider selected="true" editor-type-id="text-editor" />
63 52
         </entry>
64 53
       </file>
65
-      <file pinned="false" current-in-tab="false">
54
+      <file pinned="false" current-in-tab="true">
66 55
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
67 56
           <provider selected="true" editor-type-id="text-editor">
68
-            <state relative-caret-position="990">
69
-              <caret line="66" lean-forward="true" selection-start-line="66" selection-end-line="66" />
57
+            <state relative-caret-position="492">
58
+              <caret line="306" selection-start-line="306" selection-end-line="306" />
70 59
               <folding>
71
-                <element signature="e#1055#1056#0" expanded="true" />
72
-                <element signature="e#1093#1094#0" expanded="true" />
60
+                <element signature="imports" expanded="true" />
61
+                <element signature="e#2999#3008#0" expanded="true" />
62
+                <element signature="e#3647#3656#0" expanded="true" />
63
+                <element signature="e#3710#3719#0" expanded="true" />
64
+                <element signature="e#4092#4100#0" expanded="true" />
65
+                <element signature="e#4146#4154#0" expanded="true" />
73 66
               </folding>
74 67
             </state>
75 68
           </provider>
76 69
         </entry>
77 70
       </file>
78
-      <file pinned="false" current-in-tab="true">
71
+      <file pinned="false" current-in-tab="false">
79 72
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
80 73
           <provider selected="true" editor-type-id="text-editor">
81
-            <state relative-caret-position="1525">
82
-              <caret line="141" column="32" selection-start-line="141" selection-start-column="32" selection-end-line="141" selection-end-column="32" />
74
+            <state relative-caret-position="565">
75
+              <caret line="515" column="27" selection-start-line="515" selection-start-column="27" selection-end-line="515" selection-end-column="27" />
76
+              <folding>
77
+                <element signature="imports" expanded="true" />
78
+              </folding>
79
+            </state>
80
+          </provider>
81
+        </entry>
82
+      </file>
83
+      <file pinned="false" current-in-tab="false">
84
+        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
85
+          <provider selected="true" editor-type-id="text-editor">
86
+            <state relative-caret-position="15">
87
+              <caret line="3" column="25" selection-start-column="7" selection-end-line="4" />
83 88
               <folding>
84 89
                 <element signature="imports" expanded="true" />
90
+                <element signature="e#907#908#0" expanded="true" />
91
+                <element signature="e#965#966#0" expanded="true" />
85 92
               </folding>
86 93
             </state>
87 94
           </provider>
@@ -92,36 +99,33 @@
92 99
   <component name="FileTemplateManagerImpl">
93 100
     <option name="RECENT_TEMPLATES">
94 101
       <list>
95
-        <option value="Class" />
96 102
         <option value="JUnit4 Test Class" />
103
+        <option value="Class" />
97 104
       </list>
98 105
     </option>
99 106
   </component>
107
+  <component name="FindInProjectRecents">
108
+    <findStrings>
109
+      <find>remove</find>
110
+      <find>max</find>
111
+      <find>System</find>
112
+      <find>syste</find>
113
+    </findStrings>
114
+  </component>
100 115
   <component name="Git.Settings">
101 116
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
102 117
   </component>
103
-  <component name="GradleLocalSettings">
104
-    <option name="projectSyncType">
105
-      <map>
106
-        <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
107
-      </map>
108
-    </option>
109
-  </component>
110 118
   <component name="IdeDocumentHistory">
111 119
     <option name="CHANGED_PATHS">
112 120
       <list>
113 121
         <option value="$PROJECT_DIR$/README.md" />
122
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
123
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
114 124
         <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
115 125
         <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
116 126
       </list>
117 127
     </option>
118 128
   </component>
119
-  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
120
-  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
121
-  <component name="JsGulpfileManager">
122
-    <detection-done>true</detection-done>
123
-    <sorting>DEFINITION_ORDER</sorting>
124
-  </component>
125 129
   <component name="MavenImportPreferences">
126 130
     <option name="importingSettings">
127 131
       <MavenImportingSettings>
@@ -129,18 +133,16 @@
129 133
       </MavenImportingSettings>
130 134
     </option>
131 135
   </component>
132
-  <component name="ProjectFrameBounds" extendedState="6">
133
-    <option name="x" value="242" />
134
-    <option name="y" value="45" />
135
-    <option name="width" value="1538" />
136
-    <option name="height" value="962" />
136
+  <component name="ProjectFrameBounds" fullScreen="true">
137
+    <option name="width" value="1680" />
138
+    <option name="height" value="1050" />
137 139
   </component>
138 140
   <component name="ProjectView">
139 141
     <navigator proportions="" version="1">
140 142
       <foldersAlwaysOnTop value="true" />
141 143
     </navigator>
142 144
     <panes>
143
-      <pane id="PackagesPane" />
145
+      <pane id="Scope" />
144 146
       <pane id="ProjectPane">
145 147
         <subPane>
146 148
           <expand>
@@ -169,25 +171,51 @@
169 171
             <path>
170 172
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
171 173
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
174
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
175
+              <item name="src" type="462c0819:PsiDirectoryNode" />
176
+              <item name="main" type="462c0819:PsiDirectoryNode" />
177
+              <item name="java" type="462c0819:PsiDirectoryNode" />
178
+            </path>
179
+            <path>
180
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
181
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
182
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
183
+              <item name="src" type="462c0819:PsiDirectoryNode" />
184
+              <item name="test" type="462c0819:PsiDirectoryNode" />
185
+            </path>
186
+            <path>
187
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
188
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
189
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
190
+              <item name="src" type="462c0819:PsiDirectoryNode" />
191
+              <item name="test" type="462c0819:PsiDirectoryNode" />
192
+              <item name="java" type="462c0819:PsiDirectoryNode" />
193
+            </path>
194
+            <path>
195
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
196
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
172 197
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
173 198
             </path>
174 199
           </expand>
175 200
           <select />
176 201
         </subPane>
177 202
       </pane>
178
-      <pane id="Scope" />
203
+      <pane id="PackagesPane" />
179 204
     </panes>
180 205
   </component>
181 206
   <component name="PropertiesComponent">
182 207
     <property name="GO_FMT" value="false" />
183 208
     <property name="WebServerToolWindowFactoryState" value="false" />
184 209
     <property name="aspect.path.notification.shown" value="true" />
185
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544133683494" />
210
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544416316395" />
186 211
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
187 212
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
188 213
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
189 214
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
190
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
215
+    <property name="project.structure.last.edited" value="Facets" />
216
+    <property name="project.structure.proportion" value="0.0" />
217
+    <property name="project.structure.side.proportion" value="0.2" />
218
+    <property name="settings.editor.selected.configurable" value="reference.settings.deploy.options" />
191 219
   </component>
192 220
   <component name="RecentsManager">
193 221
     <key name="CreateTestDialog.RecentsKey">
@@ -210,7 +238,7 @@
210 238
     </option>
211 239
   </component>
212 240
   <component name="RunManager" selected="JUnit.ArrazTest">
213
-    <configuration default="true" type="Applet" factoryName="Applet">
241
+    <configuration default="true" type="Applet">
214 242
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
215 243
       <method v="2">
216 244
         <option name="Make" enabled="true" />
@@ -231,33 +259,44 @@
231 259
         <option name="Make" enabled="true" />
232 260
       </method>
233 261
     </configuration>
234
-    <configuration name="ArrazTest.test1sumValuesOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
262
+    <configuration name="ArrazTest.test1arrayHas65and77" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
263
+      <module name="arraz" />
264
+      <option name="PACKAGE_NAME" value="" />
265
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
266
+      <option name="METHOD_NAME" value="test1arrayHas65and77" />
267
+      <option name="TEST_OBJECT" value="method" />
268
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
269
+      <method v="2">
270
+        <option name="Make" enabled="true" />
271
+      </method>
272
+    </configuration>
273
+    <configuration name="ArrazTest.test1getOddEvensOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
235 274
       <module name="arraz" />
236 275
       <option name="PACKAGE_NAME" value="" />
237 276
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
238
-      <option name="METHOD_NAME" value="test1sumValuesOfArray" />
277
+      <option name="METHOD_NAME" value="test1getOddEvensOfArray" />
239 278
       <option name="TEST_OBJECT" value="method" />
240 279
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
241 280
       <method v="2">
242 281
         <option name="Make" enabled="true" />
243 282
       </method>
244 283
     </configuration>
245
-    <configuration name="ArrazTest.test2sumDoublesOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
284
+    <configuration name="ArrazTest.test1makeMeAnArrayFromArrayList" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
246 285
       <module name="arraz" />
247 286
       <option name="PACKAGE_NAME" value="" />
248 287
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
249
-      <option name="METHOD_NAME" value="test2sumDoublesOfArray" />
288
+      <option name="METHOD_NAME" value="test1makeMeAnArrayFromArrayList" />
250 289
       <option name="TEST_OBJECT" value="method" />
251 290
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
252 291
       <method v="2">
253 292
         <option name="Make" enabled="true" />
254 293
       </method>
255 294
     </configuration>
256
-    <configuration name="ArrazTest.test2sumValuesOfArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
295
+    <configuration name="ArrazTest.test1removeDupesFromArray" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
257 296
       <module name="arraz" />
258 297
       <option name="PACKAGE_NAME" value="" />
259 298
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
260
-      <option name="METHOD_NAME" value="test2sumValuesOfArray" />
299
+      <option name="METHOD_NAME" value="test1removeDupesFromArray" />
261 300
       <option name="TEST_OBJECT" value="method" />
262 301
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
263 302
       <method v="2">
@@ -270,7 +309,7 @@
270 309
         <option name="Make" enabled="true" />
271 310
       </method>
272 311
     </configuration>
273
-    <configuration default="true" type="TestNG" factoryName="TestNG">
312
+    <configuration default="true" type="TestNG">
274 313
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
275 314
       <properties />
276 315
       <listeners />
@@ -278,27 +317,29 @@
278 317
         <option name="Make" enabled="true" />
279 318
       </method>
280 319
     </configuration>
281
-    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
320
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType">
282 321
       <module name="" />
283 322
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
284 323
       <option name="PROGRAM_PARAMETERS" />
285
-      <predefined_log_file id="idea.log" enabled="true" />
324
+      <predefined_log_file enabled="true" id="idea.log" />
286 325
       <method v="2">
287 326
         <option name="Make" enabled="true" />
288 327
       </method>
289 328
     </configuration>
290 329
     <list>
291
-      <item itemvalue="JUnit.ArrazTest.test1sumValuesOfArray" />
292
-      <item itemvalue="JUnit.ArrazTest.test2sumValuesOfArray" />
293 330
       <item itemvalue="JUnit.ArrazTest" />
294
-      <item itemvalue="JUnit.ArrazTest.test2sumDoublesOfArray" />
331
+      <item itemvalue="JUnit.ArrazTest.test1getOddEvensOfArray" />
332
+      <item itemvalue="JUnit.ArrazTest.test1removeDupesFromArray" />
333
+      <item itemvalue="JUnit.ArrazTest.test1makeMeAnArrayFromArrayList" />
334
+      <item itemvalue="JUnit.ArrazTest.test1arrayHas65and77" />
295 335
     </list>
296 336
     <recent_temporary>
297 337
       <list>
298 338
         <item itemvalue="JUnit.ArrazTest" />
299
-        <item itemvalue="JUnit.ArrazTest.test2sumDoublesOfArray" />
300
-        <item itemvalue="JUnit.ArrazTest.test2sumValuesOfArray" />
301
-        <item itemvalue="JUnit.ArrazTest.test1sumValuesOfArray" />
339
+        <item itemvalue="JUnit.ArrazTest.test1arrayHas65and77" />
340
+        <item itemvalue="JUnit.ArrazTest.test1makeMeAnArrayFromArrayList" />
341
+        <item itemvalue="JUnit.ArrazTest.test1removeDupesFromArray" />
342
+        <item itemvalue="JUnit.ArrazTest.test1getOddEvensOfArray" />
302 343
       </list>
303 344
     </recent_temporary>
304 345
   </component>
@@ -316,6 +357,9 @@
316 357
       <workItem from="1543958998826" duration="113000" />
317 358
       <workItem from="1544020724645" duration="762000" />
318 359
       <workItem from="1544126972644" duration="5602000" />
360
+      <workItem from="1544141043948" duration="2002000" />
361
+      <workItem from="1544145067998" duration="6921000" />
362
+      <workItem from="1544199483766" duration="30337000" />
319 363
     </task>
320 364
     <task id="LOCAL-00001" summary="readme and docs">
321 365
       <created>1544021313039</created>
@@ -328,55 +372,54 @@
328 372
     <servers />
329 373
   </component>
330 374
   <component name="TestHistory">
331
-    <history-entry file="ArrazTest_test2sumValuesOfArray - 2018.12.06 at 15h 54m 53s.xml">
332
-      <configuration name="ArrazTest.test2sumValuesOfArray" configurationId="JUnit" />
375
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 25m 20s.xml">
376
+      <configuration name="ArrazTest" configurationId="JUnit" />
333 377
     </history-entry>
334
-    <history-entry file="ArrazTest - 2018.12.06 at 15h 56m 29s.xml">
378
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 27m 15s.xml">
335 379
       <configuration name="ArrazTest" configurationId="JUnit" />
336 380
     </history-entry>
337
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 05m 45s.xml">
381
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 27m 33s.xml">
338 382
       <configuration name="ArrazTest" configurationId="JUnit" />
339 383
     </history-entry>
340
-    <history-entry file="ArrazTest_test2sumDoublesOfArray - 2018.12.06 at 16h 28m 52s.xml">
341
-      <configuration name="ArrazTest.test2sumDoublesOfArray" configurationId="JUnit" />
384
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 28m 18s.xml">
385
+      <configuration name="ArrazTest" configurationId="JUnit" />
342 386
     </history-entry>
343
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 28m 57s.xml">
387
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 29m 04s.xml">
344 388
       <configuration name="ArrazTest" configurationId="JUnit" />
345 389
     </history-entry>
346
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 31m 00s.xml">
390
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 29m 15s.xml">
347 391
       <configuration name="ArrazTest" configurationId="JUnit" />
348 392
     </history-entry>
349
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 36m 54s.xml">
393
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 29m 50s.xml">
350 394
       <configuration name="ArrazTest" configurationId="JUnit" />
351 395
     </history-entry>
352
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 37m 24s.xml">
396
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 30m 32s.xml">
353 397
       <configuration name="ArrazTest" configurationId="JUnit" />
354 398
     </history-entry>
355
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 41m 54s.xml">
399
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 30m 40s.xml">
356 400
       <configuration name="ArrazTest" configurationId="JUnit" />
357 401
     </history-entry>
358
-    <history-entry file="ArrazTest - 2018.12.06 at 16h 42m 33s.xml">
402
+    <history-entry file="ArrazTest - 2018.12.09 at 23h 31m 49s.xml">
359 403
       <configuration name="ArrazTest" configurationId="JUnit" />
360 404
     </history-entry>
361 405
   </component>
362 406
   <component name="TimeTrackingManager">
363
-    <option name="totallyTimeSpent" value="8824000" />
407
+    <option name="totallyTimeSpent" value="48084000" />
364 408
   </component>
365 409
   <component name="ToolWindowManager">
366
-    <frame x="0" y="23" width="1280" height="723" extended-state="6" />
410
+    <frame x="0" y="0" width="1680" height="1050" extended-state="0" />
411
+    <editor active="true" />
367 412
     <layout>
368
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26171243" />
369
-      <window_info id="Structure" order="1" weight="0.25" />
413
+      <window_info content_ui="combo" id="Project" order="0" weight="0.13186814" />
414
+      <window_info id="Structure" order="1" weight="0.24969475" />
370 415
       <window_info id="Image Layers" order="2" />
371 416
       <window_info id="Designer" order="3" />
372 417
       <window_info id="UI Designer" order="4" />
373 418
       <window_info id="Capture Tool" order="5" />
374 419
       <window_info id="Favorites" order="6" side_tool="true" />
375
-      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
376
-      <window_info anchor="bottom" id="Messages" weight="0.3296355" />
377 420
       <window_info anchor="bottom" id="Message" order="0" />
378 421
       <window_info anchor="bottom" id="Find" order="1" />
379
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3296355" />
422
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32959184" />
380 423
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
381 424
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
382 425
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -384,6 +427,9 @@
384 427
       <window_info anchor="bottom" id="Terminal" order="7" />
385 428
       <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
386 429
       <window_info anchor="bottom" id="Version Control" order="9" />
430
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
431
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32857144" />
432
+      <window_info anchor="bottom" id="Docker" order="12" show_stripe_button="false" />
387 433
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
388 434
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
389 435
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -393,39 +439,111 @@
393 439
       <window_info anchor="right" id="Database" order="6" />
394 440
       <window_info anchor="right" id="Palette&#9;" order="7" />
395 441
       <window_info anchor="right" id="Maven Projects" order="8" />
442
+      <window_info anchor="right" id="Maven" order="9" />
396 443
     </layout>
444
+    <layout-to-restore>
445
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13186814" />
446
+      <window_info id="Structure" order="1" weight="0.25" />
447
+      <window_info id="Image Layers" order="2" />
448
+      <window_info id="Designer" order="3" />
449
+      <window_info id="UI Designer" order="4" />
450
+      <window_info id="Capture Tool" order="5" />
451
+      <window_info id="Favorites" order="6" side_tool="true" />
452
+      <window_info anchor="bottom" id="Message" order="0" />
453
+      <window_info anchor="bottom" id="Find" order="1" />
454
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32959184" />
455
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
456
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
457
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
458
+      <window_info anchor="bottom" id="TODO" order="6" />
459
+      <window_info anchor="bottom" id="Terminal" order="7" />
460
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
461
+      <window_info anchor="bottom" id="Version Control" order="9" />
462
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
463
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32857144" />
464
+      <window_info anchor="bottom" id="Docker" order="12" show_stripe_button="false" />
465
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
466
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
467
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
468
+      <window_info anchor="right" id="Palette" order="3" />
469
+      <window_info anchor="right" id="Capture Analysis" order="4" />
470
+      <window_info anchor="right" id="Theme Preview" order="5" />
471
+      <window_info anchor="right" id="Database" order="6" />
472
+      <window_info anchor="right" id="Palette&#9;" order="7" />
473
+      <window_info anchor="right" id="Maven Projects" order="8" />
474
+      <window_info anchor="right" id="Maven" order="9" />
475
+    </layout-to-restore>
397 476
   </component>
398 477
   <component name="TypeScriptGeneratedFilesManager">
399 478
     <option name="version" value="1" />
400 479
   </component>
401
-  <component name="VcsContentAnnotationSettings">
402
-    <option name="myLimit" value="2678400000" />
403
-  </component>
404 480
   <component name="VcsManagerConfiguration">
405 481
     <MESSAGE value="readme and docs" />
406 482
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
407 483
   </component>
408 484
   <component name="editorHistoryManager">
485
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
486
+      <provider selected="true" editor-type-id="text-editor">
487
+        <state relative-caret-position="371">
488
+          <caret line="27" column="20" selection-start-line="27" selection-start-column="20" selection-end-line="27" selection-end-column="20" />
489
+          <folding>
490
+            <element signature="e#209#210#0" expanded="true" />
491
+            <element signature="e#235#236#0" expanded="true" />
492
+            <element signature="e#270#271#0" expanded="true" />
493
+            <element signature="e#300#301#0" expanded="true" />
494
+            <element signature="e#327#328#0" expanded="true" />
495
+            <element signature="e#353#354#0" expanded="true" />
496
+            <element signature="e#388#389#0" expanded="true" />
497
+            <element signature="e#418#419#0" expanded="true" />
498
+            <element signature="e#760#761#0" expanded="true" />
499
+            <element signature="e#815#816#0" expanded="true" />
500
+          </folding>
501
+        </state>
502
+      </provider>
503
+    </entry>
504
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/src.zip!/java/util/ArrayList.java">
505
+      <provider selected="true" editor-type-id="text-editor">
506
+        <state relative-caret-position="210">
507
+          <caret line="656" selection-start-line="656" selection-end-line="656" />
508
+        </state>
509
+      </provider>
510
+    </entry>
409 511
     <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
410 512
       <provider selected="true" editor-type-id="text-editor" />
411 513
     </entry>
412
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
514
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
413 515
       <provider selected="true" editor-type-id="text-editor">
414
-        <state relative-caret-position="990">
415
-          <caret line="66" lean-forward="true" selection-start-line="66" selection-end-line="66" />
516
+        <state relative-caret-position="15">
517
+          <caret line="3" column="25" selection-start-column="7" selection-end-line="4" />
416 518
           <folding>
417
-            <element signature="e#1055#1056#0" expanded="true" />
418
-            <element signature="e#1093#1094#0" expanded="true" />
519
+            <element signature="imports" expanded="true" />
520
+            <element signature="e#907#908#0" expanded="true" />
521
+            <element signature="e#965#966#0" expanded="true" />
419 522
           </folding>
420 523
         </state>
421 524
       </provider>
422 525
     </entry>
423 526
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
424 527
       <provider selected="true" editor-type-id="text-editor">
425
-        <state relative-caret-position="1525">
426
-          <caret line="141" column="32" selection-start-line="141" selection-start-column="32" selection-end-line="141" selection-end-column="32" />
528
+        <state relative-caret-position="565">
529
+          <caret line="515" column="27" selection-start-line="515" selection-start-column="27" selection-end-line="515" selection-end-column="27" />
530
+          <folding>
531
+            <element signature="imports" expanded="true" />
532
+          </folding>
533
+        </state>
534
+      </provider>
535
+    </entry>
536
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
537
+      <provider selected="true" editor-type-id="text-editor">
538
+        <state relative-caret-position="492">
539
+          <caret line="306" selection-start-line="306" selection-end-line="306" />
427 540
           <folding>
428 541
             <element signature="imports" expanded="true" />
542
+            <element signature="e#2999#3008#0" expanded="true" />
543
+            <element signature="e#3647#3656#0" expanded="true" />
544
+            <element signature="e#3710#3719#0" expanded="true" />
545
+            <element signature="e#4092#4100#0" expanded="true" />
546
+            <element signature="e#4146#4154#0" expanded="true" />
429 547
           </folding>
430 548
         </state>
431 549
       </provider>
@@ -433,7 +551,7 @@
433 551
     <entry file="file://$PROJECT_DIR$/README.md">
434 552
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
435 553
         <state split_layout="SPLIT">
436
-          <first_editor relative-caret-position="270">
554
+          <first_editor relative-caret-position="97">
437 555
             <caret line="18" selection-start-line="18" selection-end-line="18" />
438 556
           </first_editor>
439 557
           <second_editor />
@@ -443,6 +561,66 @@
443 561
   </component>
444 562
   <component name="masterDetails">
445 563
     <states>
564
+      <state key="ArtifactsStructureConfigurable.UI">
565
+        <settings>
566
+          <artifact-editor />
567
+          <splitter-proportions>
568
+            <option name="proportions">
569
+              <list>
570
+                <option value="0.2" />
571
+              </list>
572
+            </option>
573
+          </splitter-proportions>
574
+        </settings>
575
+      </state>
576
+      <state key="FacetStructureConfigurable.UI">
577
+        <settings>
578
+          <last-edited>No facets are configured</last-edited>
579
+          <splitter-proportions>
580
+            <option name="proportions">
581
+              <list>
582
+                <option value="0.2" />
583
+              </list>
584
+            </option>
585
+          </splitter-proportions>
586
+        </settings>
587
+      </state>
588
+      <state key="GlobalLibrariesConfigurable.UI">
589
+        <settings>
590
+          <splitter-proportions>
591
+            <option name="proportions">
592
+              <list>
593
+                <option value="0.2" />
594
+              </list>
595
+            </option>
596
+          </splitter-proportions>
597
+        </settings>
598
+      </state>
599
+      <state key="JdkListConfigurable.UI">
600
+        <settings>
601
+          <last-edited>1.8.0_192</last-edited>
602
+          <splitter-proportions>
603
+            <option name="proportions">
604
+              <list>
605
+                <option value="0.2" />
606
+              </list>
607
+            </option>
608
+          </splitter-proportions>
609
+        </settings>
610
+      </state>
611
+      <state key="ModuleStructureConfigurable.UI">
612
+        <settings>
613
+          <last-edited>ArraysGoneWild</last-edited>
614
+          <splitter-proportions>
615
+            <option name="proportions">
616
+              <list>
617
+                <option value="0.2" />
618
+                <option value="0.6" />
619
+              </list>
620
+            </option>
621
+          </splitter-proportions>
622
+        </settings>
623
+      </state>
446 624
       <state key="ProjectJDKs.UI">
447 625
         <settings>
448 626
           <last-edited>1.8</last-edited>
@@ -455,6 +633,18 @@
455 633
           </splitter-proportions>
456 634
         </settings>
457 635
       </state>
636
+      <state key="ProjectLibrariesConfigurable.UI">
637
+        <settings>
638
+          <last-edited>Maven: junit:junit:4.0</last-edited>
639
+          <splitter-proportions>
640
+            <option name="proportions">
641
+              <list>
642
+                <option value="0.2" />
643
+              </list>
644
+            </option>
645
+          </splitter-proportions>
646
+        </settings>
647
+      </state>
458 648
     </states>
459 649
   </component>
460 650
 </project>

+ 1
- 1
arraz/arraz.iml Wyświetl plik

@@ -9,7 +9,7 @@
9 9
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10 10
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 11
     </content>
12
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
12
+    <orderEntry type="inheritedJdk" />
13 13
     <orderEntry type="sourceFolder" forTests="false" />
14 14
     <orderEntry type="library" name="Maven: junit:junit:4.0" level="project" />
15 15
   </component>

+ 238
- 1
arraz/src/main/java/Arraz.java Wyświetl plik

@@ -1,3 +1,6 @@
1
+import java.io.UncheckedIOException;
2
+import java.util.*;
3
+
1 4
 public class Arraz {
2 5
 
3 6
 
@@ -62,10 +65,244 @@ public class Arraz {
62 65
     }
63 66
 
64 67
     public static int[] reverseArray(int[] arr) {
65
-        int temp;
68
+
69
+        for(int i = 0; i < arr.length/2; i++){
70
+            int temp = arr[i];
71
+
72
+            arr[i] = arr[arr.length-i-1];
73
+            arr[arr.length-i-1] = temp;
74
+        }
75
+
76
+        return arr;
77
+
78
+    }
79
+
80
+    public static OddEven getOddEvensOfArray(int[] arr){
81
+        int odd = 0;
82
+        int even = 0;
83
+
84
+        for(int i = 0; i < arr.length; i++){
85
+            if(arr[i] % 2 == 0){
86
+                even++;
87
+            }else {
88
+                odd++;
89
+            }
90
+        }
91
+
92
+        return new OddEven(even,odd);
93
+    }
94
+
95
+    public static int findIndexOf(int[] arr, int n) {
96
+
97
+        for(int i = 0; i <arr.length; i++){
98
+            if(arr[i] == n){
99
+                return i;
100
+            }
101
+        }return -1;
102
+
103
+
104
+    }
105
+
106
+    public static Integer[] copyArrayByIterator(Integer[] arr) {
107
+
108
+        Iterator<Integer> iterator = Arrays.asList(arr).iterator();
109
+        Integer[] newArr = new Integer[arr.length];
110
+        int i = 0;
111
+
112
+        while(iterator.hasNext()){
113
+            newArr[i] = iterator.next();
114
+            i++;
115
+        }
116
+        return newArr;
117
+    }
118
+
119
+    public static int[] copyArrayByLoop(int[] arr) {
120
+        int[] newArr = new int[arr.length];
121
+
122
+        for(int i = 0; i < arr.length; i++){
123
+            newArr[i] = arr[i];
124
+        }
125
+        return newArr;
126
+    }
127
+
128
+
129
+    public static int[] toIntArray(Integer[] array){
130
+        int[] ret = new int[array.length];
131
+        for(int i = 0; i < array.length;i++){
132
+            ret[i] = array[i];
133
+        }
134
+        return ret;
135
+    }
136
+
137
+
138
+    public static int[] removeElementFromArray(int[] arr, Integer number) {
139
+
140
+
141
+        ArrayList<Integer> list = new ArrayList<Integer>();
142
+
143
+        for(int n : arr){
144
+            list.add(n);
145
+        }
146
+
147
+        for(int m : arr) {
148
+            list.remove(new Integer(number));
149
+        }
150
+
151
+        Integer[] elementRemovedArray = list.toArray(new Integer[list.size()]);
152
+
153
+
154
+
155
+        return  toIntArray(elementRemovedArray );
156
+    }
157
+
158
+    public static int[] insertIntoArrayAt(int[] arr, int index, int number) {
159
+
160
+        int[] newArr = new int[arr.length+1];
161
+
66 162
         for(int i = 0; i < arr.length; i++){
67 163
 
164
+            if(i == index){
165
+                arr[index] = number;
166
+            }
167
+            newArr[i] = arr[i];
68 168
         }
169
+        return newArr;
170
+    }
171
+
172
+    public static MaxMin findMaxMinOfArray(int[] arr) {
173
+
174
+        Arrays.sort(arr);
175
+
176
+        int max = arr[arr.length-1];
177
+        int min = arr[0];
69 178
 
179
+        return new MaxMin(max,min);
70 180
     }
181
+
182
+    public static Integer[] removeDupesFromArray(Integer[] arr) {
183
+
184
+
185
+        ArrayList<Integer> list = new ArrayList<Integer>();
186
+
187
+        HashSet<Integer> set = new HashSet<Integer>();
188
+
189
+        for(Integer n : arr){
190
+            list.add(n);
191
+        }
192
+
193
+        set.addAll(list);
194
+        list.clear();
195
+        list.addAll(set);
196
+
197
+
198
+        Integer[] array = list.toArray(new Integer[0]);
199
+
200
+        Arrays.sort(array);
201
+        return array;
202
+    }
203
+
204
+
205
+    public static double find2ndLargestValueFromArray(double[] arr) {
206
+
207
+        ArrayList<Double> list = new ArrayList<Double>();
208
+
209
+        HashSet<Double> set = new HashSet<Double>();
210
+
211
+        for(Double n : arr){
212
+            list.add(n);
213
+        }
214
+
215
+        set.addAll(list);
216
+        list.clear();
217
+        list.addAll(set);
218
+
219
+        Double[] array = list.toArray(new Double[0]);
220
+
221
+        Arrays.sort(array);
222
+
223
+
224
+        for (int i = 0 ; i < array.length; i++){
225
+            if(array[i] != array[i + i]){
226
+                return array[array.length-2];
227
+            }
228
+        }
229
+            return -1;
230
+    }
231
+
232
+
233
+    public static ArrayList makeMeAnArrayListFromArray(Object[] array) {
234
+
235
+        ArrayList arrayList = new ArrayList(Arrays.asList(array));
236
+
237
+        return arrayList;
238
+    }
239
+
240
+    public static Object[] makeMeAnArrayFromArrayList(ArrayList arrayList) {
241
+
242
+        Object[] arr = arrayList.toArray();
243
+
244
+        return arr;
245
+    }
246
+
247
+    public static boolean check2ArraysForEqual(Object[] arr1, Object[] arr2) {
248
+
249
+
250
+        int counter = 0;
251
+        for(int i = 0; i < arr1.length; i++){
252
+            for(int j = 0; j < arr2.length; j++){
253
+                if(arr1[i] == arr2[j]){
254
+                    counter++;
255
+                }
256
+            }
257
+        }
258
+        if(counter == arr1.length && counter == arr2.length){
259
+            return true;
260
+        }
261
+        return false;
262
+    }
263
+
264
+    public static int averageArrayWithoutMaxMin(int[] array) {
265
+
266
+        MaxMin maxMin = findMaxMinOfArray(array);
267
+
268
+        int max = maxMin.getMax();
269
+        int min = maxMin.getMin();
270
+
271
+
272
+
273
+        int[] arrayWithoutMax = removeElementFromArray(array,max);
274
+
275
+        int[] arrayWithoutBoth = removeElementFromArray(arrayWithoutMax,min);
276
+
277
+
278
+
279
+        return averageOfArrays(arrayWithoutBoth);
280
+    }
281
+
282
+    public static boolean arrayHas65and77(int[] array){
283
+        int counter = 0;
284
+
285
+        if(containsValue(array,65) && containsValue(array, 77)){
286
+            return true;
287
+        }
288
+
289
+//        if(containsValue(array,77)){
290
+//            counter++;
291
+//        }
292
+//        for (int i = 0 ; i < array.length; i++){
293
+//            if(array[i] == 65){
294
+//                counter++;
295
+//            }
296
+//            else if(array[i] == 77){
297
+//                counter++;
298
+//            }
299
+//        }
300
+
301
+//        if(counter >= 2){
302
+//            return true;
303
+//        }
304
+        return false;
305
+    }
306
+
307
+
71 308
 }

+ 44
- 0
arraz/src/main/java/MaxMin.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+import java.util.Objects;
2
+
3
+public class MaxMin {
4
+    public int max;
5
+    public int min;
6
+
7
+    public MaxMin() {
8
+    }
9
+
10
+    public MaxMin(int max, int min) {
11
+        this.max = max;
12
+        this.min = min;
13
+    }
14
+
15
+    public int getMax() {
16
+        return max;
17
+    }
18
+
19
+    public void setMax(int max) {
20
+        this.max = max;
21
+    }
22
+
23
+    public int getMin() {
24
+        return min;
25
+    }
26
+
27
+    public void setMin(int min) {
28
+        this.min = min;
29
+    }
30
+
31
+    @Override
32
+    public boolean equals(Object o) {
33
+        if (this == o) return true;
34
+        if (!(o instanceof MaxMin)) return false;
35
+        MaxMin maxMin = (MaxMin) o;
36
+        return getMax() == maxMin.getMax() &&
37
+                getMin() == maxMin.getMin();
38
+    }
39
+
40
+    @Override
41
+    public int hashCode() {
42
+        return Objects.hash(getMax(), getMin());
43
+    }
44
+}

+ 49
- 0
arraz/src/main/java/OddEven.java Wyświetl plik

@@ -0,0 +1,49 @@
1
+import javax.xml.bind.annotation.XmlType;
2
+import java.lang.reflect.Array;
3
+import java.util.ArrayList;
4
+import java.util.Objects;
5
+
6
+public class OddEven {
7
+    public int evens;
8
+    public int odds;
9
+
10
+    public OddEven(int evens, int odds) {
11
+        this.evens = evens;
12
+        this.odds = odds;
13
+    }
14
+
15
+    public OddEven() {
16
+    }
17
+
18
+    public int getEvens() {
19
+        return evens;
20
+    }
21
+
22
+    public void setEvens(int evens) {
23
+        this.evens = evens;
24
+    }
25
+
26
+    public int getOdds() {
27
+        return odds;
28
+    }
29
+
30
+    public void setOdds(int odds) {
31
+        this.odds = odds;
32
+    }
33
+
34
+    @Override
35
+    public boolean equals(Object o) {
36
+        if (this == o) return true;
37
+        if (!(o instanceof OddEven)) return false;
38
+        OddEven oddEven = (OddEven) o;
39
+        return getEvens() == oddEven.getEvens() &&
40
+                getOdds() == oddEven.getOdds();
41
+    }
42
+
43
+    @Override
44
+    public int hashCode() {
45
+        return Objects.hash(getEvens(), getOdds());
46
+    }
47
+
48
+
49
+}

+ 373
- 3
arraz/src/test/java/ArrazTest.java Wyświetl plik

@@ -1,7 +1,7 @@
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 5
 
6 6
 public class ArrazTest {
7 7
 
@@ -136,14 +136,384 @@ public class ArrazTest {
136 136
 
137 137
     @Test
138 138
     public void test1reverseArray(){
139
-        int[] arr = {1,2,3,4,5};
139
+        int[] arr = {1,2,3,4,5,6};
140
+
141
+        int[] expected = {6,5,4,3,2,1};
142
+        int[] actual = Arraz.reverseArray(arr);
143
+
144
+        Assert.assertEquals(expected[0],actual[0]);
145
+
146
+
147
+
148
+    }
149
+
150
+    @Test
151
+    public void test2reverseArray(){
152
+        int[] arr = {1,2,3,4,5,6};
140 153
 
141
-        int[] expected = {5,4,3,2,1};
154
+        int[] expected = {6,5,4,3,2,1};
142 155
         int[] actual = Arraz.reverseArray(arr);
143 156
 
157
+        Assert.assertEquals(expected[4],actual[4]);
158
+
159
+
160
+
161
+    }
162
+
163
+    @Test
164
+    public void test1getOddEvensOfArray(){
165
+
166
+
167
+        int[] arr = {1,2,3,4,6};
168
+
169
+        OddEven expected = new OddEven(3,2);
170
+
171
+        OddEven actual = Arraz.getOddEvensOfArray(arr);
172
+
173
+        Assert.assertEquals(expected,actual);
174
+
175
+    }
176
+
177
+    @Test
178
+    public void test2getOddEvensOfArray(){
179
+
180
+
181
+        int[] arr = {1,5,3,4,7};
182
+
183
+        OddEven expected = new OddEven(1,4);
184
+
185
+        OddEven actual = Arraz.getOddEvensOfArray(arr);
186
+
187
+        Assert.assertEquals(expected,actual);
188
+
189
+    }
190
+
191
+    @Test
192
+    public void test1findIndexOf(){
193
+        int[] arr = {1,2,3,4,5};
194
+
195
+        int expected = 1;
196
+
197
+        int actual = Arraz.findIndexOf(arr, 2);
198
+
199
+        Assert.assertEquals(expected,actual,.01);
200
+    }
201
+
202
+    @Test
203
+    public void test2findIndexOf(){
204
+        int[] arr = {1,2,3,4,5};
205
+
206
+        int expected = -1;
207
+
208
+        int actual = Arraz.findIndexOf(arr, 6);
209
+
210
+        Assert.assertEquals(expected,actual,.01);
211
+    }
212
+
213
+    @Test
214
+    public void test1copyArrayByIterator(){
215
+        Integer[] arr = {1,2,3,4,5};
216
+
217
+        Integer[] expected = {1,2,3,4,5};
218
+
219
+        Integer[] actual = Arraz.copyArrayByIterator(arr);
220
+
221
+        Assert.assertEquals(expected,actual);
222
+    }
223
+
224
+    @Test
225
+    public void test2copyArrayByIterator(){
226
+        Integer[] arr = {1,2,3,4,5,6,7,8,9};
227
+
228
+        Integer[] expected = {1,2,3,4,5,6,7,8,9};
229
+
230
+        Integer[] actual = Arraz.copyArrayByIterator(arr);
231
+
232
+        Assert.assertEquals(expected,actual);
233
+    }
234
+
235
+    @Test
236
+    public void test1copyArrayByLoop(){
237
+        int[] arr = {1,2,3,4,5};
238
+
239
+        int[] expected = {1,2,3,4,5};
240
+        int[] actual = Arraz.copyArrayByLoop(arr);
241
+
242
+        Assert.assertEquals(expected[1],actual[1]);
243
+    }
244
+
245
+    @Test
246
+    public void test2copyArrayByLoop(){
247
+        int[] arr = {11,2,10,4,5};
248
+
249
+        int[] expected = {11,2,10,4,5};
250
+        int[] actual = Arraz.copyArrayByLoop(arr);
251
+
252
+        Assert.assertEquals(expected[1],actual[1]);
253
+        Assert.assertEquals(expected[2],actual[2]);
254
+        Assert.assertEquals(expected[4],actual[4]);
255
+
256
+    }
257
+
258
+    @Test
259
+    public void test1removeElementFromArray(){
260
+        int[] arr =  {1,2,3,4,5};
261
+
262
+        int[] expected = {1,2,4,5};
263
+        int[] actual = Arraz.removeElementFromArray(arr,3);
264
+
265
+
266
+        Assert.assertEquals(expected[1],actual[1]);
267
+        Assert.assertEquals(expected[2],actual[2]);
268
+        Assert.assertEquals(expected[3],actual[3]);
269
+        Assert.assertEquals(expected[0],actual[0]);
270
+
271
+    }
272
+
273
+    @Test
274
+    public void test2removeElementFromArray(){
275
+        int[] arr =  {5,4,3,2,1};
276
+
277
+        int[] expected = {5,3,2,1};
278
+        int[] actual = Arraz.removeElementFromArray(arr,4);
279
+
280
+        Assert.assertEquals(expected[1],actual[1]);
281
+        Assert.assertEquals(expected[2],actual[2]);
282
+        Assert.assertEquals(expected[3],actual[3]);
283
+        Assert.assertEquals(expected[0],actual[0]);
284
+
285
+    }
286
+
287
+    @Test
288
+    public void test1insertIntoArrayAt(){
289
+        int[] arr = {1,2,3,5,6};
290
+
291
+        int[] expected = {1,2,3,4,6};
292
+        int[] actual = Arraz.insertIntoArrayAt(arr,3,4);
293
+
294
+        Assert.assertEquals(expected[3], actual[3]);
295
+        Assert.assertEquals(expected[1], actual[1]);
296
+        Assert.assertEquals(expected[2], actual[2]);
297
+        Assert.assertEquals(expected[4], actual[4]);
298
+
299
+    }
300
+
301
+    @Test
302
+    public void test2insertIntoArrayAt(){
303
+        int[] arr = {10,20,30,50,60};
304
+
305
+        int[] expected = {10,20,30,40,60};
306
+        int[] actual = Arraz.insertIntoArrayAt(arr,3,40);
307
+
308
+        Assert.assertEquals(expected[3], actual[3]);
309
+        Assert.assertEquals(expected[1], actual[1]);
310
+        Assert.assertEquals(expected[2], actual[2]);
311
+        Assert.assertEquals(expected[4], actual[4]);
312
+
313
+    }
314
+
315
+    @Test
316
+    public void test1findMaxMinOfArray(){
317
+        int[] arr = {3,6,8,2,1};
318
+
319
+        MaxMin expected = new MaxMin(8,1);
320
+        MaxMin actual = Arraz.findMaxMinOfArray(arr);
321
+
322
+        Assert.assertEquals(expected,actual);
323
+    }
324
+
325
+    @Test
326
+    public void test2findMaxMinOfArray(){
327
+        int[] arr = {34,16,18,2,11,16,34,2,1,1};
328
+
329
+        MaxMin expected = new MaxMin(34,1);
330
+        MaxMin actual = Arraz.findMaxMinOfArray(arr);
331
+
332
+        Assert.assertEquals(expected,actual);
333
+    }
334
+
335
+    @Test
336
+    public void test1removeDupesFromArray(){
337
+        Integer[] arr = {34,16,18,2,11,16,34,2,1,1};
338
+
339
+        Integer[] expected = {1,2,11,16,18,34};
340
+        Integer[] actual = Arraz.removeDupesFromArray(arr);
341
+
342
+        Assert.assertEquals(expected,actual);
343
+
344
+    }
345
+
346
+    @Test
347
+    public void test2removeDupesFromArray(){
348
+        Integer[] arr = {32,26,28,21,21,26,32,2,1,1};
349
+
350
+        Integer[] expected = {1,2,21,26,28,32};
351
+        Integer[] actual = Arraz.removeDupesFromArray(arr);
352
+
353
+        Assert.assertEquals(expected,actual);
354
+
355
+    }
356
+
357
+    @Test
358
+    public void test1find2ndLargestValueFromArray(){
359
+        double[] arr = {1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10.1};
360
+
361
+        double expected = 9.9;
362
+        double actual = Arraz.find2ndLargestValueFromArray(arr);
363
+
364
+        Assert.assertEquals(expected,actual);
365
+
366
+    }
367
+
368
+    @Test
369
+    public void test2find2ndLargestValueFromArray(){
370
+        double[] arr = {2.2,3.4,5.6,2.1,3.3,3.4,5.6};
371
+
372
+        double expected = 3.4;
373
+        double actual = Arraz.find2ndLargestValueFromArray(arr);
374
+
375
+        Assert.assertEquals(expected,actual);
376
+
377
+    }
378
+
379
+    @Test
380
+    public void test1makeMeAnArrayListFromArray(){
381
+        Object[] array = {1,2,3,4,5,6};
382
+
383
+
384
+        int expected = array.length;
385
+        ArrayList arrayList = Arraz.makeMeAnArrayListFromArray(array);
386
+
387
+        int actual = arrayList.size();
388
+
389
+        Assert.assertEquals(expected,actual);
390
+    }
391
+
392
+    @Test
393
+    public void test2makeMeAnArrayListFromArray(){
394
+        Object[] array = {1,2,3,5,6};
395
+
396
+
397
+        int expected = array.length;
398
+        ArrayList arrayList = Arraz.makeMeAnArrayListFromArray(array);
399
+
400
+        int actual = arrayList.size();
401
+
402
+        Assert.assertEquals(expected,actual);
403
+    }
404
+
405
+    @Test
406
+    public void test1makeMeAnArrayFromArrayList(){
407
+
408
+        ArrayList arrayList = new ArrayList();
409
+        arrayList.add(5);
410
+        arrayList.add(4);
411
+        arrayList.add(6);
412
+        arrayList.add(7);
413
+
414
+
415
+        Object[] array = Arraz.makeMeAnArrayFromArrayList(arrayList);
416
+
417
+        int expected = arrayList.size();
418
+        int actual = array.length;
419
+
420
+        Assert.assertEquals(expected,actual);
421
+    }
422
+
423
+    @Test
424
+    public void test2makeMeAnArrayFromArrayList(){
425
+
426
+        ArrayList arrayList = new ArrayList();
427
+        arrayList.add(5);
428
+        arrayList.add(4);
429
+        arrayList.add(6);
430
+        arrayList.add(7);
431
+        arrayList.add(6);
432
+        arrayList.add(6);
433
+        arrayList.add(6);
434
+        arrayList.add(6);
435
+
436
+
437
+
438
+
439
+        Object[] array = Arraz.makeMeAnArrayFromArrayList(arrayList);
440
+
441
+        int expected = arrayList.size();
442
+        int actual = array.length;
443
+
144 444
         Assert.assertEquals(expected,actual);
445
+    }
446
+
447
+    @Test
448
+    public void test1check2ArraysForEqual(){
449
+
450
+        Object[] arr1 = {1,2,3,4,5};
451
+        Object[] arr2 = {1,2,3,4,5};
452
+
453
+
454
+
455
+       boolean actual = Arraz.check2ArraysForEqual(arr1,arr2);
456
+
457
+       Assert.assertTrue(actual);
458
+    }
459
+
460
+    @Test
461
+    public void test2check2ArraysForEqual(){
462
+
463
+        Object[] arr1 = {1,2,3,4,5};
464
+        Object[] arr2 = {1,2,3,4,5,6};
465
+
466
+
467
+
468
+        boolean actual = Arraz.check2ArraysForEqual(arr1,arr2);
469
+
470
+        Assert.assertFalse(actual);
471
+    }
472
+
473
+    @Test
474
+    public void test1averageArrayWithoutMaxMin(){
475
+
476
+        int[] array = {2,4,6,8,10};
477
+
478
+        int expected = 6;
479
+        int actual = Arraz.averageArrayWithoutMaxMin(array);
480
+
481
+        Assert.assertEquals(expected,actual);
482
+    }
483
+
484
+    @Test
485
+    public void test2averageArrayWithoutMaxMin(){
486
+
487
+        int[] array = {2,2,2,2,2,2,4,6,8,10,10,10,10,10};
488
+
489
+        int average = Arraz.averageOfArrays(array);
490
+        int sum = Arraz.sumIntArray(array);
491
+
492
+        int expected = 6;
493
+        int actual = Arraz.averageArrayWithoutMaxMin(array);
494
+
495
+        Assert.assertEquals(expected,actual);
496
+    }
497
+
498
+    @Test
499
+    public void test1arrayHas65and77(){
500
+
501
+        int[] array = {1,2,3,55,65,77,100};
502
+
503
+        boolean has65and77 = Arraz.arrayHas65and77(array);
504
+
505
+        Assert.assertTrue(has65and77);
506
+
507
+    }
508
+
509
+    @Test
510
+    public void test2arrayHas65and77(){
511
+
512
+        int[] array = {1,2,3,55,77,100};
145 513
 
514
+        boolean has65and77 = Arraz.arrayHas65and77(array);
146 515
 
516
+        Assert.assertFalse(has65and77);
147 517
 
148 518
     }
149 519
 }