#23 ArraysGoneWild!

Open
WMartinez44 wants to merge 6 commits from WMartinez44/ArraysGoneWild:master into master

+ 16
- 0
arraz/.idea/compiler.xml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <annotationProcessing>
5
+      <profile name="Maven default annotation processors profile" enabled="true">
6
+        <sourceOutputDir name="target/generated-sources/annotations" />
7
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
8
+        <outputRelativeToContentRoot value="true" />
9
+        <module name="arraz" />
10
+      </profile>
11
+    </annotationProcessing>
12
+    <bytecodeTargetLevel>
13
+      <module name="arraz" target="8" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 13
- 0
arraz/.idea/libraries/Maven__junit_junit_4_0.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.0">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
arraz/.idea/misc.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="MavenProjectsManager">
4
+    <option name="originalFiles">
5
+      <list>
6
+        <option value="$PROJECT_DIR$/pom.xml" />
7
+      </list>
8
+    </option>
9
+  </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
11
+    <output url="file://$PROJECT_DIR$/classes" />
12
+  </component>
13
+</project>

+ 8
- 0
arraz/.idea/modules.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/arraz.iml" filepath="$PROJECT_DIR$/arraz.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
arraz/.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+  </component>
6
+</project>

+ 526
- 0
arraz/.idea/workspace.xml View File

@@ -0,0 +1,526 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="88ea8df4-5dbc-49b8-b3df-2eb51cffc0b3" name="Default Changelist" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/src/test/java/MoreArraysTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MoreArraysTest.java" afterDir="false" />
7
+    </list>
8
+    <ignored path="$PROJECT_DIR$/target/" />
9
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
+    <option name="SHOW_DIALOG" value="false" />
11
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+    <option name="LAST_RESOLUTION" value="IGNORE" />
14
+  </component>
15
+  <component name="FUSProjectUsageTrigger">
16
+    <session id="1079749333">
17
+      <usages-collector id="statistics.lifecycle.project">
18
+        <counts>
19
+          <entry key="project.open.time.3" value="1" />
20
+          <entry key="project.opened" value="1" />
21
+        </counts>
22
+      </usages-collector>
23
+      <usages-collector id="statistics.file.extensions.open">
24
+        <counts>
25
+          <entry key="class" value="4" />
26
+          <entry key="java" value="50" />
27
+          <entry key="md" value="2" />
28
+        </counts>
29
+      </usages-collector>
30
+      <usages-collector id="statistics.file.types.open">
31
+        <counts>
32
+          <entry key="CLASS" value="4" />
33
+          <entry key="JAVA" value="50" />
34
+          <entry key="Markdown" value="2" />
35
+        </counts>
36
+      </usages-collector>
37
+      <usages-collector id="statistics.file.extensions.edit">
38
+        <counts>
39
+          <entry key="java" value="12335" />
40
+        </counts>
41
+      </usages-collector>
42
+      <usages-collector id="statistics.file.types.edit">
43
+        <counts>
44
+          <entry key="JAVA" value="12335" />
45
+        </counts>
46
+      </usages-collector>
47
+    </session>
48
+  </component>
49
+  <component name="FileEditorManager">
50
+    <leaf>
51
+      <file pinned="false" current-in-tab="false">
52
+        <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
53
+          <provider selected="true" editor-type-id="text-editor">
54
+            <state relative-caret-position="172">
55
+              <caret line="113" column="5" lean-forward="true" selection-start-line="113" selection-start-column="5" selection-end-line="113" selection-end-column="5" />
56
+            </state>
57
+          </provider>
58
+        </entry>
59
+      </file>
60
+      <file pinned="false" current-in-tab="true">
61
+        <entry file="file://$PROJECT_DIR$/src/test/java/MoreArraysTest.java">
62
+          <provider selected="true" editor-type-id="text-editor">
63
+            <state relative-caret-position="463">
64
+              <caret line="310" column="5" selection-start-line="310" selection-start-column="5" selection-end-line="310" selection-end-column="5" />
65
+              <folding>
66
+                <element signature="imports" expanded="true" />
67
+              </folding>
68
+            </state>
69
+          </provider>
70
+        </entry>
71
+      </file>
72
+      <file pinned="false" current-in-tab="false">
73
+        <entry file="file://$PROJECT_DIR$/src/main/java/MoreArrayc.java">
74
+          <provider selected="true" editor-type-id="text-editor">
75
+            <state relative-caret-position="-36">
76
+              <caret line="194" column="20" selection-start-line="194" selection-start-column="20" selection-end-line="194" selection-end-column="20" />
77
+              <folding>
78
+                <element signature="imports" expanded="true" />
79
+                <element signature="e#479#488#0" expanded="true" />
80
+                <element signature="e#2563#2564#0" expanded="true" />
81
+                <element signature="e#2590#2591#0" expanded="true" />
82
+              </folding>
83
+            </state>
84
+          </provider>
85
+        </entry>
86
+      </file>
87
+    </leaf>
88
+  </component>
89
+  <component name="FileTemplateManagerImpl">
90
+    <option name="RECENT_TEMPLATES">
91
+      <list>
92
+        <option value="Class" />
93
+      </list>
94
+    </option>
95
+  </component>
96
+  <component name="FindInProjectRecents">
97
+    <findStrings>
98
+      <find>cont</find>
99
+      <find>remo</find>
100
+      <find>remove</find>
101
+      <find>add</find>
102
+    </findStrings>
103
+  </component>
104
+  <component name="Git.Settings">
105
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
106
+  </component>
107
+  <component name="IdeDocumentHistory">
108
+    <option name="CHANGED_PATHS">
109
+      <list>
110
+        <option value="$PROJECT_DIR$/src/main/java/OddsAndEvens.java" />
111
+        <option value="$PROJECT_DIR$/src/main/java/OddsAndEvensMethods.java" />
112
+        <option value="$PROJECT_DIR$/src/test/java/OddsAndEventsTest.java" />
113
+        <option value="$PROJECT_DIR$/src/main/java/MoreArrays.java" />
114
+        <option value="$PROJECT_DIR$/src/test/java/MoreArrays.java" />
115
+        <option value="$PROJECT_DIR$/src/main/java/MoreArrayz.java" />
116
+        <option value="$PROJECT_DIR$/src/test/java/MinMax.java" />
117
+        <option value="$PROJECT_DIR$/src/main/java/MinMax.java" />
118
+        <option value="$PROJECT_DIR$/src/main/java/MinMaxMethods.java" />
119
+        <option value="$PROJECT_DIR$/src/test/java/ArrazTest.java" />
120
+        <option value="$PROJECT_DIR$/src/test/java/MinMaxTest.java" />
121
+        <option value="$PROJECT_DIR$/src/main/java/MinMax1.java" />
122
+        <option value="$PROJECT_DIR$/src/main/java/Arraz.java" />
123
+        <option value="$PROJECT_DIR$/src/main/java/MoreArrayc.java" />
124
+        <option value="$PROJECT_DIR$/src/test/java/MoreArraysTest.java" />
125
+      </list>
126
+    </option>
127
+  </component>
128
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
129
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
130
+  <component name="JsGulpfileManager">
131
+    <detection-done>true</detection-done>
132
+    <sorting>DEFINITION_ORDER</sorting>
133
+  </component>
134
+  <component name="ProjectFrameBounds">
135
+    <option name="x" value="156" />
136
+    <option name="y" value="42" />
137
+    <option name="width" value="991" />
138
+    <option name="height" value="709" />
139
+  </component>
140
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
141
+  <component name="ProjectView">
142
+    <navigator proportions="" version="1">
143
+      <foldersAlwaysOnTop value="true" />
144
+    </navigator>
145
+    <panes>
146
+      <pane id="PackagesPane" />
147
+      <pane id="ProjectPane">
148
+        <subPane>
149
+          <expand>
150
+            <path>
151
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
152
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
153
+            </path>
154
+            <path>
155
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
156
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
157
+              <item name="src" type="462c0819:PsiDirectoryNode" />
158
+            </path>
159
+            <path>
160
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
161
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
162
+              <item name="src" type="462c0819:PsiDirectoryNode" />
163
+              <item name="main" type="462c0819:PsiDirectoryNode" />
164
+            </path>
165
+            <path>
166
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
167
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
168
+              <item name="src" type="462c0819:PsiDirectoryNode" />
169
+              <item name="main" type="462c0819:PsiDirectoryNode" />
170
+              <item name="java" type="462c0819:PsiDirectoryNode" />
171
+            </path>
172
+            <path>
173
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
174
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
175
+              <item name="src" type="462c0819:PsiDirectoryNode" />
176
+              <item name="test" type="462c0819:PsiDirectoryNode" />
177
+            </path>
178
+            <path>
179
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
180
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
181
+              <item name="src" type="462c0819:PsiDirectoryNode" />
182
+              <item name="test" type="462c0819:PsiDirectoryNode" />
183
+              <item name="java" type="462c0819:PsiDirectoryNode" />
184
+            </path>
185
+            <path>
186
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
187
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
188
+              <item name="target" type="462c0819:PsiDirectoryNode" />
189
+            </path>
190
+          </expand>
191
+          <select />
192
+        </subPane>
193
+      </pane>
194
+      <pane id="Scope" />
195
+    </panes>
196
+  </component>
197
+  <component name="PropertiesComponent">
198
+    <property name="WebServerToolWindowFactoryState" value="false" />
199
+    <property name="aspect.path.notification.shown" value="true" />
200
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544365477796" />
201
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
202
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
203
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
204
+  </component>
205
+  <component name="RunDashboard">
206
+    <option name="ruleStates">
207
+      <list>
208
+        <RuleState>
209
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
210
+        </RuleState>
211
+        <RuleState>
212
+          <option name="name" value="StatusDashboardGroupingRule" />
213
+        </RuleState>
214
+      </list>
215
+    </option>
216
+  </component>
217
+  <component name="RunManager" selected="JUnit.MoreArraysTest.insertLastThenCopyTEST">
218
+    <configuration name="MoreArraysTest.insertFirstThenCopyTEST" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
219
+      <module name="arraz" />
220
+      <option name="PACKAGE_NAME" value="" />
221
+      <option name="MAIN_CLASS_NAME" value="MoreArraysTest" />
222
+      <option name="METHOD_NAME" value="insertFirstThenCopyTEST" />
223
+      <option name="TEST_OBJECT" value="method" />
224
+      <method v="2">
225
+        <option name="Make" enabled="true" />
226
+      </method>
227
+    </configuration>
228
+    <configuration name="MoreArraysTest.insertLastThenCopyTEST" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
229
+      <module name="arraz" />
230
+      <option name="PACKAGE_NAME" value="" />
231
+      <option name="MAIN_CLASS_NAME" value="MoreArraysTest" />
232
+      <option name="METHOD_NAME" value="insertLastThenCopyTEST" />
233
+      <option name="TEST_OBJECT" value="method" />
234
+      <method v="2">
235
+        <option name="Make" enabled="true" />
236
+      </method>
237
+    </configuration>
238
+    <configuration name="MoreArraysTest.insertfirstThenCopyTEST" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
239
+      <module name="arraz" />
240
+      <option name="PACKAGE_NAME" value="" />
241
+      <option name="MAIN_CLASS_NAME" value="MoreArraysTest" />
242
+      <option name="METHOD_NAME" value="insertfirstThenCopyTEST" />
243
+      <option name="TEST_OBJECT" value="method" />
244
+      <method v="2">
245
+        <option name="Make" enabled="true" />
246
+      </method>
247
+    </configuration>
248
+    <configuration name="MoreArraysTest.removeFirstThenCopy" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
249
+      <module name="arraz" />
250
+      <option name="PACKAGE_NAME" value="" />
251
+      <option name="MAIN_CLASS_NAME" value="MoreArraysTest" />
252
+      <option name="METHOD_NAME" value="removeFirstThenCopy" />
253
+      <option name="TEST_OBJECT" value="method" />
254
+      <method v="2">
255
+        <option name="Make" enabled="true" />
256
+      </method>
257
+    </configuration>
258
+    <configuration name="MoreArraysTest.removeLastThenCopy" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
259
+      <module name="arraz" />
260
+      <option name="PACKAGE_NAME" value="" />
261
+      <option name="MAIN_CLASS_NAME" value="MoreArraysTest" />
262
+      <option name="METHOD_NAME" value="removeLastThenCopy" />
263
+      <option name="TEST_OBJECT" value="method" />
264
+      <method v="2">
265
+        <option name="Make" enabled="true" />
266
+      </method>
267
+    </configuration>
268
+    <list>
269
+      <item itemvalue="JUnit.MoreArraysTest.removeFirstThenCopy" />
270
+      <item itemvalue="JUnit.MoreArraysTest.removeLastThenCopy" />
271
+      <item itemvalue="JUnit.MoreArraysTest.insertFirstThenCopyTEST" />
272
+      <item itemvalue="JUnit.MoreArraysTest.insertfirstThenCopyTEST" />
273
+      <item itemvalue="JUnit.MoreArraysTest.insertLastThenCopyTEST" />
274
+    </list>
275
+    <recent_temporary>
276
+      <list>
277
+        <item itemvalue="JUnit.MoreArraysTest.insertLastThenCopyTEST" />
278
+        <item itemvalue="JUnit.MoreArraysTest.insertfirstThenCopyTEST" />
279
+        <item itemvalue="JUnit.MoreArraysTest.insertFirstThenCopyTEST" />
280
+        <item itemvalue="JUnit.MoreArraysTest.removeLastThenCopy" />
281
+        <item itemvalue="JUnit.MoreArraysTest.removeFirstThenCopy" />
282
+      </list>
283
+    </recent_temporary>
284
+  </component>
285
+  <component name="SvnConfiguration">
286
+    <configuration />
287
+  </component>
288
+  <component name="TaskManager">
289
+    <task active="true" id="Default" summary="Default task">
290
+      <changelist id="88ea8df4-5dbc-49b8-b3df-2eb51cffc0b3" name="Default Changelist" comment="" />
291
+      <created>1544063273407</created>
292
+      <option name="number" value="Default" />
293
+      <option name="presentableId" value="Default" />
294
+      <updated>1544063273407</updated>
295
+      <workItem from="1544063277559" duration="64818000" />
296
+    </task>
297
+    <servers />
298
+  </component>
299
+  <component name="TestHistory">
300
+    <history-entry file="MoreArraysTest_removeFirstThenCopy - 2018.12.08 at 19h 00m 03s.xml">
301
+      <configuration name="MoreArraysTest.removeFirstThenCopy" configurationId="JUnit" />
302
+    </history-entry>
303
+    <history-entry file="MoreArraysTest_removeFirstThenCopy - 2018.12.08 at 19h 02m 37s.xml">
304
+      <configuration name="MoreArraysTest.removeFirstThenCopy" configurationId="JUnit" />
305
+    </history-entry>
306
+    <history-entry file="MoreArraysTest_removeLastThenCopy - 2018.12.08 at 19h 03m 30s.xml">
307
+      <configuration name="MoreArraysTest.removeLastThenCopy" configurationId="JUnit" />
308
+    </history-entry>
309
+    <history-entry file="MoreArraysTest_removeLastThenCopy - 2018.12.08 at 19h 03m 40s.xml">
310
+      <configuration name="MoreArraysTest.removeLastThenCopy" configurationId="JUnit" />
311
+    </history-entry>
312
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 06h 08m 30s.xml">
313
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
314
+    </history-entry>
315
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 06h 08m 47s.xml">
316
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
317
+    </history-entry>
318
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 06h 09m 08s.xml">
319
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
320
+    </history-entry>
321
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 06h 09m 22s.xml">
322
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
323
+    </history-entry>
324
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 09h 18m 26s.xml">
325
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
326
+    </history-entry>
327
+    <history-entry file="MoreArraysTest_insertFirstThenCopyTEST - 2018.12.09 at 09h 18m 36s.xml">
328
+      <configuration name="MoreArraysTest.insertFirstThenCopyTEST" configurationId="JUnit" />
329
+    </history-entry>
330
+  </component>
331
+  <component name="TimeTrackingManager">
332
+    <option name="totallyTimeSpent" value="64818000" />
333
+  </component>
334
+  <component name="ToolWindowManager">
335
+    <frame x="202" y="172" width="991" height="709" extended-state="0" />
336
+    <editor active="true" />
337
+    <layout>
338
+      <window_info id="Image Layers" />
339
+      <window_info id="Designer" />
340
+      <window_info id="UI Designer" />
341
+      <window_info id="Capture Tool" />
342
+      <window_info id="Favorites" side_tool="true" />
343
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49758455" visible="true" weight="0.23498419" />
344
+      <window_info id="Structure" order="1" sideWeight="0.5024155" side_tool="true" weight="0.23498419" />
345
+      <window_info anchor="bottom" id="Messages" weight="0.3273906" />
346
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
347
+      <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
348
+      <window_info anchor="bottom" id="Terminal" />
349
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
350
+      <window_info anchor="bottom" id="Message" order="0" />
351
+      <window_info anchor="bottom" id="Find" order="1" />
352
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32901135" />
353
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.3987034" />
354
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
355
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
356
+      <window_info anchor="bottom" id="TODO" order="6" />
357
+      <window_info anchor="right" id="Palette" />
358
+      <window_info anchor="right" id="Theme Preview" />
359
+      <window_info anchor="right" id="Capture Analysis" />
360
+      <window_info anchor="right" id="Palette&#9;" />
361
+      <window_info anchor="right" id="Database" />
362
+      <window_info anchor="right" id="Maven Projects" />
363
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
364
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
365
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
366
+    </layout>
367
+  </component>
368
+  <component name="TypeScriptGeneratedFilesManager">
369
+    <option name="version" value="1" />
370
+  </component>
371
+  <component name="VcsContentAnnotationSettings">
372
+    <option name="myLimit" value="2678400000" />
373
+  </component>
374
+  <component name="editorHistoryManager">
375
+    <entry file="file://$PROJECT_DIR$/../README.md">
376
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
377
+        <state split_layout="SPLIT">
378
+          <first_editor />
379
+          <second_editor />
380
+        </state>
381
+      </provider>
382
+    </entry>
383
+    <entry file="file://$PROJECT_DIR$/src/main/java/MoreArrays.java">
384
+      <provider selected="true" editor-type-id="text-editor">
385
+        <state relative-caret-position="60">
386
+          <caret line="4" selection-start-line="4" selection-end-line="4" />
387
+        </state>
388
+      </provider>
389
+    </entry>
390
+    <entry file="file://$PROJECT_DIR$/src/main/java/MoreArrayz.java">
391
+      <provider selected="true" editor-type-id="text-editor">
392
+        <state relative-caret-position="60">
393
+          <caret line="4" column="4" selection-start-line="4" selection-start-column="4" selection-end-line="4" selection-end-column="4" />
394
+        </state>
395
+      </provider>
396
+    </entry>
397
+    <entry file="file://$PROJECT_DIR$/src/test/java/OddsAndEventsTest.java">
398
+      <provider selected="true" editor-type-id="text-editor">
399
+        <state relative-caret-position="1155">
400
+          <caret line="77" lean-forward="true" selection-start-line="77" selection-end-line="77" />
401
+          <folding>
402
+            <element signature="imports" expanded="true" />
403
+          </folding>
404
+        </state>
405
+      </provider>
406
+    </entry>
407
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/lang/Integer.java">
408
+      <provider selected="true" editor-type-id="text-editor">
409
+        <state relative-caret-position="115">
410
+          <caret line="892" selection-start-line="892" selection-end-line="892" />
411
+          <folding>
412
+            <element signature="e#33919#33920#0" expanded="true" />
413
+          </folding>
414
+        </state>
415
+      </provider>
416
+    </entry>
417
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar!/sun/reflect/NativeMethodAccessorImpl.class">
418
+      <provider selected="true" editor-type-id="text-editor">
419
+        <state relative-caret-position="102">
420
+          <caret line="26" selection-start-line="26" selection-end-line="26" />
421
+        </state>
422
+      </provider>
423
+    </entry>
424
+    <entry file="file://$PROJECT_DIR$/src/main/java/MinMaxMethods.java">
425
+      <provider selected="true" editor-type-id="text-editor">
426
+        <state relative-caret-position="45">
427
+          <caret line="3" selection-start-line="3" selection-end-line="3" />
428
+        </state>
429
+      </provider>
430
+    </entry>
431
+    <entry file="file://$PROJECT_DIR$/src/main/java/OddsAndEvensMethods.java">
432
+      <provider selected="true" editor-type-id="text-editor">
433
+        <state relative-caret-position="435">
434
+          <caret line="29" column="23" selection-start-line="29" selection-start-column="23" selection-end-line="29" selection-end-column="23" />
435
+        </state>
436
+      </provider>
437
+    </entry>
438
+    <entry file="file://$PROJECT_DIR$/src/main/java/OddsAndEvens.java">
439
+      <provider selected="true" editor-type-id="text-editor">
440
+        <state relative-caret-position="210">
441
+          <caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
442
+        </state>
443
+      </provider>
444
+    </entry>
445
+    <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
446
+      <provider selected="true" editor-type-id="text-editor">
447
+        <state relative-caret-position="1573">
448
+          <caret line="169" column="19" selection-start-line="169" selection-start-column="19" selection-end-line="169" selection-end-column="19" />
449
+          <folding>
450
+            <element signature="imports" expanded="true" />
451
+          </folding>
452
+        </state>
453
+      </provider>
454
+    </entry>
455
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0.jar!/org/junit/Assert.class">
456
+      <provider selected="true" editor-type-id="text-editor">
457
+        <state relative-caret-position="209">
458
+          <caret line="176" column="38" lean-forward="true" selection-start-line="176" selection-start-column="38" selection-end-line="176" selection-end-column="38" />
459
+        </state>
460
+      </provider>
461
+    </entry>
462
+    <entry file="file://$PROJECT_DIR$/src/main/java/MinMax1.java">
463
+      <provider selected="true" editor-type-id="text-editor">
464
+        <state relative-caret-position="277">
465
+          <caret line="53" selection-start-line="53" selection-end-line="53" />
466
+        </state>
467
+      </provider>
468
+    </entry>
469
+    <entry file="file://$PROJECT_DIR$/src/test/java/MinMaxTest.java">
470
+      <provider selected="true" editor-type-id="text-editor">
471
+        <state relative-caret-position="-503">
472
+          <caret line="65" lean-forward="true" selection-start-line="65" selection-end-line="65" />
473
+          <folding>
474
+            <element signature="imports" expanded="true" />
475
+          </folding>
476
+        </state>
477
+      </provider>
478
+    </entry>
479
+    <entry file="file://$PROJECT_DIR$/src/main/java/MoreArrayc.java">
480
+      <provider selected="true" editor-type-id="text-editor">
481
+        <state relative-caret-position="-36">
482
+          <caret line="194" column="20" selection-start-line="194" selection-start-column="20" selection-end-line="194" selection-end-column="20" />
483
+          <folding>
484
+            <element signature="imports" expanded="true" />
485
+            <element signature="e#479#488#0" expanded="true" />
486
+            <element signature="e#2563#2564#0" expanded="true" />
487
+            <element signature="e#2590#2591#0" expanded="true" />
488
+          </folding>
489
+        </state>
490
+      </provider>
491
+    </entry>
492
+    <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
493
+      <provider selected="true" editor-type-id="text-editor">
494
+        <state relative-caret-position="172">
495
+          <caret line="113" column="5" lean-forward="true" selection-start-line="113" selection-start-column="5" selection-end-line="113" selection-end-column="5" />
496
+        </state>
497
+      </provider>
498
+    </entry>
499
+    <entry file="file://$PROJECT_DIR$/src/test/java/MoreArraysTest.java">
500
+      <provider selected="true" editor-type-id="text-editor">
501
+        <state relative-caret-position="463">
502
+          <caret line="310" column="5" selection-start-line="310" selection-start-column="5" selection-end-line="310" selection-end-column="5" />
503
+          <folding>
504
+            <element signature="imports" expanded="true" />
505
+          </folding>
506
+        </state>
507
+      </provider>
508
+    </entry>
509
+  </component>
510
+  <component name="masterDetails">
511
+    <states>
512
+      <state key="ProjectJDKs.UI">
513
+        <settings>
514
+          <last-edited>1.8</last-edited>
515
+          <splitter-proportions>
516
+            <option name="proportions">
517
+              <list>
518
+                <option value="0.2" />
519
+              </list>
520
+            </option>
521
+          </splitter-proportions>
522
+        </settings>
523
+      </state>
524
+    </states>
525
+  </component>
526
+</project>

+ 2
- 3
arraz/arraz.iml View File

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

+ 12
- 0
arraz/pom.xml View File

@@ -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>8</source>
17
+                    <target>8</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
10 22
     <dependencies>
11 23
         <dependency>
12 24
             <groupId>junit</groupId>

+ 118
- 0
arraz/src/main/java/Arraz.java View File

@@ -1,2 +1,120 @@
1
+import java.util.Arrays;
2
+
1 3
 public class Arraz {
4
+
5
+
6
+
7
+    public Boolean checkingForNull(String[] arr){
8
+
9
+       Boolean flag = null;
10
+
11
+
12
+        for (int i = 0; i < arr.length ; i++) {
13
+            if(arr[i] == null){
14
+
15
+                return flag = true;
16
+            }else{
17
+                 flag = false;
18
+            }
19
+
20
+        }
21
+
22
+        return flag;
23
+
24
+
25
+    }
26
+
27
+
28
+    public Integer sumValuesOfArrayInt(Integer[] arr) {
29
+
30
+        int value = 0;
31
+
32
+        for (int i = 0; i < arr.length; i++) {
33
+            value += arr[i];
34
+        }
35
+
36
+        return value;
37
+    }
38
+
39
+    public double sumValuesOfArrayDouble(double[] arr) {
40
+        int value = 0;
41
+
42
+        for(double a : arr)
43
+
44
+            value += a;
45
+
46
+        return value;
47
+    }
48
+
49
+    public Integer getTheAvgInt(Integer[] arr) {
50
+
51
+        int value = sumValuesOfArrayInt(arr);
52
+
53
+        int avg = value / arr.length ;
54
+
55
+        return avg;
56
+    }
57
+
58
+    public double getTheAvgDoub(double[] arr) {
59
+
60
+        double value = sumValuesOfArrayDouble(arr);
61
+
62
+        value = value / arr.length ;
63
+
64
+        return value;
65
+    }
66
+
67
+
68
+    public static long theFibonacci(long i){
69
+
70
+        if(i == 0){
71
+            return 0;
72
+        }else if(i <= 2){
73
+            return 1;
74
+        }
75
+       return theFibonacci(i - 1) + theFibonacci(i - 2);
76
+
77
+
78
+    }
79
+
80
+    public Boolean containsValue(Integer [] arr, int value) {
81
+
82
+        Boolean flag = null;
83
+
84
+        for (int i = 0; i < arr.length; i++) {
85
+
86
+
87
+            if (arr[i] == value) {
88
+                return flag = true;
89
+            }
90
+        }
91
+        return flag = false;
92
+
93
+
94
+    }
95
+
96
+    public Integer[] reverseAnArray(Integer [] arr){
97
+
98
+        Integer [] arr2 = new Integer[arr.length];
99
+        int counter = 0;
100
+
101
+        for (int i = arr.length-1; i >= 0; i--) {
102
+
103
+            if(arr[i] != null) {
104
+                arr2[counter] = arr[i];
105
+                counter++;
106
+
107
+            }
108
+
109
+
110
+        }
111
+
112
+        return  arr2;
113
+
114
+    }
115
+
116
+
117
+
118
+
119
+
2 120
 }

+ 53
- 0
arraz/src/main/java/MinMax1.java View File

@@ -0,0 +1,53 @@
1
+import java.rmi.NotBoundException;
2
+
3
+public class MinMax1 {
4
+
5
+    static class MinMax {
6
+        public int min;
7
+        public int max;
8
+    }
9
+
10
+    static MinMax findMaxnMin(Integer [] arr){
11
+        MinMax minmax = new MinMax();
12
+
13
+        if(arr.length == 1){
14
+            minmax.max = arr[0];
15
+            minmax.min = arr[0];
16
+
17
+            return minmax;
18
+        }
19
+
20
+
21
+        if(arr[0] > arr[1]){
22
+
23
+            minmax.max = arr[0];
24
+            minmax.min = arr[1];
25
+
26
+        }else{
27
+
28
+            minmax.max = arr[1];
29
+            minmax.min = arr[0];
30
+        }
31
+
32
+        for (int i =2; i < arr.length; i++) {
33
+
34
+            if(arr[i] > minmax.max) {
35
+                minmax.max = arr[i];
36
+
37
+            }
38
+            else if(arr[i] < minmax.min){
39
+
40
+                minmax.min = arr[i];
41
+            }
42
+        }
43
+
44
+        return minmax;
45
+    }
46
+
47
+
48
+    public int averageArrayWithoutMaxMin(){
49
+        return 0;
50
+    }
51
+}
52
+
53
+

+ 227
- 0
arraz/src/main/java/MoreArrayc.java View File

@@ -0,0 +1,227 @@
1
+import java.util.ArrayList;
2
+import java.util.Arrays;
3
+import java.util.Iterator;
4
+import java.util.List;
5
+import java.util.regex.Pattern;
6
+
7
+public class MoreArrayc {
8
+
9
+        Arraz cool = new Arraz();
10
+
11
+    public int findIndexOf(Integer[] arr, int value) {
12
+
13
+        int container = 0;
14
+
15
+
16
+        for (int i = 0; i < arr.length; i++) {
17
+
18
+            if (arr[i] == value) {
19
+                container = i;
20
+
21
+            }
22
+        }
23
+        return container;
24
+    }
25
+
26
+    public Integer[] copyArrayByIteratingthroughIt(Integer [] arr){
27
+
28
+        ArrayList<Integer> arr1 = new ArrayList<Integer>(Arrays.asList(arr));
29
+        Iterator<Integer> interate = arr1.iterator();
30
+        Integer [] arr2 = new Integer[arr.length];
31
+        int count = 0;
32
+
33
+
34
+        while (interate.hasNext()){
35
+
36
+            arr2[count] = interate.next();
37
+            count++;
38
+
39
+        }
40
+
41
+        return arr2;
42
+
43
+    }
44
+
45
+    public Integer[] copyArrayByLoopingthroughIt(Integer [] arr){
46
+
47
+
48
+        Integer [] arrCop = new Integer[arr.length];
49
+
50
+        for (int i = 0; i <arr.length ; i++) {
51
+
52
+            arrCop[i] = arr[i];
53
+        }
54
+
55
+        return arrCop;
56
+
57
+    }
58
+
59
+    public Boolean checkArrayForEquals(Integer[]arr,Integer []arr2){
60
+
61
+            Boolean flag = null;
62
+
63
+
64
+
65
+        for (int i = 0; i < arr.length; i++) {
66
+
67
+            if(arr[i] == arr2[i]){
68
+                flag = true;
69
+            }else{
70
+                flag = false;
71
+            }
72
+    }
73
+        return flag;
74
+    }
75
+
76
+    public Integer[] removeFromArray(Integer [] arr, int value){
77
+
78
+        int size = arr.length;
79
+
80
+        int index = findIndexOf(arr,value);
81
+
82
+        for (int i = index; i < size -1; i++) {
83
+
84
+                arr[i] = arr[i+1];
85
+        }
86
+
87
+
88
+        size = size - 1;
89
+
90
+        Integer[] cop = Arrays.copyOf(arr,size);
91
+        return cop;
92
+
93
+    }
94
+
95
+    public Integer find2ndLargestValueFromArray(Integer [] arr){
96
+
97
+        Integer maxNum;
98
+        Integer secondMax;
99
+
100
+       if(arr.length <= 1){
101
+           return arr[0];
102
+       }
103
+
104
+       if(arr[0] < arr[1]) {
105
+            maxNum = arr[1];
106
+            secondMax = arr[0];
107
+
108
+       }else{
109
+           maxNum = arr[0];
110
+           secondMax = arr[1];
111
+       }
112
+
113
+        for (int i = 2; i < arr.length; i++) {
114
+
115
+            if(arr[i] > maxNum){
116
+
117
+                secondMax =maxNum;
118
+                maxNum = arr[i];
119
+
120
+            }else if(arr[i] < maxNum && arr[i] > secondMax){
121
+                secondMax = arr[i];
122
+            }
123
+
124
+        }
125
+        return secondMax;
126
+    }
127
+
128
+    public Integer[] sortingArrays (Integer [] arr) {
129
+
130
+        return null;
131
+
132
+
133
+    }
134
+
135
+    public void makeAnArrayListfromArray(){
136
+
137
+    }
138
+    public void capacity(int mincap){
139
+
140
+
141
+
142
+    }
143
+
144
+
145
+
146
+    public Integer[] ArrayFromArrayList(ArrayList<Integer> arrlist){
147
+
148
+        return null;
149
+
150
+    }
151
+
152
+    public ArrayList<Integer> AnArrayFromArrayList(Integer[] arr){
153
+        return null;
154
+    }
155
+
156
+    public Boolean arraysHas65N77 (Integer arr [],int n , int k){
157
+
158
+        Boolean flag  = null;
159
+
160
+        for (int i = 0; i <arr.length ; i++) {
161
+
162
+
163
+            if (cool.containsValue(arr, n)&&cool.containsValue(arr,k)) {
164
+                flag = true;
165
+            }else{
166
+                flag = false;
167
+            }
168
+        }
169
+        return flag;
170
+    }
171
+
172
+    public Integer sumArrays (Integer [] arr){
173
+
174
+
175
+        for (int i = 0; i < arr.length; i++) {
176
+            arr[i] = i;
177
+        }
178
+        int sum = 0;
179
+        for (int e : arr) sum += e;
180
+
181
+        return sum;
182
+    }
183
+
184
+    public Integer[] makeMeACopyplz (Integer [] arr){
185
+        Arraz arraz = new Arraz();
186
+
187
+
188
+        Integer[] arr2 = copyArrayByIteratingthroughIt(arr);
189
+        Integer[] arr3 = arraz.reverseAnArray(arr2);
190
+
191
+        return arr3;
192
+    }
193
+
194
+    public Integer[] insertAtStartAndCopy(Integer[] arr,int value){
195
+
196
+        List<Integer> list = new ArrayList<>();
197
+        list.addAll(Arrays.asList(arr));
198
+        list.add(0, value);
199
+
200
+        //Then
201
+
202
+        return arr = list.toArray(new Integer[list.size()]);
203
+
204
+    }
205
+
206
+    public Integer[] insertAtLastAndCopy(Integer[] arr,int value){
207
+
208
+        arr = Arrays.copyOf(arr,arr.length +1);
209
+        arr[arr.length-1] = value;
210
+
211
+        //Then
212
+
213
+        return arr;
214
+
215
+    }
216
+
217
+
218
+
219
+
220
+}
221
+
222
+
223
+//    makeMeAnArrayListFromArray
224
+//    makeMeAnArrayFromArrayList
225
+
226
+//   averageArrayWithoutMaxMin
227
+

+ 15
- 0
arraz/src/main/java/OddsAndEvens.java View File

@@ -0,0 +1,15 @@
1
+import java.util.ArrayList;
2
+
3
+public class OddsAndEvens {
4
+
5
+    public int odds;
6
+    public int evens;
7
+
8
+    public OddsAndEvens(int odds, int evens) {
9
+        this.odds = odds;
10
+        this.evens = evens;
11
+    }
12
+
13
+
14
+
15
+}

+ 41
- 0
arraz/src/main/java/OddsAndEvensMethods.java View File

@@ -0,0 +1,41 @@
1
+public class OddsAndEvensMethods extends OddsAndEvens {
2
+
3
+
4
+
5
+    public OddsAndEvensMethods(int odds, int evens) {
6
+
7
+        super(odds,evens);
8
+    }
9
+
10
+    public int getOddNums(int[] arr){
11
+
12
+        //ArrayList<Integer> containerInt = new ArrayList<Integer>();
13
+        int counter = 0;
14
+        for (int i = 0; i < arr.length; i++) {
15
+
16
+            if(arr[i] % 2 != 0){
17
+                counter ++;
18
+
19
+            }
20
+
21
+        }
22
+        return this.odds = counter;
23
+    }
24
+    public int getEvensNums(int[] arr){
25
+
26
+        //ArrayList<Integer> containerInt = new ArrayList<Integer>();
27
+        int counter = 0;
28
+        for (int i = 0; i < arr.length; i++) {
29
+
30
+            if(arr[i] != 0) {
31
+
32
+                if (arr[i] % 2 == 0) {
33
+                    counter++;
34
+
35
+                }
36
+            }
37
+
38
+        }
39
+        return this.evens = counter;
40
+    }
41
+}

+ 242
- 1
arraz/src/test/java/ArrazTest.java View File

@@ -1,5 +1,246 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
1 4
 import static org.junit.Assert.*;
2 5
 
3 6
 public class ArrazTest {
4 7
 
5
-}
8
+    Arraz a = new Arraz();
9
+
10
+    @Test
11
+    public void sumValuesOfArrayIntTest1(){
12
+        //Given
13
+
14
+        Integer arr [] = {4,32,1,4};
15
+
16
+
17
+        //When
18
+        // 41
19
+
20
+        int actual = a.sumValuesOfArrayInt(arr);
21
+
22
+        //Then
23
+        Assert.assertEquals(41,actual);
24
+
25
+    }
26
+    @Test
27
+    public void sumValuesOfArrayIntTestNegative2(){
28
+        //Given
29
+
30
+        Integer arr [] = {-6,43,10,-3};
31
+
32
+
33
+        //When
34
+        // 44
35
+        Integer actual = a.sumValuesOfArrayInt(arr);
36
+        //Then
37
+
38
+        Assert.assertEquals(44,actual);
39
+
40
+    }
41
+
42
+    @Test
43
+    public void sumValuesOfArrayDoubleTest1(){
44
+
45
+        //Given
46
+
47
+        double arr [] = {6.0,43.4,10.3,-3.6};
48
+        double value = 0;
49
+
50
+
51
+        Double actual = a.sumValuesOfArrayDouble(arr);
52
+
53
+
54
+        //Then
55
+        Assert.assertEquals(55.0,actual);
56
+    }
57
+
58
+    @Test
59
+    public void sumValuesOfArrayDoubleTest2(){
60
+
61
+        //Given
62
+
63
+        double arr [] = {-65,4.4,3.4,-3.6};
64
+        double value = 0;
65
+
66
+
67
+        Double actual = a.sumValuesOfArrayDouble(arr);
68
+
69
+
70
+        //Then
71
+        Assert.assertEquals(-59.0,actual);
72
+    }
73
+
74
+    @Test
75
+    public void getTheAvgInt(){
76
+        //Given
77
+
78
+        Integer  arr [] = {65,4,4,3,36};
79
+
80
+
81
+        //When
82
+
83
+        Integer actual = a.getTheAvgInt(arr);
84
+
85
+        //Then
86
+        Assert.assertEquals(22,actual);
87
+    }
88
+
89
+    @Test
90
+    public void getTheAvgInt2(){
91
+        //Given
92
+
93
+        Integer  arr [] = {6,4,4,-399,36};
94
+        int value;
95
+
96
+        //When
97
+
98
+        value = a.sumValuesOfArrayInt(arr);
99
+
100
+        int actual = value / arr.length ;
101
+
102
+        //Then
103
+        Assert.assertEquals(-69,actual);
104
+    }
105
+
106
+    @Test
107
+    public void getTheAvgDoubTest(){
108
+        //Given
109
+
110
+        double arr [] = {6.5,0.4,45,3.0,36};
111
+
112
+
113
+        //When
114
+
115
+        double actual = a.getTheAvgDoub(arr);
116
+
117
+        //Then
118
+        Assert.assertEquals(18.0,actual);
119
+    }
120
+
121
+    @Test
122
+    public void getTheAvgDoubTest2(){
123
+        //Given
124
+
125
+        double arr [] = {-6.5,0.4,-890,3050.0,36};
126
+
127
+
128
+        //When
129
+
130
+        double actual = a.getTheAvgDoub(arr);
131
+
132
+        //Then
133
+        Assert.assertEquals(438.2,actual);
134
+    }
135
+
136
+
137
+    @Test
138
+    public void gettingThoseNullsTest(){
139
+        //Given
140
+
141
+        String arr [] = {"Connor","Frank",null,"Steven","Marshell"};
142
+
143
+
144
+        //When
145
+
146
+        Boolean actual = a.checkingForNull(arr);
147
+
148
+        //Then
149
+        Assert.assertTrue(actual);
150
+    }
151
+
152
+    @Test
153
+    public void gettingThoseNoNullsTest(){
154
+        //Given
155
+
156
+        String arr [] = {"Carol","Frank","Steven","Marshell"};
157
+
158
+
159
+        //When
160
+
161
+        Boolean actual = a.checkingForNull(arr);
162
+
163
+        //Then
164
+        Assert.assertFalse(actual);
165
+    }
166
+
167
+    @Test
168
+    public void testing_TheFibonacci() {
169
+
170
+        long i = 10;
171
+
172
+
173
+        System.out.println(a.theFibonacci(i));
174
+
175
+
176
+
177
+    }
178
+
179
+    @Test
180
+    public void containsValueTestingFalse() {
181
+
182
+        Integer[] arr = {1, 2, 3, 4};
183
+
184
+        int value = 100;
185
+
186
+       Boolean actual = a.containsValue(arr,value);
187
+
188
+
189
+        Assert.assertFalse(actual);
190
+    }
191
+    @Test
192
+    public void containsValueTestingTrue() {
193
+
194
+        Integer[] arr = {1, 2, 3, 4};
195
+
196
+        int value = 1;
197
+
198
+        Boolean actual = a.containsValue(arr,value);
199
+
200
+
201
+        Assert.assertTrue(actual);
202
+    }
203
+
204
+    @Test
205
+    public void reverseArrayTest(){
206
+
207
+        Integer [] arr = {5,6,7,8,9};
208
+        Integer [] arr2 = {9,8,7,6,5};
209
+        Boolean flag = null;
210
+
211
+
212
+        Integer [] actual = a.reverseAnArray(arr);
213
+
214
+        for (int i = 0; i < arr.length ; i++) {
215
+
216
+            flag = actual[i] == arr2[i];
217
+
218
+            System.out.print(actual[i]);
219
+        }
220
+
221
+        Assert.assertTrue(flag);
222
+
223
+    }
224
+    @Test
225
+    public void reverseArrayTest2() {
226
+
227
+        Integer[] arr = {5, 6, 7, -3, 9};
228
+        Integer[] arr2 = {9, -3, 7, 6, 5};
229
+        Boolean flag = null;
230
+
231
+
232
+        Integer[] actual = a.reverseAnArray(arr);
233
+
234
+        for (int i = 0; i < arr.length; i++) {
235
+
236
+            flag = actual[i] == arr2[i];
237
+
238
+            System.out.print(actual[i]);
239
+        }
240
+
241
+        Assert.assertTrue(flag);
242
+
243
+        }
244
+
245
+
246
+    }

+ 117
- 0
arraz/src/test/java/MinMaxTest.java View File

@@ -0,0 +1,117 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import java.io.IOException;
5
+import java.util.Arrays;
6
+
7
+public class MinMaxTest {
8
+
9
+
10
+Arraz cool = new Arraz();
11
+MoreArrayc moreArrays = new MoreArrayc();
12
+
13
+    @Test
14
+    public void getMin(){
15
+
16
+        //Given
17
+
18
+        Integer [] arr = {10,21,7,8,9,4,3};
19
+
20
+        //When
21
+
22
+        MinMax1.MinMax x  = MinMax1.findMaxnMin(arr);
23
+
24
+        //Then
25
+        Assert.assertEquals(3,x.min);
26
+
27
+    }
28
+
29
+    @Test
30
+    public void getMax(){
31
+
32
+        //Given
33
+
34
+        Integer [] arr = {10,21,7,8,9,4,3};
35
+
36
+        //When
37
+
38
+        MinMax1.MinMax x  = MinMax1.findMaxnMin(arr);
39
+
40
+        //Then
41
+        Assert.assertEquals(21,x.max);
42
+
43
+    }
44
+
45
+    @Test
46
+    public void averageArrayWithoutMaxMinTEST () {
47
+        //Given
48
+
49
+        Integer [] arr = {10,21,7,8,9,4,3};
50
+        MinMax1.MinMax x  = MinMax1.findMaxnMin(arr);
51
+        Integer [] arr2 = new Integer[arr.length];
52
+
53
+
54
+        //When
55
+        for (int i = 0; i < arr.length ; i++) {
56
+
57
+
58
+            if(!arr[i].equals(x.max) && !arr[i].equals(x.min)){
59
+
60
+                arr2[i] = arr[i];
61
+            }
62
+
63
+        }
64
+
65
+        Integer[] arr3 = moreArrays.copyArrayByIteratingthroughIt(arr2);
66
+
67
+
68
+        //Then
69
+        for (int i = 0; i <arr3.length; i++) {
70
+            System.out.print(arr3[i]);
71
+        }
72
+         //   Assert.assertEquals(6,getAvg);
73
+    }
74
+
75
+    @Test
76
+    public void  arraysHas65N77TESTFAIL () {
77
+
78
+
79
+        //Given
80
+
81
+        Integer [] arr = {89,21,7,8,65,4,3};
82
+        Integer n = 65;
83
+        Integer k = 77;
84
+
85
+        //When
86
+
87
+        Boolean actual = moreArrays.arraysHas65N77(arr,n,k);
88
+        //then
89
+
90
+
91
+        Assert.assertFalse(actual);
92
+
93
+    }
94
+
95
+
96
+    @Test
97
+    public void  arraysHas65N77TESTWIN () {
98
+
99
+
100
+        //Given
101
+
102
+        Integer [] arr = {77,21,7,8,65,4,3};
103
+        Integer n = 65;
104
+        Integer k = 77;
105
+
106
+        //When
107
+
108
+        Boolean actual = moreArrays.arraysHas65N77(arr,n,k);
109
+        //then
110
+
111
+
112
+        Assert.assertTrue(actual);
113
+
114
+    }
115
+
116
+
117
+}

+ 334
- 0
arraz/src/test/java/MoreArraysTest.java View File

@@ -0,0 +1,334 @@
1
+import com.sun.xml.internal.xsom.impl.scd.Iterators;
2
+import org.junit.Assert;
3
+import org.junit.Test;
4
+
5
+import java.security.PublicKey;
6
+import java.util.ArrayList;
7
+import java.util.Arrays;
8
+import java.util.Iterator;
9
+import java.util.List;
10
+
11
+public class MoreArraysTest {
12
+
13
+
14
+    MoreArrayc more = new MoreArrayc();
15
+    Arraz arraz = new Arraz();
16
+    @Test
17
+    public void findIndexOfTest() {
18
+        //Given
19
+        Integer [] arr = {5, 1, 7, 8, 9, 4, 3};
20
+        int value = 8;
21
+
22
+
23
+        //When
24
+
25
+       int container = more.findIndexOf(arr,value);
26
+
27
+
28
+        //Then
29
+        Assert.assertEquals(3, container);
30
+
31
+    }
32
+
33
+    @Test
34
+    public void findIndexOfTest2(){
35
+        //Given
36
+        Integer[] arr = {5,1,7,8,9,4,3};
37
+        int value = 5;
38
+
39
+        //When
40
+
41
+        int container = more.findIndexOf(arr,value);
42
+
43
+
44
+        //Then
45
+        Assert.assertEquals(0,container);
46
+
47
+
48
+    }
49
+
50
+    @Test
51
+    public void CopyAnArrayByIteratingitTest(){
52
+
53
+        //Given
54
+        Integer [] arr = {5,1,7,8,9,4,3};
55
+        Integer [] arrCop;
56
+
57
+
58
+        //When
59
+        arrCop = more.copyArrayByIteratingthroughIt(arr);
60
+
61
+
62
+        //Then
63
+        Assert.assertTrue(Arrays.equals(arr,arrCop));
64
+
65
+    }
66
+
67
+    @Test
68
+    public void CopyAnArrayByIteratingitTestAddingnew(){
69
+
70
+        //Given
71
+        Integer [] arr = {5,1,7,8,9,4,3};
72
+        Integer [] arrCop;
73
+
74
+
75
+        //When
76
+        arrCop = more.copyArrayByIteratingthroughIt(arr);
77
+
78
+        arrCop [4] = 8;
79
+
80
+        //Then
81
+        Assert.assertFalse(Arrays.equals(arr,arrCop));
82
+
83
+    }
84
+
85
+    @Test
86
+    public void check2ArraysForEquals(){
87
+
88
+        //Given
89
+        Integer [] arr = {5,1,7,8,9,4,3};
90
+        Integer [] arr2 = {5,1,7,8,9,4,3};
91
+
92
+
93
+
94
+        //When
95
+
96
+        Boolean flag = more.checkArrayForEquals(arr,arr2);
97
+        //Then
98
+
99
+        Assert.assertTrue(flag);
100
+
101
+    }
102
+
103
+    @Test
104
+    public void CopyAnArrayByloopingitTest(){
105
+
106
+        //Given
107
+        Integer [] arr = {5,1,7,8,9,4,3};
108
+        Integer [] arrCop;
109
+
110
+
111
+        //When
112
+        arrCop = more.copyArrayByLoopingthroughIt(arr);
113
+
114
+
115
+
116
+        //Then
117
+        Assert.assertTrue(Arrays.equals(arr,arrCop));
118
+
119
+    }
120
+
121
+    @Test
122
+    public void CopyAnArrayByloopingitTestadding(){
123
+
124
+        //Given
125
+        Integer [] arr = {5,1,7,8,9,4,3};
126
+        Integer [] arrCop;
127
+
128
+
129
+        //When
130
+        arrCop = more.copyArrayByLoopingthroughIt(arr);
131
+
132
+        arrCop[0] = 4;
133
+
134
+        //Then
135
+        Assert.assertFalse(Arrays.equals(arr,arrCop));
136
+
137
+    }
138
+
139
+    @Test
140
+    public void removeElementFromArray(){
141
+
142
+        //Given
143
+        Integer [] arr = {5,1,7,8,9,4,3};
144
+        int element = 4;
145
+        int expected = 6;
146
+
147
+
148
+        //When
149
+
150
+        Integer[] cop = more.removeFromArray(arr,element);
151
+
152
+
153
+        //Then
154
+
155
+        Assert.assertEquals(expected,cop.length);
156
+
157
+
158
+    }
159
+
160
+    @Test
161
+    public void find2ndLargestValueFromArrayTest (){
162
+        //Given
163
+        Integer [] arr = {5,1,7,8,9,4,3};
164
+
165
+        //When
166
+        Integer actual = more.find2ndLargestValueFromArray(arr);
167
+
168
+        //Then
169
+
170
+        Assert.assertEquals(8,actual);
171
+    }
172
+
173
+    @Test
174
+    public void makeMeAnArrayListFromArrayTest(){
175
+
176
+        //Given
177
+        Integer [] arr = {5,1,7,8,9,4,3};
178
+        int modCount = 0;
179
+        //When
180
+
181
+        ArrayList<Integer> arrlist = new ArrayList<Integer>(Arrays.asList(arr));
182
+
183
+        //Then
184
+        int counting = 0;
185
+
186
+
187
+
188
+
189
+    }
190
+
191
+    @Test
192
+    public void sumOfTensLookingFor30TEST (){
193
+        //Given
194
+        Integer [] arr = {10,10,10};
195
+
196
+        //When
197
+
198
+
199
+         Integer sum = arraz.sumValuesOfArrayInt(arr);
200
+         Boolean actual = sum == 30;
201
+
202
+
203
+        //Then
204
+
205
+        Assert.assertTrue(actual);
206
+    }
207
+
208
+    @Test
209
+    public void sumOfTensLookingFor30FAIL (){
210
+        //Given
211
+        Integer [] arr = {10,10,1};
212
+
213
+        //When
214
+
215
+
216
+        Integer sum = arraz.sumValuesOfArrayInt(arr);
217
+        Boolean actual = sum == 30;
218
+
219
+
220
+        //Then
221
+
222
+        Assert.assertFalse(actual);
223
+    }
224
+
225
+    @Test
226
+    public void makeMeACopyPleaseTEST(){
227
+
228
+        //Given
229
+
230
+        Integer [] arr = {5,1,7,8,9,4,3};
231
+        Integer [] reverse = {3,4,9,8,7,1,5};
232
+
233
+
234
+        //When
235
+
236
+        Integer [] actual = more.makeMeACopyplz(arr);
237
+
238
+        //Then
239
+        Assert.assertEquals(reverse,actual);
240
+
241
+    }
242
+
243
+    @Test
244
+    public void removeLastThenCopy(){
245
+        //Given
246
+
247
+        Integer [] arr = {5,1,7,8,9,4,3};
248
+        Integer [] copyRemove = {5,1,7,8,9,4};
249
+
250
+
251
+        //When
252
+
253
+        Integer [] arr2 = more.removeFromArray(arr,arr[arr.length-1]);
254
+
255
+        for (int i = 0; i < arr2.length ; i++) {
256
+            System.out.print(arr2[i]);
257
+        }
258
+
259
+
260
+        //Then
261
+        Assert.assertEquals(copyRemove,arr2);
262
+
263
+
264
+    }
265
+    @Test
266
+    public void removeFirstThenCopy(){
267
+        //Given
268
+
269
+        Integer [] arr = {5,1,7,8,9,4,3};
270
+        Integer [] copyRemove = {1,7,8,9,4,3};
271
+
272
+
273
+        //When
274
+
275
+        Integer [] arr2 = more.removeFromArray(arr,arr[0]);
276
+
277
+        for (int i = 0; i < arr2.length ; i++) {
278
+            System.out.print(arr2[i]);
279
+        }
280
+
281
+
282
+        //Then
283
+        Assert.assertEquals(copyRemove,arr2);
284
+
285
+
286
+    }
287
+
288
+    @Test
289
+    public void insertfirstThenCopyTEST() {
290
+
291
+        //Given
292
+
293
+        Integer[] arr = {5, 1, 7, 8, 9, 4, 3};
294
+        int value = 6;
295
+        Integer[] arr2 = {6, 5, 1, 7, 8, 9, 4, 3};
296
+
297
+
298
+        //When
299
+
300
+       Integer[] actual = more.insertAtStartAndCopy(arr,value);
301
+
302
+        //Then
303
+
304
+
305
+
306
+
307
+        Assert.assertEquals(arr2, actual);
308
+
309
+    }
310
+    @Test
311
+    public void insertLastThenCopyTEST(){
312
+
313
+        //Given
314
+
315
+        Integer [] arr = {5,1,7,8,9,4,3};
316
+        int value = 6;
317
+
318
+        Integer[] arr2 = {5,1,7,8,9,4,3,6};
319
+
320
+
321
+
322
+        //When
323
+
324
+        Integer[] actual = more.insertAtLastAndCopy(arr,value);
325
+
326
+        //Then
327
+
328
+
329
+        Assert.assertEquals(arr2,actual);
330
+
331
+    }
332
+
333
+
334
+}

+ 79
- 0
arraz/src/test/java/OddsAndEventsTest.java View File

@@ -0,0 +1,79 @@
1
+import org.junit.Assert;
2
+import org.junit.Before;
3
+import org.junit.Test;
4
+
5
+public class OddsAndEventsTest {
6
+
7
+    OddsAndEvensMethods oNEM = new OddsAndEvensMethods(0,0);
8
+    @Before
9
+    public void setup(){
10
+
11
+    }
12
+
13
+
14
+    @Test
15
+    public void getOddNumsTest(){
16
+
17
+        // Given
18
+        int [] arr = {5,6,7,8,9};
19
+        //When
20
+
21
+        int  actual =  oNEM.getOddNums(arr);
22
+
23
+        //Then
24
+
25
+        Assert.assertEquals(3,oNEM.odds);
26
+
27
+
28
+    }
29
+
30
+
31
+    @Test
32
+    public void getOddNumsTest2(){
33
+
34
+        // Given
35
+        int [] arr = {5,0,7,8,9};
36
+        //When
37
+
38
+        int  actual = oNEM.getOddNums(arr);
39
+
40
+        //Then
41
+
42
+        Assert.assertEquals(3,actual);
43
+
44
+
45
+    }
46
+
47
+    @Test
48
+    public void getEvenNumsTest(){
49
+
50
+        // Given
51
+        int [] arr = {5,1,7,8,9,4};
52
+        //When
53
+
54
+        int  actual = oNEM.getEvensNums(arr);
55
+
56
+        //Then
57
+
58
+        Assert.assertEquals(2,actual);
59
+
60
+
61
+    }
62
+    @Test
63
+    public void getEvenNumsTestZeroSnuckIn(){
64
+
65
+        // Given
66
+        int [] arr = {5,1,7,8,9,4,0,0,0};
67
+        //When
68
+
69
+        int  actual = oNEM.getEvensNums(arr);
70
+
71
+        //Then
72
+
73
+        Assert.assertEquals(2,actual);
74
+
75
+
76
+    }
77
+
78
+
79
+}