Seth před 6 roky
rodič
revize
208b5cada7
3 změnil soubory, kde provedl 170 přidání a 93 odebrání
  1. 118
    87
      .idea/workspace.xml
  2. 18
    2
      arraz/src/main/java/Arraz.java
  3. 34
    4
      arraz/src/test/java/ArrazTest.java

+ 118
- 87
.idea/workspace.xml Zobrazit soubor

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
6
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
6
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7
     </list>
8
     </list>
22
       </usages-collector>
23
       </usages-collector>
23
       <usages-collector id="statistics.file.types.edit">
24
       <usages-collector id="statistics.file.types.edit">
24
         <counts>
25
         <counts>
25
-          <entry key="JAVA" value="9498" />
26
+          <entry key="JAVA" value="11042" />
26
           <entry key="XML" value="3" />
27
           <entry key="XML" value="3" />
27
         </counts>
28
         </counts>
28
       </usages-collector>
29
       </usages-collector>
29
       <usages-collector id="statistics.file.types.open">
30
       <usages-collector id="statistics.file.types.open">
30
         <counts>
31
         <counts>
31
           <entry key="CLASS" value="1" />
32
           <entry key="CLASS" value="1" />
32
-          <entry key="JAVA" value="4" />
33
+          <entry key="JAVA" value="5" />
33
           <entry key="XML" value="3" />
34
           <entry key="XML" value="3" />
34
         </counts>
35
         </counts>
35
       </usages-collector>
36
       </usages-collector>
38
   <component name="FileEditorManager">
39
   <component name="FileEditorManager">
39
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
40
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
40
       <file pinned="false" current-in-tab="false">
41
       <file pinned="false" current-in-tab="false">
41
-        <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
42
-          <provider selected="true" editor-type-id="text-editor">
43
-            <state relative-caret-position="358">
44
-              <caret line="323" selection-start-line="323" selection-end-line="323" />
45
-              <folding>
46
-                <element signature="imports" expanded="true" />
47
-                <element signature="e#4388#4389#0" expanded="true" />
48
-                <element signature="e#4411#4412#0" expanded="true" />
49
-              </folding>
42
+        <entry file="file://$PROJECT_DIR$/README.md">
43
+          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
44
+            <state split_layout="SPLIT">
45
+              <first_editor relative-caret-position="306">
46
+                <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
47
+              </first_editor>
48
+              <second_editor />
50
             </state>
49
             </state>
51
           </provider>
50
           </provider>
52
         </entry>
51
         </entry>
53
       </file>
52
       </file>
54
-      <file pinned="false" current-in-tab="false">
53
+      <file pinned="false" current-in-tab="true">
55
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
54
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
56
           <provider selected="true" editor-type-id="text-editor">
55
           <provider selected="true" editor-type-id="text-editor">
57
-            <state relative-caret-position="319">
58
-              <caret line="141" column="45" selection-start-line="141" selection-start-column="45" selection-end-line="141" selection-end-column="45" />
56
+            <state relative-caret-position="285">
57
+              <caret line="130" column="19" selection-start-line="130" selection-start-column="19" selection-end-line="130" selection-end-column="19" />
59
               <folding>
58
               <folding>
60
-                <element signature="e#3351#3352#0" expanded="true" />
61
-                <element signature="e#3376#3377#0" expanded="true" />
62
                 <element signature="e#3440#3441#0" expanded="true" />
59
                 <element signature="e#3440#3441#0" expanded="true" />
63
                 <element signature="e#3482#3483#0" expanded="true" />
60
                 <element signature="e#3482#3483#0" expanded="true" />
64
                 <element signature="e#3556#3557#0" expanded="true" />
61
                 <element signature="e#3556#3557#0" expanded="true" />
70
           </provider>
67
           </provider>
71
         </entry>
68
         </entry>
72
       </file>
69
       </file>
73
-      <file pinned="false" current-in-tab="true">
74
-        <entry file="file://$PROJECT_DIR$/README.md">
75
-          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
76
-            <state split_layout="SPLIT">
77
-              <first_editor relative-caret-position="306">
78
-                <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
79
-              </first_editor>
80
-              <second_editor />
70
+      <file pinned="false" current-in-tab="false">
71
+        <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
72
+          <provider selected="true" editor-type-id="text-editor">
73
+            <state relative-caret-position="253">
74
+              <caret line="256" column="72" selection-start-line="256" selection-start-column="72" selection-end-line="256" selection-end-column="72" />
75
+              <folding>
76
+                <element signature="imports" expanded="true" />
77
+              </folding>
81
             </state>
78
             </state>
82
           </provider>
79
           </provider>
83
         </entry>
80
         </entry>
127
       <list>
124
       <list>
128
         <option value="$PROJECT_DIR$/README.md" />
125
         <option value="$PROJECT_DIR$/README.md" />
129
         <option value="$PROJECT_DIR$/arraz/pom.xml" />
126
         <option value="$PROJECT_DIR$/arraz/pom.xml" />
130
-        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
131
         <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
127
         <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
132
-        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
128
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
133
         <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
129
         <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
130
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
134
       </list>
131
       </list>
135
     </option>
132
     </option>
136
   </component>
133
   </component>
203
             <path>
200
             <path>
204
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
201
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
205
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
202
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
203
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
204
+              <item name="src" type="462c0819:PsiDirectoryNode" />
205
+              <item name="test" type="462c0819:PsiDirectoryNode" />
206
+              <item name="java" type="462c0819:PsiDirectoryNode" />
207
+            </path>
208
+            <path>
209
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
210
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
206
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
211
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
207
             </path>
212
             </path>
208
           </expand>
213
           </expand>
215
     <property name="GO_FMT" value="false" />
220
     <property name="GO_FMT" value="false" />
216
     <property name="WebServerToolWindowFactoryState" value="false" />
221
     <property name="WebServerToolWindowFactoryState" value="false" />
217
     <property name="aspect.path.notification.shown" value="true" />
222
     <property name="aspect.path.notification.shown" value="true" />
218
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544192715898" />
223
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544205690510" />
219
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
224
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
220
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
225
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
221
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
226
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
245
       </list>
250
       </list>
246
     </option>
251
     </option>
247
   </component>
252
   </component>
248
-  <component name="RunManager" selected="JUnit.ArrazTest.testCheck2ArraysForEqual2">
253
+  <component name="RunManager" selected="JUnit.ArrazTest.testFind2ndLargestFromArray1">
249
     <configuration default="true" type="Applet" factoryName="Applet">
254
     <configuration default="true" type="Applet" factoryName="Applet">
250
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
255
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
251
       <method v="2">
256
       <method v="2">
267
         <option name="Make" enabled="true" />
272
         <option name="Make" enabled="true" />
268
       </method>
273
       </method>
269
     </configuration>
274
     </configuration>
270
-    <configuration name="ArrazTest.testCheck2ArraysForEqual1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
275
+    <configuration name="ArrazTest.testArrayHas65and771" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
271
       <module name="arraz" />
276
       <module name="arraz" />
272
       <option name="PACKAGE_NAME" value="" />
277
       <option name="PACKAGE_NAME" value="" />
273
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
278
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
274
-      <option name="METHOD_NAME" value="testCheck2ArraysForEqual1" />
279
+      <option name="METHOD_NAME" value="testArrayHas65and771" />
275
       <option name="TEST_OBJECT" value="method" />
280
       <option name="TEST_OBJECT" value="method" />
276
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
281
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
277
       <method v="2">
282
       <method v="2">
278
         <option name="Make" enabled="true" />
283
         <option name="Make" enabled="true" />
279
       </method>
284
       </method>
280
     </configuration>
285
     </configuration>
281
-    <configuration name="ArrazTest.testCheck2ArraysForEqual2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
+    <configuration name="ArrazTest.testArrayHas65and772" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
282
       <module name="arraz" />
287
       <module name="arraz" />
283
       <option name="PACKAGE_NAME" value="" />
288
       <option name="PACKAGE_NAME" value="" />
284
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
289
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
285
-      <option name="METHOD_NAME" value="testCheck2ArraysForEqual2" />
290
+      <option name="METHOD_NAME" value="testArrayHas65and772" />
286
       <option name="TEST_OBJECT" value="method" />
291
       <option name="TEST_OBJECT" value="method" />
287
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
292
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
288
       <method v="2">
293
       <method v="2">
289
         <option name="Make" enabled="true" />
294
         <option name="Make" enabled="true" />
290
       </method>
295
       </method>
291
     </configuration>
296
     </configuration>
292
-    <configuration name="ArrazTest.testMakeMeAnArrayFromArrayList2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
297
+    <configuration name="ArrazTest.testFind2ndLargestFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
293
       <module name="arraz" />
298
       <module name="arraz" />
294
       <option name="PACKAGE_NAME" value="" />
299
       <option name="PACKAGE_NAME" value="" />
295
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
300
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
296
-      <option name="METHOD_NAME" value="testMakeMeAnArrayFromArrayList2" />
301
+      <option name="METHOD_NAME" value="testFind2ndLargestFromArray1" />
297
       <option name="TEST_OBJECT" value="method" />
302
       <option name="TEST_OBJECT" value="method" />
298
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
303
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
299
       <method v="2">
304
       <method v="2">
300
         <option name="Make" enabled="true" />
305
         <option name="Make" enabled="true" />
301
       </method>
306
       </method>
302
     </configuration>
307
     </configuration>
303
-    <configuration name="ArrazTest.testMakeMeAnArrayListFromArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
308
+    <configuration name="ArrazTest.testFind2ndLargestFromArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
304
       <module name="arraz" />
309
       <module name="arraz" />
305
       <option name="PACKAGE_NAME" value="" />
310
       <option name="PACKAGE_NAME" value="" />
306
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
311
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
307
-      <option name="METHOD_NAME" value="testMakeMeAnArrayListFromArray2" />
312
+      <option name="METHOD_NAME" value="testFind2ndLargestFromArray2" />
308
       <option name="TEST_OBJECT" value="method" />
313
       <option name="TEST_OBJECT" value="method" />
309
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
314
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
310
       <method v="2">
315
       <method v="2">
335
       </method>
340
       </method>
336
     </configuration>
341
     </configuration>
337
     <list>
342
     <list>
338
-      <item itemvalue="JUnit.ArrazTest.testMakeMeAnArrayListFromArray2" />
339
       <item itemvalue="JUnit.ArrazTest" />
343
       <item itemvalue="JUnit.ArrazTest" />
340
-      <item itemvalue="JUnit.ArrazTest.testMakeMeAnArrayFromArrayList2" />
341
-      <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual1" />
342
-      <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual2" />
344
+      <item itemvalue="JUnit.ArrazTest.testArrayHas65and771" />
345
+      <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
346
+      <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
347
+      <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
343
     </list>
348
     </list>
344
     <recent_temporary>
349
     <recent_temporary>
345
       <list>
350
       <list>
346
-        <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual2" />
347
-        <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual1" />
348
-        <item itemvalue="JUnit.ArrazTest.testMakeMeAnArrayFromArrayList2" />
351
+        <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
352
+        <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
353
+        <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
354
+        <item itemvalue="JUnit.ArrazTest.testArrayHas65and771" />
349
         <item itemvalue="JUnit.ArrazTest" />
355
         <item itemvalue="JUnit.ArrazTest" />
350
-        <item itemvalue="JUnit.ArrazTest.testMakeMeAnArrayListFromArray2" />
351
       </list>
356
       </list>
352
     </recent_temporary>
357
     </recent_temporary>
353
   </component>
358
   </component>
364
       <workItem from="1543955862749" duration="2347000" />
369
       <workItem from="1543955862749" duration="2347000" />
365
       <workItem from="1543958998826" duration="113000" />
370
       <workItem from="1543958998826" duration="113000" />
366
       <workItem from="1544020724645" duration="762000" />
371
       <workItem from="1544020724645" duration="762000" />
367
-      <workItem from="1544046933389" duration="26304000" />
372
+      <workItem from="1544046933389" duration="34996000" />
368
     </task>
373
     </task>
369
     <task id="LOCAL-00001" summary="readme and docs">
374
     <task id="LOCAL-00001" summary="readme and docs">
370
       <created>1544021313039</created>
375
       <created>1544021313039</created>
377
     <servers />
382
     <servers />
378
   </component>
383
   </component>
379
   <component name="TestHistory">
384
   <component name="TestHistory">
380
-    <history-entry file="ArrazTest_testRemoveDupesFromArray1 - 2018.12.07 at 08h 15m 32s.xml">
381
-      <configuration name="ArrazTest.testRemoveDupesFromArray1" configurationId="JUnit" />
385
+    <history-entry file="ArrazTest_testArrayHas65and771 - 2018.12.07 at 10h 54m 19s.xml">
386
+      <configuration name="ArrazTest.testArrayHas65and771" configurationId="JUnit" />
382
     </history-entry>
387
     </history-entry>
383
-    <history-entry file="ArrazTest_testRemoveDupesFromArray2 - 2018.12.07 at 08h 18m 59s.xml">
384
-      <configuration name="ArrazTest.testRemoveDupesFromArray2" configurationId="JUnit" />
388
+    <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 10h 54m 23s.xml">
389
+      <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
385
     </history-entry>
390
     </history-entry>
386
-    <history-entry file="ArrazTest_testMakeMeAnArrayListFromArray1 - 2018.12.07 at 08h 40m 21s.xml">
387
-      <configuration name="ArrazTest.testMakeMeAnArrayListFromArray1" configurationId="JUnit" />
391
+    <history-entry file="ArrazTest_testAverageArrayWithoutMaxMin2 - 2018.12.07 at 12h 43m 07s.xml">
392
+      <configuration name="ArrazTest.testAverageArrayWithoutMaxMin2" configurationId="JUnit" />
388
     </history-entry>
393
     </history-entry>
389
-    <history-entry file="ArrazTest_testMakeMeAnArrayListFromArray2 - 2018.12.07 at 08h 40m 23s.xml">
390
-      <configuration name="ArrazTest.testMakeMeAnArrayListFromArray2" configurationId="JUnit" />
394
+    <history-entry file="ArrazTest_testAverageArrayWithoutMaxMin - 2018.12.07 at 12h 43m 51s.xml">
395
+      <configuration name="ArrazTest.testAverageArrayWithoutMaxMin" configurationId="JUnit" />
391
     </history-entry>
396
     </history-entry>
392
-    <history-entry file="ArrazTest_testMakeMeAnArrayFromArrayList1 - 2018.12.07 at 08h 49m 53s.xml">
393
-      <configuration name="ArrazTest.testMakeMeAnArrayFromArrayList1" configurationId="JUnit" />
397
+    <history-entry file="ArrazTest_testAverageArrayWithoutMaxMin - 2018.12.07 at 12h 44m 05s.xml">
398
+      <configuration name="ArrazTest.testAverageArrayWithoutMaxMin" configurationId="JUnit" />
394
     </history-entry>
399
     </history-entry>
395
-    <history-entry file="ArrazTest_testMakeMeAnArrayListFromArray2 - 2018.12.07 at 08h 49m 56s.xml">
396
-      <configuration name="ArrazTest.testMakeMeAnArrayListFromArray2" configurationId="JUnit" />
400
+    <history-entry file="ArrazTest_test1SumValuesOfArray1 - 2018.12.07 at 12h 46m 13s.xml">
401
+      <configuration name="ArrazTest.test1SumValuesOfArray1" configurationId="JUnit" />
397
     </history-entry>
402
     </history-entry>
398
-    <history-entry file="ArrazTest - 2018.12.07 at 09h 00m 04s.xml">
403
+    <history-entry file="ArrazTest - 2018.12.07 at 12h 46m 18s.xml">
399
       <configuration name="ArrazTest" configurationId="JUnit" />
404
       <configuration name="ArrazTest" configurationId="JUnit" />
400
     </history-entry>
405
     </history-entry>
401
-    <history-entry file="ArrazTest_testMakeMeAnArrayFromArrayList2 - 2018.12.07 at 09h 11m 27s.xml">
402
-      <configuration name="ArrazTest.testMakeMeAnArrayFromArrayList2" configurationId="JUnit" />
406
+    <history-entry file="ArrazTest_testArrayHas65and771 - 2018.12.07 at 12h 51m 30s.xml">
407
+      <configuration name="ArrazTest.testArrayHas65and771" configurationId="JUnit" />
403
     </history-entry>
408
     </history-entry>
404
-    <history-entry file="ArrazTest_testCheck2ArraysForEqual1 - 2018.12.07 at 09h 13m 25s.xml">
405
-      <configuration name="ArrazTest.testCheck2ArraysForEqual1" configurationId="JUnit" />
409
+    <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 12h 51m 33s.xml">
410
+      <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
406
     </history-entry>
411
     </history-entry>
407
-    <history-entry file="ArrazTest_testCheck2ArraysForEqual2 - 2018.12.07 at 09h 13m 27s.xml">
408
-      <configuration name="ArrazTest.testCheck2ArraysForEqual2" configurationId="JUnit" />
412
+    <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 12h 52m 03s.xml">
413
+      <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
409
     </history-entry>
414
     </history-entry>
410
   </component>
415
   </component>
411
   <component name="TimeTrackingManager">
416
   <component name="TimeTrackingManager">
412
-    <option name="totallyTimeSpent" value="29526000" />
417
+    <option name="totallyTimeSpent" value="38218000" />
413
   </component>
418
   </component>
414
   <component name="ToolWindowManager">
419
   <component name="ToolWindowManager">
415
     <frame x="1" y="23" width="1440" height="807" extended-state="0" />
420
     <frame x="1" y="23" width="1440" height="807" extended-state="0" />
444
       <window_info anchor="right" id="Palette&#9;" order="7" />
449
       <window_info anchor="right" id="Palette&#9;" order="7" />
445
       <window_info anchor="right" id="Maven Projects" order="8" />
450
       <window_info anchor="right" id="Maven Projects" order="8" />
446
     </layout>
451
     </layout>
452
+    <layout-to-restore>
453
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
454
+      <window_info id="Structure" order="1" weight="0.25" />
455
+      <window_info id="Image Layers" order="2" />
456
+      <window_info id="Designer" order="3" />
457
+      <window_info id="UI Designer" order="4" />
458
+      <window_info id="Capture Tool" order="5" />
459
+      <window_info id="Favorites" order="6" side_tool="true" />
460
+      <window_info anchor="bottom" id="Messages" order="0" weight="0.32867134" />
461
+      <window_info anchor="bottom" id="Database Changes" order="1" show_stripe_button="false" />
462
+      <window_info anchor="bottom" id="Message" order="2" />
463
+      <window_info anchor="bottom" id="Find" order="3" />
464
+      <window_info active="true" anchor="bottom" id="Run" order="4" visible="true" weight="0.32867134" />
465
+      <window_info anchor="bottom" id="Debug" order="5" weight="0.4" />
466
+      <window_info anchor="bottom" id="Cvs" order="6" weight="0.25" />
467
+      <window_info anchor="bottom" id="Inspection" order="7" weight="0.4" />
468
+      <window_info anchor="bottom" id="TODO" order="8" />
469
+      <window_info anchor="bottom" id="Terminal" order="9" />
470
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
471
+      <window_info anchor="bottom" id="Version Control" order="11" />
472
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
473
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
474
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
475
+      <window_info anchor="right" id="Palette" order="3" />
476
+      <window_info anchor="right" id="Capture Analysis" order="4" />
477
+      <window_info anchor="right" id="Theme Preview" order="5" />
478
+      <window_info anchor="right" id="Database" order="6" />
479
+      <window_info anchor="right" id="Palette&#9;" order="7" />
480
+      <window_info anchor="right" id="Maven Projects" order="8" />
481
+    </layout-to-restore>
447
   </component>
482
   </component>
448
   <component name="TypeScriptGeneratedFilesManager">
483
   <component name="TypeScriptGeneratedFilesManager">
449
     <option name="version" value="1" />
484
     <option name="version" value="1" />
487
         </state>
522
         </state>
488
       </provider>
523
       </provider>
489
     </entry>
524
     </entry>
525
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/src.zip!/java/util/Set.java">
526
+      <provider selected="true" editor-type-id="text-editor">
527
+        <state relative-caret-position="386">
528
+          <caret line="189" column="17" selection-start-line="189" selection-start-column="17" selection-end-line="189" selection-end-column="17" />
529
+        </state>
530
+      </provider>
531
+    </entry>
490
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
532
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
491
       <provider selected="true" editor-type-id="text-editor">
533
       <provider selected="true" editor-type-id="text-editor">
492
         <state>
534
         <state>
500
         </state>
542
         </state>
501
       </provider>
543
       </provider>
502
     </entry>
544
     </entry>
503
-    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/src.zip!/java/util/Set.java">
504
-      <provider selected="true" editor-type-id="text-editor">
505
-        <state relative-caret-position="386">
506
-          <caret line="189" column="17" selection-start-line="189" selection-start-column="17" selection-end-line="189" selection-end-column="17" />
545
+    <entry file="file://$PROJECT_DIR$/README.md">
546
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
547
+        <state split_layout="SPLIT">
548
+          <first_editor relative-caret-position="306">
549
+            <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
550
+          </first_editor>
551
+          <second_editor />
507
         </state>
552
         </state>
508
       </provider>
553
       </provider>
509
     </entry>
554
     </entry>
510
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
555
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
511
       <provider selected="true" editor-type-id="text-editor">
556
       <provider selected="true" editor-type-id="text-editor">
512
-        <state relative-caret-position="358">
513
-          <caret line="323" selection-start-line="323" selection-end-line="323" />
557
+        <state relative-caret-position="253">
558
+          <caret line="256" column="72" selection-start-line="256" selection-start-column="72" selection-end-line="256" selection-end-column="72" />
514
           <folding>
559
           <folding>
515
             <element signature="imports" expanded="true" />
560
             <element signature="imports" expanded="true" />
516
-            <element signature="e#4388#4389#0" expanded="true" />
517
-            <element signature="e#4411#4412#0" expanded="true" />
518
           </folding>
561
           </folding>
519
         </state>
562
         </state>
520
       </provider>
563
       </provider>
521
     </entry>
564
     </entry>
522
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
565
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
523
       <provider selected="true" editor-type-id="text-editor">
566
       <provider selected="true" editor-type-id="text-editor">
524
-        <state relative-caret-position="319">
525
-          <caret line="141" column="45" selection-start-line="141" selection-start-column="45" selection-end-line="141" selection-end-column="45" />
567
+        <state relative-caret-position="285">
568
+          <caret line="130" column="19" selection-start-line="130" selection-start-column="19" selection-end-line="130" selection-end-column="19" />
526
           <folding>
569
           <folding>
527
-            <element signature="e#3351#3352#0" expanded="true" />
528
-            <element signature="e#3376#3377#0" expanded="true" />
529
             <element signature="e#3440#3441#0" expanded="true" />
570
             <element signature="e#3440#3441#0" expanded="true" />
530
             <element signature="e#3482#3483#0" expanded="true" />
571
             <element signature="e#3482#3483#0" expanded="true" />
531
             <element signature="e#3556#3557#0" expanded="true" />
572
             <element signature="e#3556#3557#0" expanded="true" />
536
         </state>
577
         </state>
537
       </provider>
578
       </provider>
538
     </entry>
579
     </entry>
539
-    <entry file="file://$PROJECT_DIR$/README.md">
540
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
541
-        <state split_layout="SPLIT">
542
-          <first_editor relative-caret-position="306">
543
-            <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
544
-          </first_editor>
545
-          <second_editor />
546
-        </state>
547
-      </provider>
548
-    </entry>
549
   </component>
580
   </component>
550
   <component name="masterDetails">
581
   <component name="masterDetails">
551
     <states>
582
     <states>

+ 18
- 2
arraz/src/main/java/Arraz.java Zobrazit soubor

126
         return integerSet.toArray(new Integer[0]);
126
         return integerSet.toArray(new Integer[0]);
127
     }
127
     }
128
 
128
 
129
-    public double find2ndLargestValueFromArray(double[] array){
130
-        return 0.0;
129
+    public Double find2ndLargestValueFromArray(Double[] array){
130
+        Set<Double> set = new TreeSet<>(Arrays.asList(array));
131
+        Double[] newArray = set.toArray(new Double[0]);
132
+        return newArray[newArray.length - 2];
131
     }
133
     }
132
 
134
 
133
     public List<Integer> makeMeAnArrayListFromArray(Integer[] array){
135
     public List<Integer> makeMeAnArrayListFromArray(Integer[] array){
141
     public boolean check2ArraysForEqual(int[] array1, int[] array2){
143
     public boolean check2ArraysForEqual(int[] array1, int[] array2){
142
         return Arrays.equals(array1, array2);
144
         return Arrays.equals(array1, array2);
143
     }
145
     }
146
+
147
+    public double averageArrayWithoutMaxMin(int[] array){
148
+        MaxMin maxMin = findMaxMinOfArray(array);
149
+        int[] noMax = removeElementFromArray(array, maxMin.getMax());
150
+        int[] noMaxMin = removeElementFromArray(noMax, maxMin.getMin());
151
+        return averageOfArray(noMaxMin);
152
+    }
153
+
154
+    public boolean arrayHas65and77(Integer[] array){
155
+        List<Integer> list = Arrays.asList(array);
156
+            if(list.contains(65) && list.contains(77)){
157
+                return true;
158
+            }else{return false;}
159
+    }
144
 }
160
 }

+ 34
- 4
arraz/src/test/java/ArrazTest.java Zobrazit soubor

243
 
243
 
244
     @Test
244
     @Test
245
     public void testFind2ndLargestFromArray1(){
245
     public void testFind2ndLargestFromArray1(){
246
-        double expected = 38.4;
247
-        double actual = testArraz.find2ndLargestValueFromArray(double1);
246
+        Double expected = 99.3;
247
+        Double[] doubleArr = new Double[]{10.4, 99.3, 89.45, 23.0, 1.1, 199.4, 199.4};
248
+        Double actual = testArraz.find2ndLargestValueFromArray(doubleArr);
248
 
249
 
249
         Assert.assertEquals(expected, actual, .01);
250
         Assert.assertEquals(expected, actual, .01);
250
     }
251
     }
251
 
252
 
252
     @Test
253
     @Test
253
     public void testFind2ndLargestFromArray2(){
254
     public void testFind2ndLargestFromArray2(){
254
-        double expected = 78.9;
255
-        double actual = testArraz.find2ndLargestValueFromArray(double2);
255
+        Double expected = 3.149;
256
+        Double[] doubleArr = new Double[]{3.14, 3.14, 3.14, 3.14, 54.9};
257
+        Double actual = testArraz.find2ndLargestValueFromArray(doubleArr);
256
 
258
 
257
         Assert.assertEquals(expected, actual, .01);
259
         Assert.assertEquals(expected, actual, .01);
258
     }
260
     }
321
         Assert.assertFalse(testArraz.check2ArraysForEqual(arr1, expected));
323
         Assert.assertFalse(testArraz.check2ArraysForEqual(arr1, expected));
322
     }
324
     }
323
 
325
 
326
+    @Test
327
+    public void testAverageArrayWithoutMaxMin(){
328
+        double expected = 14.0;
329
+        double actual = testArraz.averageArrayWithoutMaxMin(arr1);
330
+
331
+        Assert.assertEquals(expected, actual, .01);
332
+    }
333
+
334
+    @Test
335
+    public void testAverageArrayWithoutMaxMin2(){
336
+        double expected = 48;
337
+        double actual = testArraz.averageArrayWithoutMaxMin(arr2);
338
+        System.out.println(actual);
339
+
340
+        Assert.assertEquals(expected, actual, .01);
341
+    }
342
+
343
+    @Test
344
+    public void testArrayHas65and771(){
345
+        Integer[] array = new Integer[]{65, 10, 34, 7, 77, 89};
346
+        Assert.assertTrue(testArraz.arrayHas65and77(array));
347
+    }
348
+
349
+    @Test
350
+    public void testArrayHas65and772(){
351
+        Integer[] array = new Integer[]{3, 1, 9999, 5, 44};
352
+        Assert.assertFalse(testArraz.arrayHas65and77(array));
353
+    }
324
 
354
 
325
 }
355
 }