Seth 6 gadus atpakaļ
vecāks
revīzija
15162fc632

+ 104
- 55
.idea/workspace.xml Parādīt failu

@@ -2,6 +2,9 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
5 8
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
6 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>
@@ -22,25 +25,34 @@
22 25
       </usages-collector>
23 26
       <usages-collector id="statistics.file.types.edit">
24 27
         <counts>
25
-          <entry key="JAVA" value="5964" />
28
+          <entry key="JAVA" value="6414" />
26 29
           <entry key="XML" value="3" />
27 30
         </counts>
28 31
       </usages-collector>
29 32
       <usages-collector id="statistics.file.types.open">
30 33
         <counts>
31
-          <entry key="JAVA" value="2" />
32
-          <entry key="XML" value="2" />
34
+          <entry key="JAVA" value="3" />
35
+          <entry key="XML" value="3" />
33 36
         </counts>
34 37
       </usages-collector>
35 38
     </session>
36 39
   </component>
37 40
   <component name="FileEditorManager">
38 41
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
42
+      <file pinned="false" current-in-tab="true">
43
+        <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
44
+          <provider selected="true" editor-type-id="text-editor">
45
+            <state relative-caret-position="240">
46
+              <caret line="16" selection-start-line="16" selection-end-line="16" />
47
+            </state>
48
+          </provider>
49
+        </entry>
50
+      </file>
39 51
       <file pinned="false" current-in-tab="false">
40 52
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
41 53
           <provider selected="true" editor-type-id="text-editor">
42
-            <state relative-caret-position="358">
43
-              <caret line="209" selection-start-line="209" selection-end-line="209" />
54
+            <state relative-caret-position="1071">
55
+              <caret line="209" selection-start-line="209" selection-start-column="2" selection-end-line="217" selection-end-column="7" />
44 56
               <folding>
45 57
                 <element signature="imports" expanded="true" />
46 58
                 <element signature="e#4388#4389#0" expanded="true" />
@@ -51,10 +63,28 @@
51 63
         </entry>
52 64
       </file>
53 65
       <file pinned="false" current-in-tab="false">
66
+        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
67
+          <provider selected="true" editor-type-id="text-editor">
68
+            <state relative-caret-position="135">
69
+              <caret line="9" column="25" selection-start-line="9" selection-start-column="25" selection-end-line="9" selection-end-column="25" />
70
+              <folding>
71
+                <element signature="e#208#209#0" expanded="true" />
72
+                <element signature="e#243#244#0" expanded="true" />
73
+                <element signature="e#273#274#0" expanded="true" />
74
+                <element signature="e#300#301#0" expanded="true" />
75
+                <element signature="e#326#327#0" expanded="true" />
76
+                <element signature="e#361#362#0" expanded="true" />
77
+                <element signature="e#391#392#0" expanded="true" />
78
+              </folding>
79
+            </state>
80
+          </provider>
81
+        </entry>
82
+      </file>
83
+      <file pinned="false" current-in-tab="false">
54 84
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
55 85
           <provider selected="true" editor-type-id="text-editor">
56
-            <state relative-caret-position="343">
57
-              <caret line="113" column="13" selection-start-line="113" selection-start-column="13" selection-end-line="113" selection-end-column="13" />
86
+            <state relative-caret-position="790">
87
+              <caret line="119" column="10" selection-start-line="119" selection-start-column="10" selection-end-line="121" selection-end-column="11" />
58 88
               <folding>
59 89
                 <element signature="imports" expanded="true" />
60 90
               </folding>
@@ -62,12 +92,12 @@
62 92
           </provider>
63 93
         </entry>
64 94
       </file>
65
-      <file pinned="false" current-in-tab="true">
95
+      <file pinned="false" current-in-tab="false">
66 96
         <entry file="file://$PROJECT_DIR$/README.md">
67 97
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
68 98
             <state split_layout="SPLIT">
69 99
               <first_editor relative-caret-position="306">
70
-                <caret line="69" column="5" lean-forward="true" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
100
+                <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
71 101
               </first_editor>
72 102
               <second_editor />
73 103
             </state>
@@ -120,6 +150,7 @@
120 150
         <option value="$PROJECT_DIR$/README.md" />
121 151
         <option value="$PROJECT_DIR$/arraz/pom.xml" />
122 152
         <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
153
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
123 154
         <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
124 155
         <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
125 156
       </list>
@@ -205,12 +236,12 @@
205 236
     <property name="GO_FMT" value="false" />
206 237
     <property name="WebServerToolWindowFactoryState" value="false" />
207 238
     <property name="aspect.path.notification.shown" value="true" />
208
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544130899575" />
239
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544133596301" />
209 240
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
210 241
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
211 242
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
212 243
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
213
-    <property name="project.structure.last.edited" value="Project" />
244
+    <property name="project.structure.last.edited" value="Modules" />
214 245
     <property name="project.structure.proportion" value="0.15" />
215 246
     <property name="project.structure.side.proportion" value="0.2" />
216 247
     <property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
@@ -235,7 +266,7 @@
235 266
       </list>
236 267
     </option>
237 268
   </component>
238
-  <component name="RunManager" selected="JUnit.ArrazTest.testInsertArrayAt2">
269
+  <component name="RunManager" selected="JUnit.ArrazTest.testCopyArrayByIterator2">
239 270
     <configuration default="true" type="Applet" factoryName="Applet">
240 271
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
241 272
       <method v="2">
@@ -248,53 +279,55 @@
248 279
         <option name="Make" enabled="true" />
249 280
       </method>
250 281
     </configuration>
251
-    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
282
+    <configuration name="ArrazTest.testCopyArrayByIterator1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
252 283
       <module name="arraz" />
253 284
       <option name="PACKAGE_NAME" value="" />
254 285
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
+      <option name="METHOD_NAME" value="testCopyArrayByIterator1" />
287
+      <option name="TEST_OBJECT" value="method" />
255 288
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
256 289
       <method v="2">
257 290
         <option name="Make" enabled="true" />
258 291
       </method>
259 292
     </configuration>
260
-    <configuration name="ArrazTest.testInsertArrayAt1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
293
+    <configuration name="ArrazTest.testCopyArrayByIterator2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
261 294
       <module name="arraz" />
262 295
       <option name="PACKAGE_NAME" value="" />
263 296
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
264
-      <option name="METHOD_NAME" value="testInsertArrayAt1" />
297
+      <option name="METHOD_NAME" value="testCopyArrayByIterator2" />
265 298
       <option name="TEST_OBJECT" value="method" />
266 299
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
267 300
       <method v="2">
268 301
         <option name="Make" enabled="true" />
269 302
       </method>
270 303
     </configuration>
271
-    <configuration name="ArrazTest.testInsertArrayAt2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
304
+    <configuration name="ArrazTest.testInsertArrayAt1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272 305
       <module name="arraz" />
273 306
       <option name="PACKAGE_NAME" value="" />
274 307
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
275
-      <option name="METHOD_NAME" value="testInsertArrayAt2" />
308
+      <option name="METHOD_NAME" value="testInsertArrayAt1" />
276 309
       <option name="TEST_OBJECT" value="method" />
277 310
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
278 311
       <method v="2">
279 312
         <option name="Make" enabled="true" />
280 313
       </method>
281 314
     </configuration>
282
-    <configuration name="ArrazTest.testRemoveElementFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
315
+    <configuration name="ArrazTest.testInsertArrayAt2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
283 316
       <module name="arraz" />
284 317
       <option name="PACKAGE_NAME" value="" />
285 318
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
-      <option name="METHOD_NAME" value="testRemoveElementFromArray1" />
319
+      <option name="METHOD_NAME" value="testInsertArrayAt2" />
287 320
       <option name="TEST_OBJECT" value="method" />
288 321
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
289 322
       <method v="2">
290 323
         <option name="Make" enabled="true" />
291 324
       </method>
292 325
     </configuration>
293
-    <configuration name="ArrazTest.testReverseArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
326
+    <configuration name="ArrazTest.testRemoveElementFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
294 327
       <module name="arraz" />
295 328
       <option name="PACKAGE_NAME" value="" />
296 329
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
297
-      <option name="METHOD_NAME" value="testReverseArray1" />
330
+      <option name="METHOD_NAME" value="testRemoveElementFromArray1" />
298 331
       <option name="TEST_OBJECT" value="method" />
299 332
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
300 333
       <method v="2">
@@ -325,19 +358,19 @@
325 358
       </method>
326 359
     </configuration>
327 360
     <list>
328
-      <item itemvalue="JUnit.ArrazTest" />
329
-      <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
330 361
       <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
331 362
       <item itemvalue="JUnit.ArrazTest.testInsertArrayAt1" />
332 363
       <item itemvalue="JUnit.ArrazTest.testInsertArrayAt2" />
364
+      <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
365
+      <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
333 366
     </list>
334 367
     <recent_temporary>
335 368
       <list>
369
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
370
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
336 371
         <item itemvalue="JUnit.ArrazTest.testInsertArrayAt2" />
337 372
         <item itemvalue="JUnit.ArrazTest.testInsertArrayAt1" />
338 373
         <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
339
-        <item itemvalue="JUnit.ArrazTest" />
340
-        <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
341 374
       </list>
342 375
     </recent_temporary>
343 376
   </component>
@@ -354,7 +387,7 @@
354 387
       <workItem from="1543955862749" duration="2347000" />
355 388
       <workItem from="1543958998826" duration="113000" />
356 389
       <workItem from="1544020724645" duration="762000" />
357
-      <workItem from="1544046933389" duration="14993000" />
390
+      <workItem from="1544046933389" duration="17070000" />
358 391
     </task>
359 392
     <task id="LOCAL-00001" summary="readme and docs">
360 393
       <created>1544021313039</created>
@@ -367,12 +400,6 @@
367 400
     <servers />
368 401
   </component>
369 402
   <component name="TestHistory">
370
-    <history-entry file="ArrazTest_testInsertArrayAt1 - 2018.12.06 at 15h 31m 04s.xml">
371
-      <configuration name="ArrazTest.testInsertArrayAt1" configurationId="JUnit" />
372
-    </history-entry>
373
-    <history-entry file="ArrazTest_testInsertArrayAt2 - 2018.12.06 at 15h 31m 08s.xml">
374
-      <configuration name="ArrazTest.testInsertArrayAt2" configurationId="JUnit" />
375
-    </history-entry>
376 403
     <history-entry file="ArrazTest_testInsertArrayAt2 - 2018.12.06 at 16h 03m 55s.xml">
377 404
       <configuration name="ArrazTest.testInsertArrayAt2" configurationId="JUnit" />
378 405
     </history-entry>
@@ -397,15 +424,21 @@
397 424
     <history-entry file="ArrazTest_testInsertArrayAt2 - 2018.12.06 at 16h 11m 17s.xml">
398 425
       <configuration name="ArrazTest.testInsertArrayAt2" configurationId="JUnit" />
399 426
     </history-entry>
427
+    <history-entry file="ArrazTest_testCopyArrayByIterator1 - 2018.12.06 at 16h 59m 54s.xml">
428
+      <configuration name="ArrazTest.testCopyArrayByIterator1" configurationId="JUnit" />
429
+    </history-entry>
430
+    <history-entry file="ArrazTest_testCopyArrayByIterator2 - 2018.12.06 at 16h 59m 57s.xml">
431
+      <configuration name="ArrazTest.testCopyArrayByIterator2" configurationId="JUnit" />
432
+    </history-entry>
400 433
   </component>
401 434
   <component name="TimeTrackingManager">
402
-    <option name="totallyTimeSpent" value="18215000" />
435
+    <option name="totallyTimeSpent" value="20292000" />
403 436
   </component>
404 437
   <component name="ToolWindowManager">
405
-    <frame x="0" y="23" width="1440" height="807" extended-state="6" />
438
+    <frame x="1" y="23" width="1440" height="807" extended-state="6" />
406 439
     <editor active="true" />
407 440
     <layout>
408
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
441
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
409 442
       <window_info id="Structure" order="1" weight="0.25" />
410 443
       <window_info id="Image Layers" order="2" />
411 444
       <window_info id="Designer" order="3" />
@@ -416,7 +449,7 @@
416 449
       <window_info anchor="bottom" id="Messages" weight="0.32867134" />
417 450
       <window_info anchor="bottom" id="Message" order="0" />
418 451
       <window_info anchor="bottom" id="Find" order="1" />
419
-      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
452
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
420 453
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
421 454
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
422 455
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -450,8 +483,8 @@
450 483
       <breakpoints>
451 484
         <line-breakpoint enabled="true" type="java-method">
452 485
           <url>file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java</url>
453
-          <line>103</line>
454
-          <properties class="Arraz" method="insertArrayAt">
486
+          <line>104</line>
487
+          <properties class="Arraz">
455 488
             <option name="EMULATED" value="true" />
456 489
           </properties>
457 490
           <option name="timeStamp" value="4" />
@@ -473,27 +506,36 @@
473 506
         </state>
474 507
       </provider>
475 508
     </entry>
476
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
477
-      <provider selected="true" editor-type-id="text-editor">
478
-        <state relative-caret-position="240">
479
-          <caret line="16" selection-start-line="16" selection-end-line="16" />
509
+    <entry file="file://$PROJECT_DIR$/README.md">
510
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
511
+        <state split_layout="SPLIT">
512
+          <first_editor relative-caret-position="306">
513
+            <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
514
+          </first_editor>
515
+          <second_editor />
480 516
         </state>
481 517
       </provider>
482 518
     </entry>
483
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
519
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
484 520
       <provider selected="true" editor-type-id="text-editor">
485
-        <state relative-caret-position="343">
486
-          <caret line="113" column="13" selection-start-line="113" selection-start-column="13" selection-end-line="113" selection-end-column="13" />
521
+        <state relative-caret-position="135">
522
+          <caret line="9" column="25" selection-start-line="9" selection-start-column="25" selection-end-line="9" selection-end-column="25" />
487 523
           <folding>
488
-            <element signature="imports" expanded="true" />
524
+            <element signature="e#208#209#0" expanded="true" />
525
+            <element signature="e#243#244#0" expanded="true" />
526
+            <element signature="e#273#274#0" expanded="true" />
527
+            <element signature="e#300#301#0" expanded="true" />
528
+            <element signature="e#326#327#0" expanded="true" />
529
+            <element signature="e#361#362#0" expanded="true" />
530
+            <element signature="e#391#392#0" expanded="true" />
489 531
           </folding>
490 532
         </state>
491 533
       </provider>
492 534
     </entry>
493 535
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
494 536
       <provider selected="true" editor-type-id="text-editor">
495
-        <state relative-caret-position="358">
496
-          <caret line="209" selection-start-line="209" selection-end-line="209" />
537
+        <state relative-caret-position="1071">
538
+          <caret line="209" selection-start-line="209" selection-start-column="2" selection-end-line="217" selection-end-column="7" />
497 539
           <folding>
498 540
             <element signature="imports" expanded="true" />
499 541
             <element signature="e#4388#4389#0" expanded="true" />
@@ -502,13 +544,20 @@
502 544
         </state>
503 545
       </provider>
504 546
     </entry>
505
-    <entry file="file://$PROJECT_DIR$/README.md">
506
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
507
-        <state split_layout="SPLIT">
508
-          <first_editor relative-caret-position="306">
509
-            <caret line="69" column="5" lean-forward="true" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
510
-          </first_editor>
511
-          <second_editor />
547
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
548
+      <provider selected="true" editor-type-id="text-editor">
549
+        <state relative-caret-position="790">
550
+          <caret line="119" column="10" selection-start-line="119" selection-start-column="10" selection-end-line="121" selection-end-column="11" />
551
+          <folding>
552
+            <element signature="imports" expanded="true" />
553
+          </folding>
554
+        </state>
555
+      </provider>
556
+    </entry>
557
+    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
558
+      <provider selected="true" editor-type-id="text-editor">
559
+        <state relative-caret-position="240">
560
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
512 561
         </state>
513 562
       </provider>
514 563
     </entry>

+ 1
- 1
arraz/arraz.iml Parādīt failu

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4 4
     <output url="file://$MODULE_DIR$/target/classes" />
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">

+ 7
- 2
arraz/src/main/java/Arraz.java Parādīt failu

@@ -71,9 +71,10 @@ public class Arraz {
71 71
 
72 72
     public Integer[] copyArrayByIterator(Integer[] array){
73 73
         Integer[] newArray = new Integer[array.length];
74
+        Iterator<Integer> iterator = Arrays.asList(array).iterator();
74 75
         int index = 0;
75
-        for (Integer integer : Arrays.asList(array)) {
76
-            newArray[index] = integer;
76
+        while(iterator.hasNext()) {
77
+            newArray[index] = iterator.next();
77 78
             index++;
78 79
         }
79 80
         return newArray;
@@ -115,4 +116,8 @@ public class Arraz {
115 116
         }
116 117
         return newArray;
117 118
         }
119
+
120
+//        public MaxMin findMaxMinOfArray(int[] array){
121
+//            Arrays.asList(array).;
122
+//        }
118 123
 }

+ 25
- 0
arraz/src/main/java/MaxMin.java Parādīt failu

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

+ 11
- 3
arraz/src/test/java/ArrazTest.java Parādīt failu

@@ -11,7 +11,7 @@ public class ArrazTest {
11 11
 
12 12
     private Arraz testArraz;
13 13
     private OddEven oddEven1;
14
-    private OddEven oddEven2;
14
+    private MaxMin maxMin;
15 15
     private int[] arr1;
16 16
     private int[] arr2;
17 17
     private double[] double1;
@@ -23,7 +23,7 @@ public class ArrazTest {
23 23
         double1 = new double[] {1.0, 0.5, 3.6, 38.4, 17.3, 62.0, 9.0, 3.375, 0, 3.14159};
24 24
         testArraz = new Arraz();
25 25
         oddEven1 = new OddEven(3, 2);
26
-        oddEven2 = new OddEven(2,2);
26
+        maxMin = new MaxMin(100,3);
27 27
     }
28 28
 
29 29
     @Test
@@ -207,5 +207,13 @@ public class ArrazTest {
207 207
         Assert.assertArrayEquals(expected, actual);
208 208
     }
209 209
 
210
-
210
+//    @Test
211
+//    public void testFindMaxMinOfArray1(){
212
+//        Assert.assertEquals(maxMin.getMax(), testArraz.findMaxMinOfArray(arr1).getMax());
213
+//    }
214
+//
215
+//    @Test
216
+//    public void testFindMaxMinOfArray2(){
217
+//        Assert.assertEquals(maxMin.getMin(), testArraz.findMaxMinOfArray(arr1).getMin());
218
+//    }
211 219
 }