Michelle DiMarino 6 лет назад
Родитель
Сommit
34d6874b74

+ 1
- 1
.idea/compiler.xml Просмотреть файл

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

+ 264
- 226
.idea/workspace.xml Просмотреть файл

@@ -2,56 +2,94 @@
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 beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
-      <change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
5
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
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" />
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/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7 13
     </list>
8 14
     <ignored path="$PROJECT_DIR$/arraz/target/" />
9 15
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
-    <option name="TRACKING_ENABLED" value="true" />
11 16
     <option name="SHOW_DIALOG" value="false" />
12 17
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
13 18
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14 19
     <option name="LAST_RESOLUTION" value="IGNORE" />
15 20
   </component>
21
+  <component name="FUSProjectUsageTrigger">
22
+    <session id="1055774410">
23
+      <usages-collector id="statistics.lifecycle.project">
24
+        <counts>
25
+          <entry key="project.closed" value="4" />
26
+          <entry key="project.open.time.10" value="1" />
27
+          <entry key="project.open.time.11" value="1" />
28
+          <entry key="project.open.time.14" value="1" />
29
+          <entry key="project.open.time.9" value="1" />
30
+          <entry key="project.opened" value="4" />
31
+        </counts>
32
+      </usages-collector>
33
+      <usages-collector id="statistics.file.extensions.edit">
34
+        <counts>
35
+          <entry key="java" value="11312" />
36
+        </counts>
37
+      </usages-collector>
38
+      <usages-collector id="statistics.file.types.edit">
39
+        <counts>
40
+          <entry key="JAVA" value="11312" />
41
+        </counts>
42
+      </usages-collector>
43
+      <usages-collector id="statistics.file.extensions.open">
44
+        <counts>
45
+          <entry key="java" value="5" />
46
+        </counts>
47
+      </usages-collector>
48
+      <usages-collector id="statistics.file.types.open">
49
+        <counts>
50
+          <entry key="JAVA" value="5" />
51
+        </counts>
52
+      </usages-collector>
53
+    </session>
54
+  </component>
16 55
   <component name="FileEditorManager">
17 56
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
18
-      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
19
-        <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
20
-          <provider selected="true" editor-type-id="text-editor">
21
-            <state relative-caret-position="0">
22
-              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
23
-              <folding />
24
-            </state>
25
-          </provider>
26
-        </entry>
27
-      </file>
28
-      <file leaf-file-name="Arraz.java" pinned="false" current-in-tab="false">
57
+      <file pinned="false" current-in-tab="false">
29 58
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
30 59
           <provider selected="true" editor-type-id="text-editor">
31
-            <state relative-caret-position="0">
32
-              <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
33
-              <folding />
60
+            <state relative-caret-position="315">
61
+              <caret line="201" column="14" selection-start-line="201" selection-start-column="14" selection-end-line="201" selection-end-column="14" />
62
+              <folding>
63
+                <element signature="imports" expanded="true" />
64
+                <element signature="e#3972#3981#0" expanded="true" />
65
+                <element signature="e#4030#4039#0" expanded="true" />
66
+                <element signature="e#6008#6009#0" expanded="true" />
67
+                <element signature="e#6066#6067#0" expanded="true" />
68
+                <element signature="e#6256#6257#0" expanded="true" />
69
+                <element signature="e#6319#6320#0" expanded="true" />
70
+              </folding>
34 71
             </state>
35 72
           </provider>
36 73
         </entry>
37 74
       </file>
38
-      <file leaf-file-name="ArrazTest.java" pinned="false" current-in-tab="false">
75
+      <file pinned="false" current-in-tab="true">
39 76
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
40 77
           <provider selected="true" editor-type-id="text-editor">
41
-            <state relative-caret-position="34">
42
-              <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
43
-              <folding />
78
+            <state relative-caret-position="5685">
79
+              <caret line="379" column="36" selection-start-line="379" selection-start-column="36" selection-end-line="379" selection-end-column="36" />
80
+              <folding>
81
+                <element signature="imports" expanded="true" />
82
+              </folding>
44 83
             </state>
45 84
           </provider>
46 85
         </entry>
47 86
       </file>
48
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
87
+      <file pinned="false" current-in-tab="false">
49 88
         <entry file="file://$PROJECT_DIR$/README.md">
50 89
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
51 90
             <state split_layout="SPLIT">
52
-              <first_editor relative-caret-position="306">
53
-                <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
54
-                <folding />
91
+              <first_editor relative-caret-position="270">
92
+                <caret line="18" selection-start-line="18" selection-end-line="18" />
55 93
               </first_editor>
56 94
               <second_editor />
57 95
             </state>
@@ -63,8 +101,8 @@
63 101
   <component name="FileTemplateManagerImpl">
64 102
     <option name="RECENT_TEMPLATES">
65 103
       <list>
66
-        <option value="Class" />
67 104
         <option value="JUnit4 Test Class" />
105
+        <option value="Class" />
68 106
       </list>
69 107
     </option>
70 108
   </component>
@@ -72,9 +110,6 @@
72 110
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
73 111
   </component>
74 112
   <component name="GradleLocalSettings">
75
-    <option name="externalProjectsViewState">
76
-      <projects_view />
77
-    </option>
78 113
     <option name="projectSyncType">
79 114
       <map>
80 115
         <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
@@ -84,8 +119,12 @@
84 119
   <component name="IdeDocumentHistory">
85 120
     <option name="CHANGED_PATHS">
86 121
       <list>
87
-        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
88 122
         <option value="$PROJECT_DIR$/README.md" />
123
+        <option value="$PROJECT_DIR$/arraz/src/test/java/OddEven.java" />
124
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
125
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
126
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
127
+        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
89 128
       </list>
90 129
     </option>
91 130
   </component>
@@ -103,23 +142,12 @@
103 142
     </option>
104 143
   </component>
105 144
   <component name="ProjectFrameBounds">
106
-    <option name="x" value="242" />
107
-    <option name="y" value="45" />
108
-    <option name="width" value="1538" />
109
-    <option name="height" value="962" />
145
+    <option name="y" value="23" />
146
+    <option name="width" value="1280" />
147
+    <option name="height" value="709" />
110 148
   </component>
111 149
   <component name="ProjectView">
112
-    <navigator currentView="ProjectPane" proportions="" version="1">
113
-      <flattenPackages />
114
-      <showMembers />
115
-      <showModules />
116
-      <showLibraryContents />
117
-      <hideEmptyPackages />
118
-      <abbreviatePackageNames />
119
-      <autoscrollToSource />
120
-      <autoscrollFromSource />
121
-      <sortByType />
122
-      <manualOrder />
150
+    <navigator proportions="" version="1">
123 151
       <foldersAlwaysOnTop value="true" />
124 152
     </navigator>
125 153
     <panes>
@@ -151,27 +179,30 @@
151 179
             <path>
152 180
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
153 181
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
154
-              <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
182
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
183
+              <item name="src" type="462c0819:PsiDirectoryNode" />
184
+              <item name="main" type="462c0819:PsiDirectoryNode" />
185
+              <item name="java" type="462c0819:PsiDirectoryNode" />
155 186
             </path>
156 187
           </expand>
157 188
           <select />
158 189
         </subPane>
159 190
       </pane>
160
-      <pane id="Scratches" />
161 191
       <pane id="PackagesPane" />
162
-      <pane id="AndroidView" />
163 192
       <pane id="Scope" />
164 193
     </panes>
165 194
   </component>
166 195
   <component name="PropertiesComponent">
167
-    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
168
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
196
+    <property name="GO_FMT" value="false" />
197
+    <property name="SearchEverywhereHistoryKey" value="&#9;FILE&#9;file:///Users/michelledimarino/Labs/ArraysGoneWild/arraz/src/main/java/Arraz.java" />
169 198
     <property name="WebServerToolWindowFactoryState" value="false" />
170 199
     <property name="aspect.path.notification.shown" value="true" />
171
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
172
-    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
200
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544138989453" />
173 201
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
174
-    <property name="GO_FMT" value="false" />
202
+    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
203
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
204
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
205
+    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
175 206
   </component>
176 207
   <component name="RecentsManager">
177 208
     <key name="CreateTestDialog.RecentsKey">
@@ -193,90 +224,111 @@
193 224
       </list>
194 225
     </option>
195 226
   </component>
196
-  <component name="RunManager">
227
+  <component name="RunManager" selected="JUnit.ArrazTest.averageWOMaxMinTest2">
197 228
     <configuration default="true" type="Applet" factoryName="Applet">
198
-      <option name="WIDTH" value="400" />
199
-      <option name="HEIGHT" value="300" />
200 229
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
201
-      <module />
230
+      <method v="2">
231
+        <option name="Make" enabled="true" />
232
+      </method>
202 233
     </configuration>
203 234
     <configuration default="true" type="Application" factoryName="Application">
204
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
205
-      <option name="MAIN_CLASS_NAME" />
206
-      <option name="VM_PARAMETERS" />
207
-      <option name="PROGRAM_PARAMETERS" />
208 235
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
209
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
210
-      <option name="ALTERNATIVE_JRE_PATH" />
211
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
212
-      <option name="ENV_VARIABLES" />
213
-      <option name="PASS_PARENT_ENVS" value="true" />
214
-      <module name="" />
215
-      <envs />
236
+      <method v="2">
237
+        <option name="Make" enabled="true" />
238
+      </method>
216 239
     </configuration>
217
-    <configuration default="true" type="JUnit" factoryName="JUnit">
218
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
219
-      <module name="" />
220
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
221
-      <option name="ALTERNATIVE_JRE_PATH" />
222
-      <option name="PACKAGE_NAME" />
223
-      <option name="MAIN_CLASS_NAME" />
224
-      <option name="METHOD_NAME" />
225
-      <option name="TEST_OBJECT" value="class" />
226
-      <option name="VM_PARAMETERS" value="-ea" />
227
-      <option name="PARAMETERS" />
240
+    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
241
+      <module name="arraz" />
242
+      <option name="PACKAGE_NAME" value="" />
243
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
228 244
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
229
-      <option name="ENV_VARIABLES" />
230
-      <option name="PASS_PARENT_ENVS" value="true" />
231
-      <option name="TEST_SEARCH_SCOPE">
232
-        <value defaultName="singleModule" />
233
-      </option>
234
-      <envs />
235
-      <patterns />
245
+      <method v="2">
246
+        <option name="Make" enabled="true" />
247
+      </method>
236 248
     </configuration>
237
-    <configuration default="true" type="Remote" factoryName="Remote">
238
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
239
-      <option name="SERVER_MODE" value="false" />
240
-      <option name="SHMEM_ADDRESS" value="javadebug" />
241
-      <option name="HOST" value="localhost" />
242
-      <option name="PORT" value="5005" />
249
+    <configuration name="ArrazTest.ArrayListToArrayTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
250
+      <module name="arraz" />
251
+      <option name="PACKAGE_NAME" value="" />
252
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
253
+      <option name="METHOD_NAME" value="ArrayListToArrayTest2" />
254
+      <option name="TEST_OBJECT" value="method" />
255
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
256
+      <method v="2">
257
+        <option name="Make" enabled="true" />
258
+      </method>
259
+    </configuration>
260
+    <configuration name="ArrazTest.averageWOMaxMinTest1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
261
+      <module name="arraz" />
262
+      <option name="PACKAGE_NAME" value="" />
263
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
264
+      <option name="METHOD_NAME" value="averageWOMaxMinTest1" />
265
+      <option name="TEST_OBJECT" value="method" />
266
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
267
+      <method v="2">
268
+        <option name="Make" enabled="true" />
269
+      </method>
270
+    </configuration>
271
+    <configuration name="ArrazTest.averageWOMaxMinTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272
+      <module name="arraz" />
273
+      <option name="PACKAGE_NAME" value="" />
274
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
275
+      <option name="METHOD_NAME" value="averageWOMaxMinTest2" />
276
+      <option name="TEST_OBJECT" value="method" />
277
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
278
+      <method v="2">
279
+        <option name="Make" enabled="true" />
280
+      </method>
281
+    </configuration>
282
+    <configuration name="ArrazTest.removeDupesTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
283
+      <module name="arraz" />
284
+      <option name="PACKAGE_NAME" value="" />
285
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
+      <option name="METHOD_NAME" value="removeDupesTest2" />
287
+      <option name="TEST_OBJECT" value="method" />
288
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
289
+      <method v="2">
290
+        <option name="Make" enabled="true" />
291
+      </method>
292
+    </configuration>
293
+    <configuration default="true" type="JUnit" factoryName="JUnit">
294
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
295
+      <method v="2">
296
+        <option name="Make" enabled="true" />
297
+      </method>
243 298
     </configuration>
244 299
     <configuration default="true" type="TestNG" factoryName="TestNG">
245
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
246
-      <module name="" />
247
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
248
-      <option name="ALTERNATIVE_JRE_PATH" />
249
-      <option name="SUITE_NAME" />
250
-      <option name="PACKAGE_NAME" />
251
-      <option name="MAIN_CLASS_NAME" />
252
-      <option name="METHOD_NAME" />
253
-      <option name="GROUP_NAME" />
254
-      <option name="TEST_OBJECT" value="CLASS" />
255
-      <option name="VM_PARAMETERS" value="-ea" />
256
-      <option name="PARAMETERS" />
257 300
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
258
-      <option name="OUTPUT_DIRECTORY" />
259
-      <option name="ANNOTATION_TYPE" />
260
-      <option name="ENV_VARIABLES" />
261
-      <option name="PASS_PARENT_ENVS" value="true" />
262
-      <option name="TEST_SEARCH_SCOPE">
263
-        <value defaultName="singleModule" />
264
-      </option>
265
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
266
-      <option name="PROPERTIES_FILE" />
267
-      <envs />
268 301
       <properties />
269 302
       <listeners />
303
+      <method v="2">
304
+        <option name="Make" enabled="true" />
305
+      </method>
270 306
     </configuration>
271 307
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
272 308
       <module name="" />
273 309
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
274 310
       <option name="PROGRAM_PARAMETERS" />
275 311
       <predefined_log_file id="idea.log" enabled="true" />
312
+      <method v="2">
313
+        <option name="Make" enabled="true" />
314
+      </method>
276 315
     </configuration>
277
-  </component>
278
-  <component name="ShelveChangesManager" show_recycled="false">
279
-    <option name="remove_strategy" value="false" />
316
+    <list>
317
+      <item itemvalue="JUnit.ArrazTest" />
318
+      <item itemvalue="JUnit.ArrazTest.ArrayListToArrayTest2" />
319
+      <item itemvalue="JUnit.ArrazTest.removeDupesTest2" />
320
+      <item itemvalue="JUnit.ArrazTest.averageWOMaxMinTest1" />
321
+      <item itemvalue="JUnit.ArrazTest.averageWOMaxMinTest2" />
322
+    </list>
323
+    <recent_temporary>
324
+      <list>
325
+        <item itemvalue="JUnit.ArrazTest.averageWOMaxMinTest2" />
326
+        <item itemvalue="JUnit.ArrazTest.averageWOMaxMinTest1" />
327
+        <item itemvalue="JUnit.ArrazTest.removeDupesTest2" />
328
+        <item itemvalue="JUnit.ArrazTest.ArrayListToArrayTest2" />
329
+        <item itemvalue="JUnit.ArrazTest" />
330
+      </list>
331
+    </recent_temporary>
280 332
   </component>
281 333
   <component name="SvnConfiguration">
282 334
     <configuration />
@@ -291,6 +343,10 @@
291 343
       <workItem from="1543955862749" duration="2347000" />
292 344
       <workItem from="1543958998826" duration="113000" />
293 345
       <workItem from="1544020724645" duration="762000" />
346
+      <workItem from="1544046506124" duration="10562000" />
347
+      <workItem from="1544100898447" duration="1305000" />
348
+      <workItem from="1544119638912" duration="9841000" />
349
+      <workItem from="1544137059056" duration="1924000" />
294 350
     </task>
295 351
     <task id="LOCAL-00001" summary="readme and docs">
296 352
       <created>1544021313039</created>
@@ -302,39 +358,73 @@
302 358
     <option name="localTasksCounter" value="2" />
303 359
     <servers />
304 360
   </component>
361
+  <component name="TestHistory">
362
+    <history-entry file="ArrazTest_removeDupesTest1 - 2018.12.06 at 18h 14m 33s.xml">
363
+      <configuration name="ArrazTest.removeDupesTest1" configurationId="JUnit" />
364
+    </history-entry>
365
+    <history-entry file="ArrazTest_removeDupesTest1 - 2018.12.06 at 18h 14m 49s.xml">
366
+      <configuration name="ArrazTest.removeDupesTest1" configurationId="JUnit" />
367
+    </history-entry>
368
+    <history-entry file="ArrazTest_removeDupesTest1 - 2018.12.06 at 18h 15m 16s.xml">
369
+      <configuration name="ArrazTest.removeDupesTest1" configurationId="JUnit" />
370
+    </history-entry>
371
+    <history-entry file="ArrazTest - 2018.12.06 at 18h 18m 14s.xml">
372
+      <configuration name="ArrazTest" configurationId="JUnit" />
373
+    </history-entry>
374
+    <history-entry file="ArrazTest_ArrayListToArrayTest2 - 2018.12.06 at 18h 18m 46s.xml">
375
+      <configuration name="ArrazTest.ArrayListToArrayTest2" configurationId="JUnit" />
376
+    </history-entry>
377
+    <history-entry file="ArrazTest_removeDupesTest2 - 2018.12.06 at 18h 19m 46s.xml">
378
+      <configuration name="ArrazTest.removeDupesTest2" configurationId="JUnit" />
379
+    </history-entry>
380
+    <history-entry file="ArrazTest_averageWOMaxMinTest1 - 2018.12.06 at 18h 26m 52s.xml">
381
+      <configuration name="ArrazTest.averageWOMaxMinTest1" configurationId="JUnit" />
382
+    </history-entry>
383
+    <history-entry file="ArrazTest_averageWOMaxMinTest1 - 2018.12.06 at 18h 27m 44s.xml">
384
+      <configuration name="ArrazTest.averageWOMaxMinTest1" configurationId="JUnit" />
385
+    </history-entry>
386
+    <history-entry file="ArrazTest_averageWOMaxMinTest1 - 2018.12.06 at 18h 28m 34s.xml">
387
+      <configuration name="ArrazTest.averageWOMaxMinTest1" configurationId="JUnit" />
388
+    </history-entry>
389
+    <history-entry file="ArrazTest_averageWOMaxMinTest2 - 2018.12.06 at 18h 29m 40s.xml">
390
+      <configuration name="ArrazTest.averageWOMaxMinTest2" configurationId="JUnit" />
391
+    </history-entry>
392
+  </component>
305 393
   <component name="TimeTrackingManager">
306
-    <option name="totallyTimeSpent" value="3222000" />
394
+    <option name="totallyTimeSpent" value="26854000" />
307 395
   </component>
308 396
   <component name="ToolWindowManager">
309
-    <frame x="242" y="45" width="1538" height="962" extended-state="0" />
397
+    <frame x="0" y="23" width="1280" height="709" extended-state="6" />
310 398
     <editor active="true" />
311 399
     <layout>
312
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
313
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
314
-      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
315
-      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
316
-      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
317
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
318
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
319
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
320
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
321
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
322
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
323
-      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
324
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2577389" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
325
-      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
326
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
327
-      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
328
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
329
-      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
330
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
331
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
332
-      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
333
-      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
334
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
335
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
336
-      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
337
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
400
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.27382874" />
401
+      <window_info id="Structure" order="1" weight="0.25" />
402
+      <window_info id="Image Layers" order="2" />
403
+      <window_info id="Designer" order="3" />
404
+      <window_info id="UI Designer" order="4" />
405
+      <window_info id="Capture Tool" order="5" />
406
+      <window_info id="Favorites" order="6" side_tool="true" />
407
+      <window_info anchor="bottom" id="Message" order="0" />
408
+      <window_info anchor="bottom" id="Find" order="1" />
409
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32901135" />
410
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.3987034" />
411
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
412
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
413
+      <window_info anchor="bottom" id="TODO" order="6" />
414
+      <window_info anchor="bottom" id="Terminal" order="7" />
415
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
416
+      <window_info anchor="bottom" id="Version Control" order="9" />
417
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
418
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32901135" />
419
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
420
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
421
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
422
+      <window_info anchor="right" id="Palette" order="3" />
423
+      <window_info anchor="right" id="Capture Analysis" order="4" />
424
+      <window_info anchor="right" id="Theme Preview" order="5" />
425
+      <window_info anchor="right" id="Database" order="6" />
426
+      <window_info anchor="right" id="Palette&#9;" order="7" />
427
+      <window_info anchor="right" id="Maven Projects" order="8" />
338 428
     </layout>
339 429
   </component>
340 430
   <component name="TypeScriptGeneratedFilesManager">
@@ -347,113 +437,61 @@
347 437
     <MESSAGE value="readme and docs" />
348 438
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
349 439
   </component>
350
-  <component name="XDebuggerManager">
351
-    <breakpoint-manager />
352
-    <watches-manager />
353
-  </component>
354 440
   <component name="editorHistoryManager">
355 441
     <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
356
-      <provider selected="true" editor-type-id="text-editor">
357
-        <state relative-caret-position="0">
358
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
359
-          <folding />
360
-        </state>
361
-      </provider>
442
+      <provider selected="true" editor-type-id="text-editor" />
362 443
     </entry>
363
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
444
+    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/OddEven.java" />
445
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
364 446
       <provider selected="true" editor-type-id="text-editor">
365
-        <state relative-caret-position="0">
366
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
367
-          <folding />
447
+        <state relative-caret-position="150">
448
+          <caret line="10" column="25" lean-forward="true" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
368 449
         </state>
369 450
       </provider>
370 451
     </entry>
371
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
452
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
372 453
       <provider selected="true" editor-type-id="text-editor">
373
-        <state relative-caret-position="34">
374
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
375
-          <folding />
454
+        <state relative-caret-position="165">
455
+          <caret line="13" column="30" selection-start-line="13" selection-start-column="30" selection-end-line="13" selection-end-column="30" />
456
+          <folding>
457
+            <element signature="e#322#323#0" expanded="true" />
458
+          </folding>
376 459
         </state>
377 460
       </provider>
378 461
     </entry>
379 462
     <entry file="file://$PROJECT_DIR$/README.md">
380 463
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
381 464
         <state split_layout="SPLIT">
382
-          <first_editor relative-caret-position="1241">
383
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
384
-            <folding />
465
+          <first_editor relative-caret-position="270">
466
+            <caret line="18" selection-start-line="18" selection-end-line="18" />
385 467
           </first_editor>
386 468
           <second_editor />
387 469
         </state>
388 470
       </provider>
389 471
     </entry>
390
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
391
-      <provider selected="true" editor-type-id="text-editor">
392
-        <state relative-caret-position="0">
393
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
394
-          <folding />
395
-        </state>
396
-      </provider>
397
-    </entry>
398 472
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
399 473
       <provider selected="true" editor-type-id="text-editor">
400
-        <state relative-caret-position="0">
401
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
402
-          <folding />
474
+        <state relative-caret-position="315">
475
+          <caret line="201" column="14" selection-start-line="201" selection-start-column="14" selection-end-line="201" selection-end-column="14" />
476
+          <folding>
477
+            <element signature="imports" expanded="true" />
478
+            <element signature="e#3972#3981#0" expanded="true" />
479
+            <element signature="e#4030#4039#0" expanded="true" />
480
+            <element signature="e#6008#6009#0" expanded="true" />
481
+            <element signature="e#6066#6067#0" expanded="true" />
482
+            <element signature="e#6256#6257#0" expanded="true" />
483
+            <element signature="e#6319#6320#0" expanded="true" />
484
+          </folding>
403 485
         </state>
404 486
       </provider>
405 487
     </entry>
406 488
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
407 489
       <provider selected="true" editor-type-id="text-editor">
408
-        <state relative-caret-position="34">
409
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
410
-          <folding />
411
-        </state>
412
-      </provider>
413
-    </entry>
414
-    <entry file="file://$PROJECT_DIR$/README.md">
415
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
416
-        <state split_layout="SPLIT">
417
-          <first_editor relative-caret-position="1241">
418
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
419
-            <folding />
420
-          </first_editor>
421
-          <second_editor />
422
-        </state>
423
-      </provider>
424
-    </entry>
425
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
426
-      <provider selected="true" editor-type-id="text-editor">
427
-        <state relative-caret-position="0">
428
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
429
-          <folding />
430
-        </state>
431
-      </provider>
432
-    </entry>
433
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
434
-      <provider selected="true" editor-type-id="text-editor">
435
-        <state relative-caret-position="0">
436
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
437
-          <folding />
438
-        </state>
439
-      </provider>
440
-    </entry>
441
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
442
-      <provider selected="true" editor-type-id="text-editor">
443
-        <state relative-caret-position="34">
444
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
445
-          <folding />
446
-        </state>
447
-      </provider>
448
-    </entry>
449
-    <entry file="file://$PROJECT_DIR$/README.md">
450
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
451
-        <state split_layout="SPLIT">
452
-          <first_editor relative-caret-position="306">
453
-            <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
454
-            <folding />
455
-          </first_editor>
456
-          <second_editor />
490
+        <state relative-caret-position="5685">
491
+          <caret line="379" column="36" selection-start-line="379" selection-start-column="36" selection-end-line="379" selection-end-column="36" />
492
+          <folding>
493
+            <element signature="imports" expanded="true" />
494
+          </folding>
457 495
         </state>
458 496
       </provider>
459 497
     </entry>

+ 1
- 1
arraz/arraz.iml Просмотреть файл

@@ -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 Просмотреть файл

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

+ 299
- 0
arraz/src/main/java/Arraz.java Просмотреть файл

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

+ 20
- 0
arraz/src/main/java/MaxMin.java Просмотреть файл

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

+ 17
- 0
arraz/src/main/java/OddEven.java Просмотреть файл

@@ -0,0 +1,17 @@
1
+public class OddEven {
2
+        public int odds;
3
+        public int evens;
4
+
5
+        public OddEven(int odd, int evens){
6
+            this.odds = odd;
7
+            this.evens = evens;
8
+        }
9
+
10
+        public int getOdds(){
11
+            return odds;
12
+        }
13
+
14
+        public int getEvens(){
15
+            return evens;
16
+        }
17
+}

+ 585
- 1
arraz/src/test/java/ArrazTest.java Просмотреть файл

@@ -1,5 +1,589 @@
1
-import static org.junit.Assert.*;
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+import java.util.ArrayList;
4
+
2 5
 
3 6
 public class ArrazTest {
7
+    Arraz arraz = new Arraz();
8
+
9
+    @Test
10
+    public void sumValuesOfArray1() {
11
+        Integer[] array = {1, 2, 3};
12
+        int expectedSum = 6;
13
+
14
+        int actualSum = arraz.sumValuesOfArray(array);
15
+
16
+        Assert.assertEquals(expectedSum, actualSum);
17
+    }
18
+
19
+    @Test
20
+    public void sumValuesOfArray2() {
21
+        Integer[] array = {1, 2, 3, 4};
22
+        int expectedSum = 10;
23
+
24
+        int actualSum = arraz.sumValuesOfArray(array);
25
+
26
+        Assert.assertEquals(expectedSum, actualSum);
27
+    }
28
+
29
+    @Test
30
+    public void sumDoublesOfArray1() {
31
+        Double[] array = {1.5, 2.0, 3.5};
32
+        double expectedSum = 7.0;
33
+
34
+        double actualSum = arraz.sumDoublesOfArray(array);
35
+
36
+        Assert.assertEquals(expectedSum, actualSum);
37
+
38
+    }
39
+
40
+    @Test
41
+    public void sumDoublesOfArray2() {
42
+        Double[] array = {2.0, 3.5, 1.0};
43
+        double expectedSum = 6.5;
44
+
45
+        double actualSum = arraz.sumDoublesOfArray(array);
46
+
47
+        Assert.assertEquals(expectedSum, actualSum);
48
+    }
49
+
50
+    @Test
51
+    public void averageOfArray1() {
52
+        Integer[] array = {1, 2, 3};
53
+        int expectedAverage = 2;
54
+
55
+        int actualAverage = arraz.averageOfArray(array);
56
+
57
+        Assert.assertEquals(expectedAverage, actualAverage);
58
+    }
59
+
60
+    @Test
61
+    public void averageOfArray2() {
62
+        Integer[] array = {4, 5, 6};
63
+        int expectedAverage = 5;
64
+
65
+        int actualAverage = arraz.averageOfArray(array);
66
+
67
+        Assert.assertEquals(expectedAverage, actualAverage);
68
+    }
69
+
70
+    @Test
71
+    public void doubleAverageOfArrayTest() {
72
+        Double[] array = {1.5, 2.5, 3.5};
73
+        double expectedAverage = 2.5;
74
+
75
+        double actualAverage = arraz.doubleAverageOfArray(array);
76
+
77
+        Assert.assertEquals(expectedAverage, actualAverage);
78
+    }
79
+
80
+    @Test
81
+    public void doubleAverageOfArrayTest2() {
82
+        Double[] array = {1.5, 2.5, 3.5, 2.0};
83
+        double expectedAverage = 2.375;
84
+
85
+        double actualAverage = arraz.doubleAverageOfArray(array);
86
+
87
+        Assert.assertEquals(expectedAverage, actualAverage);
88
+    }
89
+
90
+    @Test
91
+    public void containsValueTrue() {
92
+        Integer[] array = {1, 2, 3};
93
+
94
+        boolean actualOutput = arraz.containsValue(array, 2);
95
+
96
+        Assert.assertTrue(actualOutput);
97
+    }
98
+
99
+    @Test
100
+    public void containsValueFalse() {
101
+        Integer[] array = {1, 2, 3};
102
+
103
+        boolean actualOutput = arraz.containsValue(array, 65);
104
+
105
+        Assert.assertFalse(actualOutput);
106
+    }
107
+
108
+    @Test
109
+    public void reverseArrayTest1() {
110
+        Integer[] array = {1, 2, 3};
111
+        Integer[] expectedOutput = {3, 2, 1};
112
+
113
+        Integer[] actualOutput = arraz.reverseArray(array);
114
+
115
+        Assert.assertEquals(expectedOutput, actualOutput);
116
+    }
117
+
118
+    @Test
119
+    public void reverseArrayTest2() {
120
+        Integer[] array = {3, 2, 1};
121
+        Integer[] expectedOutput = {1, 2, 3};
122
+
123
+        Integer[] actualOutput = arraz.reverseArray(array);
124
+
125
+        Assert.assertEquals(expectedOutput, actualOutput);
126
+    }
127
+
128
+    @Test
129
+    public void OddEvenOfArrayTestEvens() {
130
+        Integer[] array = {3, 2, 7};
131
+
132
+        OddEven oe = arraz.getOddEvensOfArray(array);
133
+        int expectedOutput = 1;
134
+        int actualOutput = oe.getEvens();
135
+
136
+        Assert.assertEquals(expectedOutput, actualOutput);
137
+
138
+    }
139
+
140
+    @Test
141
+    public void OddEvenOfArrayTestOdds() {
142
+        Integer[] array = {3, 2, 7};
143
+
144
+        OddEven oe = arraz.getOddEvensOfArray(array);
145
+        int expectedOutput = 2;
146
+        int actualOutput = oe.getOdds();
147
+
148
+        Assert.assertEquals(expectedOutput, actualOutput);
149
+    }
150
+
151
+    @Test
152
+    public void findIndexOfTest1() {
153
+        Integer[] array = {1, 2, 3};
154
+
155
+        int expectedIndex = 2;
156
+        int actualIndex = arraz.findIndexOf(array, 3);
157
+
158
+        Assert.assertEquals(expectedIndex, actualIndex);
159
+
160
+    }
161
+
162
+    @Test
163
+    public void findIndexOfTest2() {
164
+        Integer[] array = {1, 2, 4};
165
+
166
+        int expectedIndex = -1;
167
+        int actualIndex = arraz.findIndexOf(array, 34);
168
+
169
+        Assert.assertEquals(expectedIndex, actualIndex);
170
+
171
+    }
172
+
173
+    @Test
174
+    public void copyArrayByIteratorTest1(){
175
+        Integer[] array = {1,2,4};
176
+        Integer[] expectedArray = {1,2,4};
177
+
178
+        Integer[] actualArray = arraz.copyArrayByIterator(array);
179
+
180
+        Assert.assertEquals(expectedArray, actualArray);
181
+    }
182
+
183
+    @Test
184
+    public void copyArrayByIteratorTest2(){
185
+        Integer[] array = {1,2,4,6,7,8};
186
+        Integer[] expectedArray = {1,2,4,6,7,8};
187
+
188
+        Integer[] actualArray = arraz.copyArrayByIterator(array);
189
+
190
+        Assert.assertEquals(expectedArray, actualArray);
191
+    }
192
+
193
+    @Test
194
+    public void copyArrayByLoopTest1() {
195
+        Integer[] array = {1, 5, 7};
196
+
197
+        Integer[] expectedArray = {1, 5, 7};
198
+        Integer[] actualArray = arraz.copyArrayByLoop(array);
199
+
200
+        Assert.assertEquals(expectedArray, actualArray);
201
+
202
+    }
203
+
204
+    @Test
205
+    public void copyArrayByLoopTest2() {
206
+        Integer[] array = {1, 5, 7, 2};
207
+
208
+        Integer[] expectedArray = {1, 5, 7, 2};
209
+        Integer[] actualArray = arraz.copyArrayByLoop(array);
210
+
211
+        Assert.assertEquals(expectedArray, actualArray);
212
+
213
+    }
214
+
215
+    @Test
216
+    public void removeElementFromArrayTest1() {
217
+        Integer[] array = {1, 5, 7, 2};
218
+
219
+        Integer[] expectedArray = {1, 5, 2};
220
+        Integer[] actualArray = arraz.removeElementFromArray(array, 7);
221
+
222
+        Assert.assertEquals(expectedArray, actualArray);
223
+    }
224
+
225
+    @Test
226
+    public void removeElementFromArrayTest2() {
227
+        Integer[] array = {1, 5, 7, 2};
228
+
229
+        Integer[] expectedArray = {1, 5, 7};
230
+        Integer[] actualArray = arraz.removeElementFromArray(array, 2);
231
+
232
+        Assert.assertEquals(expectedArray, actualArray);
233
+    }
234
+
235
+    @Test
236
+    public void insertIntoArrayTest1() {
237
+        Integer[] array = {1, 5, 7, 2};
238
+
239
+        Integer[] expectedArray = {1, 3, 5, 7, 2};
240
+        Integer[] actualArray = arraz.insertIntoArrayAt(array, 3, 1);
241
+
242
+        Assert.assertEquals(expectedArray, actualArray);
243
+    }
244
+
245
+    @Test
246
+    public void insertIntoArrayTest2() {
247
+        Integer[] array = {1, 5, 7, 2};
248
+
249
+        Integer[] expectedArray = {1, 5, 7, 6, 2};
250
+        Integer[] actualArray = arraz.insertIntoArrayAt(array, 6, 3);
251
+
252
+        Assert.assertEquals(expectedArray, actualArray);
253
+    }
254
+
255
+    @Test
256
+    public void findMinMaxOfArrayTest1() {
257
+        Integer[] array = {1, 2, 3, -1};
258
+
259
+        MaxMin mm = arraz.findMaxMinOfArray(array);
260
+        int expectedMax = 3;
261
+        int actualMax = mm.getMax();
262
+
263
+        Assert.assertEquals(expectedMax, actualMax);
264
+    }
265
+
266
+    @Test
267
+    public void findMinMaxOfArrayTest2() {
268
+        Integer[] array = {1, 2, 3, -1};
269
+
270
+        MaxMin mm = arraz.findMaxMinOfArray(array);
271
+        int expectedMin = -1;
272
+        int actualMin = mm.getMin();
273
+
274
+        Assert.assertEquals(expectedMin, actualMin);
275
+    }
276
+
277
+    @Test
278
+    public void removeDupesTest1(){
279
+        Integer[] array = {1,2,3,3,4,5,5};
280
+        Integer[] expectedArray = {1,2,3,4,5};
281
+
282
+        Integer[] actualArray = arraz.removeDupesFromArray(array);
283
+
284
+        Assert.assertEquals(expectedArray, actualArray);
285
+    }
286
+
287
+    @Test
288
+    public void removeDupesTest2(){
289
+        Integer[] array = {1,2,3,3,4,5,5,6,6};
290
+        Integer[] expectedArray = {1,2,3,4,5,6};
291
+
292
+        Integer[] actualArray = arraz.removeDupesFromArray(array);
293
+
294
+        Assert.assertEquals(expectedArray, actualArray);
295
+    }
296
+
297
+
298
+    @Test
299
+    public void find2ndLargest1() {
300
+        double[] array = {1.25, 1.5, 2.0};
301
+
302
+        double expectedOutput = 1.5;
303
+        double actualOutput = arraz.find2ndLargestValueFromArray(array);
304
+
305
+        Assert.assertEquals(expectedOutput, actualOutput);
306
+    }
307
+
308
+    @Test
309
+    public void find2ndLargest2() {
310
+        double[] array = {1.25, 3.0, 2.0};
311
+
312
+        double expectedOutput = 2.0;
313
+        double actualOutput = arraz.find2ndLargestValueFromArray(array);
314
+
315
+        Assert.assertEquals(expectedOutput, actualOutput);
316
+    }
317
+
318
+    @Test
319
+    public void arrayToArrayListTest1() {
320
+        Integer[] array = {1, 2, 4};
321
+
322
+
323
+        int expectedOutput = 3;
324
+        int actualOutput = arraz.makeMeAnArrayListFromArray(array).size();
325
+
326
+        Assert.assertEquals(expectedOutput, actualOutput);
327
+    }
328
+
329
+    @Test
330
+    public void arrayToArrayListTest2(){
331
+    Integer[] array = {1, 2, 4, 6, 7};
332
+
333
+
334
+    int expectedOutput = 5;
335
+    int actualOutput = arraz.makeMeAnArrayListFromArray(array).size();
336
+
337
+        Assert.assertEquals(expectedOutput,actualOutput);
338
+    }
339
+
340
+    @Test
341
+    public void ArrayListToArrayTest1(){
342
+        ArrayList<Integer> list = new ArrayList<Integer>();
343
+        list.add(2);
344
+        list.add(4);
345
+        list.add(7);
346
+
347
+        int expectedOutput = 3;
348
+        int actualOutput = arraz.makeMeAnArrayFromArrayList(list).length;
349
+
350
+        Assert.assertEquals(expectedOutput, actualOutput);
351
+
352
+    }
353
+
354
+    @Test
355
+    public void ArrayListToArrayTest2(){
356
+        ArrayList<Integer> list = new ArrayList<Integer>();
357
+        list.add(2);
358
+        list.add(3);
359
+        list.add(7);
360
+        list.add(9);
361
+
362
+        int expectedOutput = 4;
363
+        int actualOutput = arraz.makeMeAnArrayFromArrayList(list).length;
364
+
365
+        Assert.assertEquals(expectedOutput, actualOutput);
366
+
367
+    }
368
+
369
+    @Test
370
+    public void averageWOMaxMinTest1(){
371
+        Integer[] array = {0,2,2,4};
372
+        int expectedAverage = 2;
373
+
374
+        int actualAverage = arraz.averageArrayWithoutMaxMin(array);
375
+
376
+        Assert.assertEquals(expectedAverage, actualAverage);
377
+    }
378
+
379
+    @Test
380
+    public void averageWOMaxMinTest2(){
381
+        Integer[] array = {0,1,2,2,4,5};
382
+        int expectedAverage = 2;
383
+
384
+        int actualAverage = arraz.averageArrayWithoutMaxMin(array);
385
+
386
+        Assert.assertEquals(expectedAverage, actualAverage);
387
+    }
388
+
389
+    @Test
390
+    public void check2ArraysEqualTrue(){
391
+        Integer[] array1 = {1,2,3};
392
+        Integer[] array2 = {1,2,3};
393
+
394
+        boolean actualOutput = arraz.check2ArraysForEqual(array1, array2);
395
+
396
+        Assert.assertTrue(actualOutput);
397
+
398
+    }
399
+
400
+    @Test
401
+    public void check2ArraysEqualFalse(){
402
+        Integer[] array1 = {1,2,4};
403
+        Integer[] array2 = {1,2,3};
404
+
405
+        boolean actualOutput = arraz.check2ArraysForEqual(array1, array2);
406
+
407
+        Assert.assertFalse(actualOutput);
408
+
409
+    }
410
+
411
+    @Test
412
+    public void arrayHas65and77True(){
413
+        Integer[] array = {1,2,65,77};
414
+
415
+        boolean actualOutput = arraz.arrayHas65and77(array);
416
+
417
+        Assert.assertTrue(actualOutput);
418
+    }
419
+
420
+    @Test
421
+    public void arrayHas65and77False(){
422
+        Integer[] array = {1,2,3,4};
423
+
424
+        boolean actualOutput = arraz.arrayHas65and77(array);
425
+
426
+        Assert.assertFalse(actualOutput);
427
+    }
428
+
429
+    @Test
430
+    public void total30True(){
431
+        Integer[] array = {1,2,10,5,10,7,10};
432
+
433
+        boolean actualOutput = arraz.theTotalofTensIs30(array);
434
+        Assert.assertTrue(actualOutput);
435
+    }
436
+
437
+    @Test
438
+    public void total30False(){
439
+        Integer[] array = {1,2,10,57,10};
440
+
441
+        boolean actualOutput = arraz.theTotalofTensIs30(array);
442
+        Assert.assertFalse(actualOutput);
443
+    }
444
+
445
+    @Test
446
+    public void findSmallestTest1(){
447
+        Integer[] array = {8,1,7,3,4,10};
448
+        Integer[] expectedArray = {1,3};
449
+
450
+        Integer[] actualArray = arraz.findSmallestAndSecondSmallest(array);
451
+
452
+        Assert.assertEquals(expectedArray, actualArray);
453
+    }
454
+
455
+    @Test
456
+    public void findSmallestTest2(){
457
+        Integer[] array = {8,1,7,3,10,0};
458
+        Integer[] expectedArray = {0,1};
459
+
460
+        Integer[] actualArray = arraz.findSmallestAndSecondSmallest(array);
461
+
462
+        Assert.assertEquals(expectedArray, actualArray);
463
+    }
464
+
465
+    @Test
466
+    public void makeMeACopyPleaseTest1(){
467
+        Integer[] array = {8,1,7,3,10,0};
468
+        Integer[] expectedArray = {0,10,3,7,1,8};
469
+
470
+        Integer[] actualArray = arraz.makeMeACopyPlease(array);
471
+
472
+        Assert.assertEquals(expectedArray, actualArray);
473
+    }
474
+
475
+    @Test
476
+    public void makeMeACopyPleaseTest2(){
477
+        Integer[] array = {7,3,10,0};
478
+        Integer[] expectedArray = {0,10,3,7};
479
+
480
+        Integer[] actualArray = arraz.makeMeACopyPlease(array);
481
+
482
+        Assert.assertEquals(expectedArray, actualArray);
483
+    }
484
+
485
+    @Test
486
+    public void  removeLastItemAndCopyTest1(){
487
+        Integer[] array = {7,3,10};
488
+        Integer[] expectedArray = {7,3};
489
+
490
+        Integer[] actualArray = arraz.removeLastItemAndCopy(array);
491
+
492
+        Assert.assertEquals(expectedArray, actualArray);
493
+    }
494
+
495
+    @Test
496
+    public void  removeLastItemAndCopyTest2(){
497
+        Integer[] array = {7,3,10,5,7,8};
498
+        Integer[] expectedArray = {7,3,10,5,7};
499
+
500
+        Integer[] actualArray = arraz.removeLastItemAndCopy(array);
501
+
502
+        Assert.assertEquals(expectedArray, actualArray);
503
+    }
504
+
505
+    @Test
506
+    public void removeFirstItemAndCopyTest1(){
507
+        Integer[] array = {7,3,10,5,7,8};
508
+        Integer[] expectedArray = {3,10,5,7,8};
509
+
510
+        Integer[] actualArray = arraz.removeFirstItemAndCopy(array);
511
+
512
+        Assert.assertEquals(expectedArray, actualArray);
513
+    }
514
+
515
+    @Test
516
+    public void removeFirstItemAndCopyTest2(){
517
+        Integer[] array = {10,5,7,8};
518
+        Integer[] expectedArray = {5,7,8};
519
+
520
+        Integer[] actualArray = arraz.removeFirstItemAndCopy(array);
521
+
522
+        Assert.assertEquals(expectedArray, actualArray);
523
+    }
524
+
525
+    @Test
526
+    public void insertAtStartAndCopyTest1(){
527
+        Integer[] array = {10,5,7,8};
528
+        Integer[] expectedArray = {11,10,5,7,8};
529
+
530
+        Integer[] actualArray= arraz.insertAtStartAndCopy(array, 11);
531
+
532
+        Assert.assertEquals(expectedArray, actualArray);
533
+    }
534
+
535
+    @Test
536
+    public void insertAtStartAndCopyTest2(){
537
+        Integer[] array = {11,10,5,7,8};
538
+        Integer[] expectedArray = {12,11,10,5,7,8};
539
+
540
+        Integer[] actualArray= arraz.insertAtStartAndCopy(array, 12);
541
+
542
+        Assert.assertEquals(expectedArray, actualArray);
543
+    }
544
+
545
+    @Test
546
+    public void insertAtEndAndCopyTest1(){
547
+        Integer[] array = {11,10,5,7,8};
548
+        Integer[] expectedArray = {11,10,5,7,8,12};
549
+
550
+        Integer[] actualArray= arraz.insertAtEndAndCopy(array, 12);
551
+
552
+        Assert.assertEquals(expectedArray, actualArray);
553
+    }
554
+
555
+    @Test
556
+    public void insertAtEndAndCopyTest2(){
557
+        Integer[] array = {11,10,5,7,8,12};
558
+        Integer[] expectedArray = {11,10,5,7,8,12,13};
559
+
560
+        Integer[] actualArray= arraz.insertAtEndAndCopy(array, 13);
561
+
562
+        Assert.assertEquals(expectedArray, actualArray);
563
+    }
564
+
565
+    @Test
566
+    public void sortArrayEvenOddsTest1(){
567
+        Integer[] array = {11,10,5,7,8,12};
568
+        Integer[] expectedArray = {10,8,12,11,5,7};
569
+
570
+        Integer[] actualArray = arraz.sortArrayIntoEvensThenOdds(array);
571
+
572
+        Assert.assertEquals(expectedArray, actualArray);
573
+
574
+    }
575
+
576
+    @Test
577
+    public void sortArrayEvenOddsTest2(){
578
+        Integer[] array = {11,10,5,7,12};
579
+        Integer[] expectedArray = {10,12,11,5,7};
580
+
581
+        Integer[] actualArray = arraz.sortArrayIntoEvensThenOdds(array);
582
+
583
+        Assert.assertEquals(expectedArray, actualArray);
584
+
585
+    }
586
+
587
+
4 588
 
5 589
 }