Lauren Green пре 6 година
родитељ
комит
50e5f76886

+ 323
- 249
.idea/workspace.xml Прегледај датотеку

@@ -2,69 +2,117 @@
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/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7 10
     </list>
8 11
     <ignored path="$PROJECT_DIR$/arraz/target/" />
9 12
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
-    <option name="TRACKING_ENABLED" value="true" />
11 13
     <option name="SHOW_DIALOG" value="false" />
12 14
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
13 15
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14 16
     <option name="LAST_RESOLUTION" value="IGNORE" />
15 17
   </component>
18
+  <component name="FUSProjectUsageTrigger">
19
+    <session id="1944976257">
20
+      <usages-collector id="statistics.lifecycle.project">
21
+        <counts>
22
+          <entry key="project.open.time.4" value="1" />
23
+          <entry key="project.opened" value="1" />
24
+        </counts>
25
+      </usages-collector>
26
+      <usages-collector id="statistics.file.extensions.open">
27
+        <counts>
28
+          <entry key="java" value="4" />
29
+          <entry key="md" value="1" />
30
+        </counts>
31
+      </usages-collector>
32
+      <usages-collector id="statistics.file.types.open">
33
+        <counts>
34
+          <entry key="JAVA" value="4" />
35
+          <entry key="Markdown" value="1" />
36
+        </counts>
37
+      </usages-collector>
38
+      <usages-collector id="statistics.file.extensions.edit">
39
+        <counts>
40
+          <entry key="java" value="4279" />
41
+        </counts>
42
+      </usages-collector>
43
+      <usages-collector id="statistics.file.types.edit">
44
+        <counts>
45
+          <entry key="JAVA" value="4279" />
46
+        </counts>
47
+      </usages-collector>
48
+    </session>
49
+  </component>
16 50
   <component name="FileEditorManager">
17
-    <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">
29
-        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
30
-          <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 />
34
-            </state>
35
-          </provider>
36
-        </entry>
37
-      </file>
38
-      <file leaf-file-name="ArrazTest.java" pinned="false" current-in-tab="false">
39
-        <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
40
-          <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 />
44
-            </state>
45
-          </provider>
46
-        </entry>
47
-      </file>
48
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
49
-        <entry file="file://$PROJECT_DIR$/README.md">
50
-          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
51
-            <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 />
55
-              </first_editor>
56
-              <second_editor />
57
-            </state>
58
-          </provider>
59
-        </entry>
60
-      </file>
61
-    </leaf>
51
+    <splitter split-orientation="horizontal" split-proportion="0.5">
52
+      <split-first>
53
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
54
+          <file pinned="false" current-in-tab="false">
55
+            <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
56
+              <provider selected="true" editor-type-id="text-editor" />
57
+            </entry>
58
+          </file>
59
+          <file pinned="false" current-in-tab="false">
60
+            <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
61
+              <provider selected="true" editor-type-id="text-editor">
62
+                <state relative-caret-position="459">
63
+                  <caret line="216" column="40" selection-start-line="216" selection-start-column="40" selection-end-line="216" selection-end-column="40" />
64
+                  <folding>
65
+                    <element signature="e#415#416#0" expanded="true" />
66
+                    <element signature="e#475#476#0" expanded="true" />
67
+                    <element signature="e#541#542#0" expanded="true" />
68
+                    <element signature="e#602#603#0" expanded="true" />
69
+                    <element signature="e#4244#4253#0" expanded="true" />
70
+                  </folding>
71
+                </state>
72
+              </provider>
73
+            </entry>
74
+          </file>
75
+          <file pinned="false" current-in-tab="true">
76
+            <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
77
+              <provider selected="true" editor-type-id="text-editor">
78
+                <state relative-caret-position="373">
79
+                  <caret line="413" column="31" lean-forward="true" selection-start-line="413" selection-start-column="31" selection-end-line="413" selection-end-column="31" />
80
+                  <folding>
81
+                    <element signature="imports" expanded="true" />
82
+                    <element signature="e#8652#8661#0" expanded="true" />
83
+                    <element signature="e#9032#9041#0" expanded="true" />
84
+                    <element signature="e#9376#9385#0" expanded="true" />
85
+                    <element signature="e#9720#9729#0" expanded="true" />
86
+                  </folding>
87
+                </state>
88
+              </provider>
89
+            </entry>
90
+          </file>
91
+        </leaf>
92
+      </split-first>
93
+      <split-second>
94
+        <leaf>
95
+          <file pinned="false" current-in-tab="true">
96
+            <entry file="file://$PROJECT_DIR$/README.md">
97
+              <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
98
+                <state split_layout="SECOND">
99
+                  <first_editor relative-caret-position="270">
100
+                    <caret line="18" selection-start-line="18" selection-end-line="18" />
101
+                  </first_editor>
102
+                  <second_editor />
103
+                </state>
104
+              </provider>
105
+            </entry>
106
+          </file>
107
+        </leaf>
108
+      </split-second>
109
+    </splitter>
62 110
   </component>
63 111
   <component name="FileTemplateManagerImpl">
64 112
     <option name="RECENT_TEMPLATES">
65 113
       <list>
66
-        <option value="Class" />
67 114
         <option value="JUnit4 Test Class" />
115
+        <option value="Class" />
68 116
       </list>
69 117
     </option>
70 118
   </component>
@@ -72,9 +120,6 @@
72 120
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
73 121
   </component>
74 122
   <component name="GradleLocalSettings">
75
-    <option name="externalProjectsViewState">
76
-      <projects_view />
77
-    </option>
78 123
     <option name="projectSyncType">
79 124
       <map>
80 125
         <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
@@ -84,8 +129,11 @@
84 129
   <component name="IdeDocumentHistory">
85 130
     <option name="CHANGED_PATHS">
86 131
       <list>
87
-        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
88 132
         <option value="$PROJECT_DIR$/README.md" />
133
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
134
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
135
+        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
136
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
89 137
       </list>
90 138
     </option>
91 139
   </component>
@@ -103,23 +151,13 @@
103 151
     </option>
104 152
   </component>
105 153
   <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" />
154
+    <option name="x" value="-209" />
155
+    <option name="y" value="-1057" />
156
+    <option name="width" value="1517" />
157
+    <option name="height" value="959" />
110 158
   </component>
111 159
   <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 />
160
+    <navigator proportions="" version="1">
123 161
       <foldersAlwaysOnTop value="true" />
124 162
     </navigator>
125 163
     <panes>
@@ -151,27 +189,49 @@
151 189
             <path>
152 190
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
153 191
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
192
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
193
+              <item name="src" type="462c0819:PsiDirectoryNode" />
194
+              <item name="main" type="462c0819:PsiDirectoryNode" />
195
+              <item name="java" type="462c0819:PsiDirectoryNode" />
196
+            </path>
197
+            <path>
198
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
199
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
200
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
201
+              <item name="src" type="462c0819:PsiDirectoryNode" />
202
+              <item name="test" type="462c0819:PsiDirectoryNode" />
203
+            </path>
204
+            <path>
205
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
206
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
207
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
208
+              <item name="src" type="462c0819:PsiDirectoryNode" />
209
+              <item name="test" type="462c0819:PsiDirectoryNode" />
210
+              <item name="java" type="462c0819:PsiDirectoryNode" />
211
+            </path>
212
+            <path>
213
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
214
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
154 215
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
155 216
             </path>
156 217
           </expand>
157 218
           <select />
158 219
         </subPane>
159 220
       </pane>
160
-      <pane id="Scratches" />
161 221
       <pane id="PackagesPane" />
162
-      <pane id="AndroidView" />
163 222
       <pane id="Scope" />
164 223
     </panes>
165 224
   </component>
166 225
   <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" />
226
+    <property name="GO_FMT" value="false" />
169 227
     <property name="WebServerToolWindowFactoryState" value="false" />
170 228
     <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" />
229
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544030017355" />
173 230
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
174
-    <property name="GO_FMT" value="false" />
231
+    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
232
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
233
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
234
+    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
175 235
   </component>
176 236
   <component name="RecentsManager">
177 237
     <key name="CreateTestDialog.RecentsKey">
@@ -193,90 +253,113 @@
193 253
       </list>
194 254
     </option>
195 255
   </component>
196
-  <component name="RunManager">
256
+  <component name="RunManager" selected="JUnit.ArrazTest.test2averageWOMaxMin">
197 257
     <configuration default="true" type="Applet" factoryName="Applet">
198
-      <option name="WIDTH" value="400" />
199
-      <option name="HEIGHT" value="300" />
200 258
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
201
-      <module />
259
+      <method v="2">
260
+        <option name="Make" enabled="true" />
261
+      </method>
202 262
     </configuration>
203 263
     <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 264
       <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 />
265
+      <method v="2">
266
+        <option name="Make" enabled="true" />
267
+      </method>
216 268
     </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" />
269
+    <configuration name="ArrazTest.test1averageWOMaxMin" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
270
+      <module name="arraz" />
271
+      <option name="PACKAGE_NAME" value="" />
272
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
273
+      <option name="METHOD_NAME" value="test1averageWOMaxMin" />
274
+      <option name="TEST_OBJECT" value="method" />
275
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
276
+      <method v="2">
277
+        <option name="Make" enabled="true" />
278
+      </method>
279
+    </configuration>
280
+    <configuration name="ArrazTest.test1check2ArraysEqual" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
281
+      <module name="arraz" />
282
+      <option name="PACKAGE_NAME" value="" />
283
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
284
+      <option name="METHOD_NAME" value="test1check2ArraysEqual" />
285
+      <option name="TEST_OBJECT" value="method" />
286
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
287
+      <method v="2">
288
+        <option name="Make" enabled="true" />
289
+      </method>
290
+    </configuration>
291
+    <configuration name="ArrazTest.test2ArrayFromList" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
292
+      <module name="arraz" />
293
+      <option name="PACKAGE_NAME" value="" />
294
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
295
+      <option name="METHOD_NAME" value="test2ArrayFromList" />
296
+      <option name="TEST_OBJECT" value="method" />
297
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
298
+      <method v="2">
299
+        <option name="Make" enabled="true" />
300
+      </method>
301
+    </configuration>
302
+    <configuration name="ArrazTest.test2averageWOMaxMin" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
303
+      <module name="arraz" />
304
+      <option name="PACKAGE_NAME" value="" />
305
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
306
+      <option name="METHOD_NAME" value="test2averageWOMaxMin" />
307
+      <option name="TEST_OBJECT" value="method" />
228 308
       <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 />
309
+      <method v="2">
310
+        <option name="Make" enabled="true" />
311
+      </method>
236 312
     </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" />
313
+    <configuration name="ArrazTest.test2check2ArraysEqual" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
314
+      <module name="arraz" />
315
+      <option name="PACKAGE_NAME" value="" />
316
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
317
+      <option name="METHOD_NAME" value="test2check2ArraysEqual" />
318
+      <option name="TEST_OBJECT" value="method" />
319
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
320
+      <method v="2">
321
+        <option name="Make" enabled="true" />
322
+      </method>
323
+    </configuration>
324
+    <configuration default="true" type="JUnit" factoryName="JUnit">
325
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
326
+      <method v="2">
327
+        <option name="Make" enabled="true" />
328
+      </method>
243 329
     </configuration>
244 330
     <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 331
       <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 332
       <properties />
269 333
       <listeners />
334
+      <method v="2">
335
+        <option name="Make" enabled="true" />
336
+      </method>
270 337
     </configuration>
271 338
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
272 339
       <module name="" />
273 340
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
274 341
       <option name="PROGRAM_PARAMETERS" />
275 342
       <predefined_log_file id="idea.log" enabled="true" />
343
+      <method v="2">
344
+        <option name="Make" enabled="true" />
345
+      </method>
276 346
     </configuration>
277
-  </component>
278
-  <component name="ShelveChangesManager" show_recycled="false">
279
-    <option name="remove_strategy" value="false" />
347
+    <list>
348
+      <item itemvalue="JUnit.ArrazTest.test2ArrayFromList" />
349
+      <item itemvalue="JUnit.ArrazTest.test1check2ArraysEqual" />
350
+      <item itemvalue="JUnit.ArrazTest.test2check2ArraysEqual" />
351
+      <item itemvalue="JUnit.ArrazTest.test1averageWOMaxMin" />
352
+      <item itemvalue="JUnit.ArrazTest.test2averageWOMaxMin" />
353
+    </list>
354
+    <recent_temporary>
355
+      <list>
356
+        <item itemvalue="JUnit.ArrazTest.test2averageWOMaxMin" />
357
+        <item itemvalue="JUnit.ArrazTest.test1averageWOMaxMin" />
358
+        <item itemvalue="JUnit.ArrazTest.test2check2ArraysEqual" />
359
+        <item itemvalue="JUnit.ArrazTest.test1check2ArraysEqual" />
360
+        <item itemvalue="JUnit.ArrazTest.test2ArrayFromList" />
361
+      </list>
362
+    </recent_temporary>
280 363
   </component>
281 364
   <component name="SvnConfiguration">
282 365
     <configuration />
@@ -291,6 +374,7 @@
291 374
       <workItem from="1543955862749" duration="2347000" />
292 375
       <workItem from="1543958998826" duration="113000" />
293 376
       <workItem from="1544020724645" duration="762000" />
377
+      <workItem from="1544021986078" duration="7134000" />
294 378
     </task>
295 379
     <task id="LOCAL-00001" summary="readme and docs">
296 380
       <created>1544021313039</created>
@@ -302,39 +386,73 @@
302 386
     <option name="localTasksCounter" value="2" />
303 387
     <servers />
304 388
   </component>
389
+  <component name="TestHistory">
390
+    <history-entry file="ArrazTest_test1removeDups - 2018.12.05 at 11h 50m 29s.xml">
391
+      <configuration name="ArrazTest.test1removeDups" configurationId="JUnit" />
392
+    </history-entry>
393
+    <history-entry file="ArrazTest_test2removeDups - 2018.12.05 at 11h 50m 32s.xml">
394
+      <configuration name="ArrazTest.test2removeDups" configurationId="JUnit" />
395
+    </history-entry>
396
+    <history-entry file="ArrazTest_test1find2ndLargest - 2018.12.05 at 11h 54m 08s.xml">
397
+      <configuration name="ArrazTest.test1find2ndLargest" configurationId="JUnit" />
398
+    </history-entry>
399
+    <history-entry file="ArrazTest_test2find2ndLargest - 2018.12.05 at 11h 54m 12s.xml">
400
+      <configuration name="ArrazTest.test2find2ndLargest" configurationId="JUnit" />
401
+    </history-entry>
402
+    <history-entry file="ArrazTest_test1listFromArray - 2018.12.05 at 11h 57m 18s.xml">
403
+      <configuration name="ArrazTest.test1listFromArray" configurationId="JUnit" />
404
+    </history-entry>
405
+    <history-entry file="ArrazTest_test2ListFromArray - 2018.12.05 at 11h 57m 20s.xml">
406
+      <configuration name="ArrazTest.test2ListFromArray" configurationId="JUnit" />
407
+    </history-entry>
408
+    <history-entry file="ArrazTest_test1ArrayFromList - 2018.12.05 at 12h 00m 53s.xml">
409
+      <configuration name="ArrazTest.test1ArrayFromList" configurationId="JUnit" />
410
+    </history-entry>
411
+    <history-entry file="ArrazTest_test2ArrayFromList - 2018.12.05 at 12h 00m 57s.xml">
412
+      <configuration name="ArrazTest.test2ArrayFromList" configurationId="JUnit" />
413
+    </history-entry>
414
+    <history-entry file="ArrazTest_test1check2ArraysEqual - 2018.12.05 at 12h 05m 49s.xml">
415
+      <configuration name="ArrazTest.test1check2ArraysEqual" configurationId="JUnit" />
416
+    </history-entry>
417
+    <history-entry file="ArrazTest_test2check2ArraysEqual - 2018.12.05 at 12h 05m 52s.xml">
418
+      <configuration name="ArrazTest.test2check2ArraysEqual" configurationId="JUnit" />
419
+    </history-entry>
420
+  </component>
305 421
   <component name="TimeTrackingManager">
306
-    <option name="totallyTimeSpent" value="3222000" />
422
+    <option name="totallyTimeSpent" value="10356000" />
307 423
   </component>
308 424
   <component name="ToolWindowManager">
309
-    <frame x="242" y="45" width="1538" height="962" extended-state="0" />
425
+    <frame x="-209" y="-1057" width="1517" height="959" extended-state="0" />
310 426
     <editor active="true" />
311 427
     <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" />
428
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.13762712" />
429
+      <window_info id="Structure" order="1" weight="0.25" />
430
+      <window_info id="Image Layers" order="2" />
431
+      <window_info id="Designer" order="3" />
432
+      <window_info id="UI Designer" order="4" />
433
+      <window_info id="Capture Tool" order="5" />
434
+      <window_info id="Favorites" order="6" side_tool="true" />
435
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
436
+      <window_info anchor="bottom" id="Messages" weight="0.32871974" />
437
+      <window_info anchor="bottom" id="Message" order="0" />
438
+      <window_info anchor="bottom" id="Find" order="1" />
439
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3252595" />
440
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
441
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
442
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
443
+      <window_info anchor="bottom" id="TODO" order="6" />
444
+      <window_info anchor="bottom" id="Terminal" order="7" />
445
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
446
+      <window_info anchor="bottom" id="Version Control" order="9" />
447
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
448
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
449
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
450
+      <window_info anchor="right" id="Palette" order="3" />
451
+      <window_info anchor="right" id="Capture Analysis" order="4" />
452
+      <window_info anchor="right" id="Theme Preview" order="5" />
453
+      <window_info anchor="right" id="Database" order="6" />
454
+      <window_info anchor="right" id="Palette&#9;" order="7" />
455
+      <window_info anchor="right" id="Maven Projects" order="8" />
338 456
     </layout>
339 457
   </component>
340 458
   <component name="TypeScriptGeneratedFilesManager">
@@ -347,113 +465,69 @@
347 465
     <MESSAGE value="readme and docs" />
348 466
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
349 467
   </component>
350
-  <component name="XDebuggerManager">
351
-    <breakpoint-manager />
352
-    <watches-manager />
353
-  </component>
354 468
   <component name="editorHistoryManager">
355 469
     <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>
362
-    </entry>
363
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
364
-      <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 />
368
-        </state>
369
-      </provider>
370
-    </entry>
371
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
372
-      <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 />
376
-        </state>
377
-      </provider>
470
+      <provider selected="true" editor-type-id="text-editor" />
378 471
     </entry>
379 472
     <entry file="file://$PROJECT_DIR$/README.md">
380 473
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
381
-        <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 />
474
+        <state split_layout="SECOND">
475
+          <first_editor relative-caret-position="270">
476
+            <caret line="18" selection-start-line="18" selection-end-line="18" />
385 477
           </first_editor>
386 478
           <second_editor />
387 479
         </state>
388 480
       </provider>
389 481
     </entry>
390
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
482
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
391 483
       <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 />
484
+        <state relative-caret-position="405">
485
+          <caret line="37" column="5" lean-forward="true" selection-start-line="30" selection-start-column="4" selection-end-line="37" selection-end-column="5" />
395 486
         </state>
396 487
       </provider>
397 488
     </entry>
398
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
489
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
399 490
       <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 />
403
-        </state>
404
-      </provider>
405
-    </entry>
406
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
407
-      <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 />
491
+        <state relative-caret-position="493">
492
+          <caret line="34" column="20" lean-forward="true" selection-start-line="34" selection-start-column="20" selection-end-line="34" selection-end-column="20" />
493
+          <folding>
494
+            <element signature="e#208#209#0" expanded="true" />
495
+            <element signature="e#234#235#0" expanded="true" />
496
+            <element signature="e#269#270#0" expanded="true" />
497
+            <element signature="e#299#300#0" expanded="true" />
498
+            <element signature="e#326#327#0" expanded="true" />
499
+            <element signature="e#352#353#0" expanded="true" />
500
+            <element signature="e#387#388#0" expanded="true" />
501
+            <element signature="e#417#418#0" expanded="true" />
502
+          </folding>
430 503
         </state>
431 504
       </provider>
432 505
     </entry>
433 506
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
434 507
       <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 />
508
+        <state relative-caret-position="459">
509
+          <caret line="216" column="40" selection-start-line="216" selection-start-column="40" selection-end-line="216" selection-end-column="40" />
510
+          <folding>
511
+            <element signature="e#415#416#0" expanded="true" />
512
+            <element signature="e#475#476#0" expanded="true" />
513
+            <element signature="e#541#542#0" expanded="true" />
514
+            <element signature="e#602#603#0" expanded="true" />
515
+            <element signature="e#4244#4253#0" expanded="true" />
516
+          </folding>
438 517
         </state>
439 518
       </provider>
440 519
     </entry>
441 520
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
442 521
       <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 />
522
+        <state relative-caret-position="373">
523
+          <caret line="413" column="31" lean-forward="true" selection-start-line="413" selection-start-column="31" selection-end-line="413" selection-end-column="31" />
524
+          <folding>
525
+            <element signature="imports" expanded="true" />
526
+            <element signature="e#8652#8661#0" expanded="true" />
527
+            <element signature="e#9032#9041#0" expanded="true" />
528
+            <element signature="e#9376#9385#0" expanded="true" />
529
+            <element signature="e#9720#9729#0" expanded="true" />
530
+          </folding>
457 531
         </state>
458 532
       </provider>
459 533
     </entry>

+ 217
- 0
arraz/src/main/java/Arraz.java Прегледај датотеку

@@ -1,2 +1,219 @@
1
+import java.util.*;
2
+
1 3
 public class Arraz {
4
+
5
+    public static int sumValuesOfArray(int[] input) {
6
+
7
+        int sum = 0;
8
+
9
+        for(int i : input) {
10
+            sum += i;
11
+        }
12
+        return sum;
13
+    }
14
+
15
+    public static double sumDoublesOfArray(double[] input) {
16
+
17
+        double sum = 0;
18
+
19
+        for(double d : input) {
20
+            sum += d;
21
+        }
22
+        return sum;
23
+    }
24
+
25
+    public static int averageOfArray(int[] input) {
26
+        return sumValuesOfArray(input) / input.length;
27
+    }
28
+
29
+    public static double doubleAverageOfArray(double[] input) {
30
+        return sumDoublesOfArray(input) / input.length;
31
+    }
32
+
33
+    public static boolean containsValue(int[] input, int numb) {
34
+
35
+        for(int i: input) {
36
+            if(i == numb)
37
+            return true;
38
+        }
39
+        return false;
40
+    }
41
+
42
+    public static int[] reverseArray(int[] input) {
43
+
44
+        int[] output = new int[input.length];
45
+        int index = 0;
46
+
47
+        for(int i = input.length - 1; i >= 0; i--) {
48
+            output[index] = input[i];
49
+            index++;
50
+        }
51
+        return output;
52
+    }
53
+
54
+
55
+    public static OddEven getOddEvensOfArray(int[] input) {
56
+        int odds = 0;
57
+        int evens = 0;
58
+
59
+        for(int i: input) {
60
+            if(i % 2 == 0) {
61
+                evens++;
62
+            } else {
63
+                odds++;
64
+            }
65
+        }
66
+        return new OddEven(odds, evens);
67
+    }
68
+
69
+    public static int findIndexOf(int[] input, int numb) {
70
+
71
+        for (int i = 0; i < input.length; i++) {
72
+            if(input[i] == numb)
73
+                return i;
74
+        }
75
+        return -1;
76
+    }
77
+
78
+    public static Integer[] copyArrayByIterator(Integer[] input) {
79
+
80
+        Iterator<Integer> it = Arrays.asList(input).iterator();
81
+        Integer[] output = new Integer[input.length];
82
+        int index = 0;
83
+
84
+        while(it.hasNext()) {
85
+            output[index] = it.next();
86
+            index++;
87
+        }
88
+        return output;
89
+    }
90
+
91
+    public static int[] copyArrayByLoop(int[] input) {
92
+
93
+        int[] output = new int[input.length];
94
+
95
+        for (int i = 0; i < input.length; i++) {
96
+            output[i] = input[i];
97
+        }
98
+
99
+        return output;
100
+    }
101
+
102
+    public static int[] copyArraySetLength(int[] input, int length) {
103
+
104
+        int[] output = new int[length];
105
+
106
+        for (int i = 0; i < length; i++) {
107
+            output[i] = input[i];
108
+        }
109
+
110
+        return output;
111
+    }
112
+
113
+    public static int[] removeElementFromArray(int[] input, int numb) {
114
+
115
+        int[] output = new int[input.length - 1];
116
+        int index = 0;
117
+        for(int i: input) {
118
+            if(i != numb) {
119
+                output[index] = i;
120
+                index++;
121
+            }
122
+        }
123
+        return output;
124
+    }
125
+
126
+    public static int[] insertIntoArrayAt(int[] input, int numb, int index) {
127
+
128
+        if(index > input.length) {
129
+            throw new IndexOutOfBoundsException();
130
+        }
131
+
132
+        int[] output = new int[input.length + 1];
133
+
134
+        for (int i = 0; i < output.length; i++) {
135
+            if(i < index) {
136
+                output[i] = input[i];
137
+            } else if(i == index) {
138
+                output[i] = numb;
139
+            } else {
140
+                output[i] = input[i - 1];
141
+            }
142
+        }
143
+        return output;
144
+    }
145
+
146
+    public static MaxMin findMaxMinOfArray(int[] input) {
147
+        int max = input[0];
148
+        int min = input[0];
149
+
150
+        for(int i: input) {
151
+            if(i > max)
152
+                max = i;
153
+            if(i < min)
154
+                min = i;
155
+        }
156
+        return new MaxMin(max, min);
157
+    }
158
+
159
+    public static int[] removeDupesFromArray(int[] input) {
160
+        int[] output = new int[input.length];
161
+        int index = 0;
162
+        for(int i: input) {
163
+            if(!containsValue(output, i)) {
164
+                output[index] = i;
165
+                index++;
166
+            }
167
+        }
168
+        return copyArraySetLength(output, index);
169
+    }
170
+
171
+    public static int find2ndLargestValueFromArray(int[] input) {
172
+        int max = findMaxMinOfArray(input).getMax();
173
+        int[] newArr = removeElementFromArray(input, max);
174
+        return findMaxMinOfArray(newArr).getMax();
175
+    }
176
+
177
+
178
+    public static ArrayList<Integer> makeMeAnArrayListFromArray(int[] input) {
179
+
180
+        ArrayList<Integer> list = new ArrayList<Integer>();
181
+
182
+        for(int i: input){
183
+            list.add(i);
184
+        }
185
+        return list;
186
+
187
+    }
188
+
189
+    public static int[] makeMeAnArrayFromArrayList(ArrayList<Integer> input) {
190
+
191
+        int[] array = new int[input.size()];
192
+        int index = 0;
193
+
194
+        for(Integer i: input) {
195
+            array[index] = i;
196
+            index++;
197
+        }
198
+        return array;
199
+    }
200
+
201
+
202
+    public static boolean check2ArraysForEqual(int[] input1, int[] input2) {
203
+
204
+        for (int i = 0; i < input1.length; i++) {
205
+            if(input1[i] != input2[i]) {
206
+                return false;
207
+            }
208
+        }
209
+        return true;
210
+    }
211
+
212
+    public static int averageArrayWithoutMaxMin(int[] input) {
213
+        int max = findMaxMinOfArray(input).getMax();
214
+        int[] noMax = removeElementFromArray(input, max);
215
+        int min = findMaxMinOfArray(noMax).getMin();
216
+        int[] noMaxMin = removeElementFromArray(noMax, min);
217
+        return averageOfArray(noMaxMin);
218
+    }
2 219
 }

+ 37
- 0
arraz/src/main/java/MaxMin.java Прегледај датотеку

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

+ 39
- 0
arraz/src/main/java/OddEven.java Прегледај датотеку

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

+ 414
- 0
arraz/src/test/java/ArrazTest.java Прегледај датотеку

@@ -1,5 +1,419 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import java.util.ArrayList;
5
+import java.util.Arrays;
6
+
1 7
 import static org.junit.Assert.*;
2 8
 
3 9
 public class ArrazTest {
4 10
 
11
+    @Test
12
+    public void test1SumValuesOfArray() {
13
+        int[] input = {3, 4, 9, 2, 1};
14
+        int expected = 19;
15
+        int actual = Arraz.sumValuesOfArray(input);
16
+
17
+        assertEquals(expected, actual);
18
+    }
19
+
20
+    @Test
21
+    public void test2SumValuesOfArray() {
22
+        int[] input = {8};
23
+        int expected = 8;
24
+        int actual = Arraz.sumValuesOfArray(input);
25
+
26
+        assertEquals(expected, actual);
27
+    }
28
+
29
+    @Test
30
+    public void test3SumValuesOfArray() {
31
+        int[] input = {6, 5, -3, -2, -6};
32
+        int expected = 0;
33
+        int actual = Arraz.sumValuesOfArray(input);
34
+
35
+        assertEquals(expected, actual);
36
+    }
37
+
38
+    @Test
39
+    public void test1SumDoublesOfArray() {
40
+        double[] input = {3.2, 4.55, 9.0, 2.34, 1.7};
41
+        double expected = 20.79;
42
+        double actual = Arraz.sumDoublesOfArray(input);
43
+
44
+        Assert.assertEquals(expected, actual, 0.01);
45
+    }
46
+
47
+    @Test
48
+    public void test2SumDoublesOfArray() {
49
+        double[] input = {5.24789};
50
+        double expected = 5.24789;
51
+        double actual = Arraz.sumDoublesOfArray(input);
52
+
53
+        Assert.assertEquals(expected, actual, 0.01);
54
+    }
55
+
56
+    @Test
57
+    public void test1AverageOfArray() {
58
+        int[] input = {3, 4, 9, 3, 1};
59
+        int expected = 4;
60
+        int actual = Arraz.averageOfArray(input);
61
+
62
+        assertEquals(expected, actual);
63
+    }
64
+
65
+    @Test
66
+    public void test2AverageOfArray() {
67
+        int[] input = {8};
68
+        int expected = 8;
69
+        int actual = Arraz.averageOfArray(input);
70
+
71
+        assertEquals(expected, actual);
72
+    }
73
+
74
+    @Test
75
+    public void test3AverageOfArray() {
76
+        int[] input = {6, 5, -3, -2, -6};
77
+        int expected = 0;
78
+        int actual = Arraz.averageOfArray(input);
79
+
80
+        assertEquals(expected, actual);
81
+    }
82
+
83
+    @Test
84
+    public void test4AverageOfArray() {
85
+        int[] input = {3, 4, 9, 3, 1, 8};
86
+        int expected = 4;
87
+        int actual = Arraz.averageOfArray(input);
88
+
89
+        assertEquals(expected, actual);
90
+    }
91
+
92
+    @Test
93
+    public void test1AverageDoublesOfArray() {
94
+        double[] input = {3.2, 4.55, 9.0, 2.34, 1.7};
95
+        double expected = 4.158;
96
+        double actual = Arraz.doubleAverageOfArray(input);
97
+
98
+        Assert.assertEquals(expected, actual, 0.01);
99
+    }
100
+
101
+    @Test
102
+    public void test2AverageDoublesOfArray() {
103
+        double[] input = {5.24789};
104
+        double expected = 5.24789;
105
+        double actual = Arraz.sumDoublesOfArray(input);
106
+
107
+        Assert.assertEquals(expected, actual, 0.01);
108
+    }
109
+
110
+    @Test
111
+    public void test3AverageDoublesOfArray() {
112
+        double[] input = {3.2, 4.55, 9.0, 2.34, 1.7, 3.3};
113
+        double expected = 4.015;
114
+        double actual = Arraz.doubleAverageOfArray(input);
115
+
116
+        Assert.assertEquals(expected, actual, 0.01);
117
+    }
118
+
119
+    @Test
120
+    public void test1ContainsValue() {
121
+        int[] input = {3, 4, 9, 2, 1};
122
+        int numb = 9;
123
+
124
+        assertTrue(Arraz.containsValue(input, numb));
125
+    }
126
+
127
+    @Test
128
+    public void test2ContainsValue() {
129
+        int[] input = {3, 4, 9, 2, 1};
130
+        int numb = 11;
131
+
132
+        assertFalse(Arraz.containsValue(input, numb));
133
+    }
134
+
135
+    @Test
136
+    public void test1ReverseArray() {
137
+        int[] input = {3, 4, 9, 2, 1};
138
+        int[] expected = {1, 2, 9, 4, 3};
139
+        int[] actual = Arraz.reverseArray(input);
140
+
141
+        assertTrue(Arrays.equals(expected, actual));
142
+    }
143
+
144
+    @Test
145
+    public void test2ReverseArray() {
146
+        int[] input = {8, 2};
147
+        int[] expected = {2, 8};
148
+        int[] actual = Arraz.reverseArray(input);
149
+
150
+        assertTrue(Arrays.equals(expected, actual));
151
+    }
152
+
153
+    @Test
154
+    public void test1getOddEvens() {
155
+        int[] input = {3, 4, 9, 2, 1};
156
+        OddEven expected = new OddEven(3, 2);
157
+        OddEven actual = Arraz.getOddEvensOfArray(input);
158
+
159
+        assertEquals(expected, actual);
160
+    }
161
+
162
+    @Test
163
+    public void test2getOddEvens() {
164
+        int[] input = {8, 2};
165
+        OddEven expected = new OddEven(0, 2);
166
+        OddEven actual = Arraz.getOddEvensOfArray(input);
167
+
168
+        assertEquals(expected, actual);
169
+    }
170
+
171
+    @Test
172
+    public void test1findIndexOf() {
173
+        int[] input = {3, 4, 9, 2, 1};
174
+        int numb = 2;
175
+        int expected = 3;
176
+        int actual = Arraz.findIndexOf(input, numb);
177
+
178
+        assertEquals(expected, actual);
179
+    }
180
+
181
+    @Test
182
+    public void test2findIndexOf() {
183
+        int[] input = {8, 2};
184
+        int numb = 5;
185
+        int expected = -1;
186
+        int actual = Arraz.findIndexOf(input, numb);
187
+
188
+        assertEquals(expected, actual);
189
+    }
190
+
191
+    @Test
192
+    public void test1copyArrayIterator() {
193
+        Integer[] input = {3, 4, 9, 2, 1};
194
+        Integer[] actual = Arraz.copyArrayByIterator(input);
195
+
196
+        assertTrue(Arrays.equals(input, actual));
197
+    }
198
+
199
+    @Test
200
+    public void test2copyArrayIterator() {
201
+        Integer[] input = {8, 2};
202
+        Integer[] actual = Arraz.copyArrayByIterator(input);
203
+
204
+        assertTrue(Arrays.equals(input, actual));
205
+    }
206
+
207
+    @Test
208
+    public void test1copyArrayLoop() {
209
+        int[] input = {3, 4, 9, 2, 1};
210
+        int[] actual = Arraz.copyArrayByLoop(input);
211
+
212
+        assertTrue(Arrays.equals(input, actual));
213
+    }
214
+
215
+    @Test
216
+    public void test2copyArrayLoop() {
217
+        int[] input = {8, 2};
218
+        int[] actual = Arraz.copyArrayByLoop(input);
219
+
220
+        assertTrue(Arrays.equals(input, actual));
221
+    }
222
+
223
+    @Test
224
+    public void test1removeElement() {
225
+        int[] input = {3, 4, 9, 2, 1};
226
+        int numb = 2;
227
+        int[] output = Arraz.removeElementFromArray(input, numb);
228
+
229
+        assertFalse(Arraz.containsValue(output, numb));
230
+    }
231
+
232
+    @Test
233
+    public void test2removeElement() {
234
+        int[] input = {8, 2};
235
+        int numb = 2;
236
+        int[] output = Arraz.removeElementFromArray(input, numb);
237
+
238
+        assertFalse(Arraz.containsValue(output, numb));
239
+    }
240
+
241
+    @Test
242
+    public void test1insertIntoArrayAt() {
243
+        int[] input = {3, 4, 9, 2, 1};
244
+        int numb = 7;
245
+        int index = 4;
246
+        int[] output = Arraz.insertIntoArrayAt(input, numb, index);
247
+        int actual = Arraz.findIndexOf(output, numb);
248
+
249
+        assertEquals(index, actual);
250
+    }
251
+
252
+    @Test
253
+    public void test2insertIntoArrayAt() {
254
+        int[] input = {8, 2};
255
+        int numb = 7;
256
+        int index = 0;
257
+        int[] output = Arraz.insertIntoArrayAt(input, numb, index);
258
+        int actual = Arraz.findIndexOf(output, numb);
259
+
260
+        assertEquals(index, actual);
261
+    }
262
+
263
+    @Test
264
+    public void test3insertIntoArrayAt() {
265
+        int[] input = {8, 2};
266
+        int numb = 7;
267
+        int index = 2;
268
+        int[] output = Arraz.insertIntoArrayAt(input, numb, index);
269
+        int actual = Arraz.findIndexOf(output, numb);
270
+
271
+        assertEquals(index, actual);
272
+    }
273
+
274
+    @Test(expected = IndexOutOfBoundsException.class)
275
+    public void test4insertIntoArrayAt() {
276
+        int[] input = {8, 2};
277
+        int numb = 7;
278
+        int index = 10;
279
+        int[] output = Arraz.insertIntoArrayAt(input, numb, index);
280
+    }
281
+
282
+    @Test
283
+    public void test1findMaxMin() {
284
+        int[] input = {3, 4, 9, 2, 1};
285
+        MaxMin expected = new MaxMin(9, 1);
286
+        MaxMin actual = Arraz.findMaxMinOfArray(input);
287
+
288
+        assertEquals(expected, actual);
289
+    }
290
+
291
+    @Test
292
+    public void test2findMaxMin() {
293
+        int[] input = {8, 2};
294
+        MaxMin expected = new MaxMin(8, 2);
295
+        MaxMin actual = Arraz.findMaxMinOfArray(input);
296
+
297
+        assertEquals(expected, actual);
298
+    }
299
+
300
+    @Test
301
+    public void test1removeDups() {
302
+        int[] input = {3, 4, 9, 2, 1, 3, 9, 3};
303
+        int[] expected = {3, 4, 9, 2, 1};
304
+        int[] actual = Arraz.removeDupesFromArray(input);
305
+
306
+        assertTrue(Arrays.equals(expected, actual));
307
+    }
308
+
309
+    @Test
310
+    public void test2removeDups() {
311
+        int[] input = {8, 2, 8, 8, 8, 8, 8, 8, 1};
312
+        int[] expected = {8, 2, 1};
313
+        int[] actual = Arraz.removeDupesFromArray(input);
314
+
315
+        assertTrue(Arrays.equals(expected, actual));
316
+    }
317
+
318
+    @Test
319
+    public void test1find2ndLargest() {
320
+        int[] input = {3, 4, 9, 2, 1};
321
+        int expected = 4;
322
+        int actual = Arraz.find2ndLargestValueFromArray(input);
323
+
324
+        assertEquals(expected, actual);
325
+    }
326
+
327
+    @Test
328
+    public void test2find2ndLargest() {
329
+        int[] input = {8, 2, 3, 5, 7, 1, 9};
330
+        int expected = 8;
331
+        int actual = Arraz.find2ndLargestValueFromArray(input);
332
+
333
+        assertEquals(expected, actual);
334
+    }
335
+
336
+    @Test
337
+    public void test1listFromArray() {
338
+        int[] input = {3, 4, 9, 2, 1};
339
+        ArrayList<Integer> expected = new ArrayList<Integer>();
340
+        expected.add(3);
341
+        expected.add(4);
342
+        expected.add(9);
343
+        expected.add(2);
344
+        expected.add(1);
345
+        ArrayList<Integer> actual = Arraz.makeMeAnArrayListFromArray(input);
346
+
347
+        assertEquals(expected, actual);
348
+    }
349
+
350
+    @Test
351
+    public void test2ListFromArray() {
352
+        int[] input = {8, 2};
353
+        ArrayList<Integer> expected = new ArrayList<Integer>();
354
+        expected.add(8);
355
+        expected.add(2);
356
+        ArrayList<Integer> actual = Arraz.makeMeAnArrayListFromArray(input);
357
+
358
+        assertEquals(expected, actual);
359
+    }
360
+
361
+    @Test
362
+    public void test1ArrayFromList() {
363
+        ArrayList<Integer> input = new ArrayList<Integer>();
364
+        input.add(3);
365
+        input.add(4);
366
+        input.add(9);
367
+        input.add(2);
368
+        input.add(1);
369
+        int[] expected = {3, 4, 9, 2, 1};
370
+        int[] actual = Arraz.makeMeAnArrayFromArrayList(input);
371
+
372
+        assertTrue(Arrays.equals(expected, actual));
373
+    }
374
+
375
+    @Test
376
+    public void test2ArrayFromList() {
377
+        ArrayList<Integer> input = new ArrayList<Integer>();
378
+        input.add(8);
379
+        input.add(2);
380
+        int[] expected = {8, 2};
381
+        int[] actual = Arraz.makeMeAnArrayFromArrayList(input);
382
+
383
+        assertTrue(Arrays.equals(expected, actual));
384
+    }
385
+
386
+    @Test
387
+    public void test1check2ArraysEqual() {
388
+        int[] input = {3, 4, 9, 2, 1};
389
+
390
+        assertTrue(Arraz.check2ArraysForEqual(input, input));
391
+    }
392
+
393
+    @Test
394
+    public void test2check2ArraysEqual() {
395
+        int[] input1 = {8, 2, 3, 5, 7, 1, 9};
396
+        int[] input2 = {3, 4, 9, 2, 1};
397
+
398
+        assertFalse(Arraz.check2ArraysForEqual(input1, input2));
399
+    }
400
+
401
+    @Test
402
+    public void test1averageWOMaxMin() {
403
+        int[] input = {3, 4, 9, 2, 1};
404
+        int expected = 3;
405
+        int actual = Arraz.averageArrayWithoutMaxMin(input);
406
+
407
+        assertEquals(expected, actual);
408
+    }
409
+
410
+    @Test
411
+    public void test2averageWOMaxMin() {
412
+        int[] input = {8, 2, 3, 5, 7, 1, 9};
413
+        int expected = 5;
414
+        int actual = Arraz.averageArrayWithoutMaxMin(input);
415
+
416
+        assertEquals(expected, actual);
417
+    }
418
+
5 419
 }