Seth il y a 6 ans
Parent
révision
33d8195416
3 fichiers modifiés avec 82 ajouts et 56 suppressions
  1. 57
    56
      .idea/workspace.xml
  2. 13
    0
      arraz/src/main/java/Arraz.java
  3. 12
    0
      arraz/src/test/java/ArrazTest.java

+ 57
- 56
.idea/workspace.xml Voir le fichier

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" />
6
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" 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" />
7
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.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" />
8
     </list>
7
     </list>
23
       </usages-collector>
22
       </usages-collector>
24
       <usages-collector id="statistics.file.types.edit">
23
       <usages-collector id="statistics.file.types.edit">
25
         <counts>
24
         <counts>
26
-          <entry key="JAVA" value="11042" />
25
+          <entry key="JAVA" value="11571" />
27
           <entry key="XML" value="3" />
26
           <entry key="XML" value="3" />
28
         </counts>
27
         </counts>
29
       </usages-collector>
28
       </usages-collector>
39
   <component name="FileEditorManager">
38
   <component name="FileEditorManager">
40
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
39
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
41
       <file pinned="false" current-in-tab="false">
40
       <file pinned="false" current-in-tab="false">
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 />
49
-            </state>
50
-          </provider>
51
-        </entry>
52
-      </file>
53
-      <file pinned="false" current-in-tab="true">
54
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
41
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
55
           <provider selected="true" editor-type-id="text-editor">
42
           <provider selected="true" editor-type-id="text-editor">
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" />
43
+            <state relative-caret-position="556">
44
+              <caret line="170" column="21" selection-start-line="170" selection-start-column="21" selection-end-line="170" selection-end-column="21" />
58
               <folding>
45
               <folding>
59
                 <element signature="e#3440#3441#0" expanded="true" />
46
                 <element signature="e#3440#3441#0" expanded="true" />
60
                 <element signature="e#3482#3483#0" expanded="true" />
47
                 <element signature="e#3482#3483#0" expanded="true" />
67
           </provider>
54
           </provider>
68
         </entry>
55
         </entry>
69
       </file>
56
       </file>
70
-      <file pinned="false" current-in-tab="false">
57
+      <file pinned="false" current-in-tab="true">
71
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
58
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
72
           <provider selected="true" editor-type-id="text-editor">
59
           <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" />
60
+            <state relative-caret-position="533">
61
+              <caret line="363" column="63" selection-start-line="363" selection-start-column="63" selection-end-line="363" selection-end-column="63" />
75
               <folding>
62
               <folding>
76
                 <element signature="imports" expanded="true" />
63
                 <element signature="imports" expanded="true" />
77
               </folding>
64
               </folding>
80
         </entry>
67
         </entry>
81
       </file>
68
       </file>
82
       <file pinned="false" current-in-tab="false">
69
       <file pinned="false" current-in-tab="false">
70
+        <entry file="file://$PROJECT_DIR$/README.md">
71
+          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
72
+            <state split_layout="SPLIT">
73
+              <first_editor relative-caret-position="306">
74
+                <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
75
+              </first_editor>
76
+              <second_editor />
77
+            </state>
78
+          </provider>
79
+        </entry>
80
+      </file>
81
+      <file pinned="false" current-in-tab="false">
83
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
82
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
84
           <provider selected="true" editor-type-id="text-editor">
83
           <provider selected="true" editor-type-id="text-editor">
85
             <state>
84
             <state>
220
     <property name="GO_FMT" value="false" />
219
     <property name="GO_FMT" value="false" />
221
     <property name="WebServerToolWindowFactoryState" value="false" />
220
     <property name="WebServerToolWindowFactoryState" value="false" />
222
     <property name="aspect.path.notification.shown" value="true" />
221
     <property name="aspect.path.notification.shown" value="true" />
223
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544205690510" />
222
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544206709239" />
224
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
223
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
225
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
224
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
226
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
225
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
250
       </list>
249
       </list>
251
     </option>
250
     </option>
252
   </component>
251
   </component>
253
-  <component name="RunManager" selected="JUnit.ArrazTest.testFind2ndLargestFromArray1">
252
+  <component name="RunManager" selected="JUnit.ArrazTest.testTheTotalOfTenIs302">
254
     <configuration default="true" type="Applet" factoryName="Applet">
253
     <configuration default="true" type="Applet" factoryName="Applet">
255
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
254
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
256
       <method v="2">
255
       <method v="2">
263
         <option name="Make" enabled="true" />
262
         <option name="Make" enabled="true" />
264
       </method>
263
       </method>
265
     </configuration>
264
     </configuration>
266
-    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
265
+    <configuration name="ArrazTest.testArrayHas65and772" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
267
       <module name="arraz" />
266
       <module name="arraz" />
268
       <option name="PACKAGE_NAME" value="" />
267
       <option name="PACKAGE_NAME" value="" />
269
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
268
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
269
+      <option name="METHOD_NAME" value="testArrayHas65and772" />
270
+      <option name="TEST_OBJECT" value="method" />
270
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
271
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
271
       <method v="2">
272
       <method v="2">
272
         <option name="Make" enabled="true" />
273
         <option name="Make" enabled="true" />
273
       </method>
274
       </method>
274
     </configuration>
275
     </configuration>
275
-    <configuration name="ArrazTest.testArrayHas65and771" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
276
+    <configuration name="ArrazTest.testFind2ndLargestFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
276
       <module name="arraz" />
277
       <module name="arraz" />
277
       <option name="PACKAGE_NAME" value="" />
278
       <option name="PACKAGE_NAME" value="" />
278
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
279
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
279
-      <option name="METHOD_NAME" value="testArrayHas65and771" />
280
+      <option name="METHOD_NAME" value="testFind2ndLargestFromArray1" />
280
       <option name="TEST_OBJECT" value="method" />
281
       <option name="TEST_OBJECT" value="method" />
281
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
282
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
282
       <method v="2">
283
       <method v="2">
283
         <option name="Make" enabled="true" />
284
         <option name="Make" enabled="true" />
284
       </method>
285
       </method>
285
     </configuration>
286
     </configuration>
286
-    <configuration name="ArrazTest.testArrayHas65and772" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
287
+    <configuration name="ArrazTest.testFind2ndLargestFromArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
287
       <module name="arraz" />
288
       <module name="arraz" />
288
       <option name="PACKAGE_NAME" value="" />
289
       <option name="PACKAGE_NAME" value="" />
289
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
290
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
290
-      <option name="METHOD_NAME" value="testArrayHas65and772" />
291
+      <option name="METHOD_NAME" value="testFind2ndLargestFromArray2" />
291
       <option name="TEST_OBJECT" value="method" />
292
       <option name="TEST_OBJECT" value="method" />
292
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
293
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
293
       <method v="2">
294
       <method v="2">
294
         <option name="Make" enabled="true" />
295
         <option name="Make" enabled="true" />
295
       </method>
296
       </method>
296
     </configuration>
297
     </configuration>
297
-    <configuration name="ArrazTest.testFind2ndLargestFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
298
+    <configuration name="ArrazTest.testTheTotalOfTenIs301" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
298
       <module name="arraz" />
299
       <module name="arraz" />
299
       <option name="PACKAGE_NAME" value="" />
300
       <option name="PACKAGE_NAME" value="" />
300
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
301
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
301
-      <option name="METHOD_NAME" value="testFind2ndLargestFromArray1" />
302
+      <option name="METHOD_NAME" value="testTheTotalOfTenIs301" />
302
       <option name="TEST_OBJECT" value="method" />
303
       <option name="TEST_OBJECT" value="method" />
303
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
304
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
304
       <method v="2">
305
       <method v="2">
305
         <option name="Make" enabled="true" />
306
         <option name="Make" enabled="true" />
306
       </method>
307
       </method>
307
     </configuration>
308
     </configuration>
308
-    <configuration name="ArrazTest.testFind2ndLargestFromArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
309
+    <configuration name="ArrazTest.testTheTotalOfTenIs302" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
309
       <module name="arraz" />
310
       <module name="arraz" />
310
       <option name="PACKAGE_NAME" value="" />
311
       <option name="PACKAGE_NAME" value="" />
311
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
312
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
312
-      <option name="METHOD_NAME" value="testFind2ndLargestFromArray2" />
313
+      <option name="METHOD_NAME" value="testTheTotalOfTenIs302" />
313
       <option name="TEST_OBJECT" value="method" />
314
       <option name="TEST_OBJECT" value="method" />
314
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
315
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
315
       <method v="2">
316
       <method v="2">
340
       </method>
341
       </method>
341
     </configuration>
342
     </configuration>
342
     <list>
343
     <list>
343
-      <item itemvalue="JUnit.ArrazTest" />
344
-      <item itemvalue="JUnit.ArrazTest.testArrayHas65and771" />
345
       <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
344
       <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
346
       <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
345
       <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
347
       <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
346
       <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
347
+      <item itemvalue="JUnit.ArrazTest.testTheTotalOfTenIs301" />
348
+      <item itemvalue="JUnit.ArrazTest.testTheTotalOfTenIs302" />
348
     </list>
349
     </list>
349
     <recent_temporary>
350
     <recent_temporary>
350
       <list>
351
       <list>
352
+        <item itemvalue="JUnit.ArrazTest.testTheTotalOfTenIs302" />
353
+        <item itemvalue="JUnit.ArrazTest.testTheTotalOfTenIs301" />
351
         <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
354
         <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray1" />
352
         <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
355
         <item itemvalue="JUnit.ArrazTest.testFind2ndLargestFromArray2" />
353
         <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
356
         <item itemvalue="JUnit.ArrazTest.testArrayHas65and772" />
354
-        <item itemvalue="JUnit.ArrazTest.testArrayHas65and771" />
355
-        <item itemvalue="JUnit.ArrazTest" />
356
       </list>
357
       </list>
357
     </recent_temporary>
358
     </recent_temporary>
358
   </component>
359
   </component>
369
       <workItem from="1543955862749" duration="2347000" />
370
       <workItem from="1543955862749" duration="2347000" />
370
       <workItem from="1543958998826" duration="113000" />
371
       <workItem from="1543958998826" duration="113000" />
371
       <workItem from="1544020724645" duration="762000" />
372
       <workItem from="1544020724645" duration="762000" />
372
-      <workItem from="1544046933389" duration="34996000" />
373
+      <workItem from="1544046933389" duration="36119000" />
373
     </task>
374
     </task>
374
     <task id="LOCAL-00001" summary="readme and docs">
375
     <task id="LOCAL-00001" summary="readme and docs">
375
       <created>1544021313039</created>
376
       <created>1544021313039</created>
382
     <servers />
383
     <servers />
383
   </component>
384
   </component>
384
   <component name="TestHistory">
385
   <component name="TestHistory">
385
-    <history-entry file="ArrazTest_testArrayHas65and771 - 2018.12.07 at 10h 54m 19s.xml">
386
-      <configuration name="ArrazTest.testArrayHas65and771" configurationId="JUnit" />
387
-    </history-entry>
388
-    <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 10h 54m 23s.xml">
389
-      <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
390
-    </history-entry>
391
     <history-entry file="ArrazTest_testAverageArrayWithoutMaxMin2 - 2018.12.07 at 12h 43m 07s.xml">
386
     <history-entry file="ArrazTest_testAverageArrayWithoutMaxMin2 - 2018.12.07 at 12h 43m 07s.xml">
392
       <configuration name="ArrazTest.testAverageArrayWithoutMaxMin2" configurationId="JUnit" />
387
       <configuration name="ArrazTest.testAverageArrayWithoutMaxMin2" configurationId="JUnit" />
393
     </history-entry>
388
     </history-entry>
412
     <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 12h 52m 03s.xml">
407
     <history-entry file="ArrazTest_testArrayHas65and772 - 2018.12.07 at 12h 52m 03s.xml">
413
       <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
408
       <configuration name="ArrazTest.testArrayHas65and772" configurationId="JUnit" />
414
     </history-entry>
409
     </history-entry>
410
+    <history-entry file="ArrazTest_testFind2ndLargestFromArray2 - 2018.12.07 at 13h 01m 28s.xml">
411
+      <configuration name="ArrazTest.testFind2ndLargestFromArray2" configurationId="JUnit" />
412
+    </history-entry>
413
+    <history-entry file="ArrazTest_testFind2ndLargestFromArray1 - 2018.12.07 at 13h 01m 31s.xml">
414
+      <configuration name="ArrazTest.testFind2ndLargestFromArray1" configurationId="JUnit" />
415
+    </history-entry>
415
   </component>
416
   </component>
416
   <component name="TimeTrackingManager">
417
   <component name="TimeTrackingManager">
417
-    <option name="totallyTimeSpent" value="38218000" />
418
+    <option name="totallyTimeSpent" value="39341000" />
418
   </component>
419
   </component>
419
   <component name="ToolWindowManager">
420
   <component name="ToolWindowManager">
420
     <frame x="1" y="23" width="1440" height="807" extended-state="0" />
421
     <frame x="1" y="23" width="1440" height="807" extended-state="0" />
421
     <editor active="true" />
422
     <editor active="true" />
422
     <layout>
423
     <layout>
423
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
424
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
424
       <window_info id="Structure" order="1" weight="0.25" />
425
       <window_info id="Structure" order="1" weight="0.25" />
425
       <window_info id="Image Layers" order="2" />
426
       <window_info id="Image Layers" order="2" />
426
       <window_info id="Designer" order="3" />
427
       <window_info id="Designer" order="3" />
431
       <window_info anchor="bottom" id="Messages" weight="0.32867134" />
432
       <window_info anchor="bottom" id="Messages" weight="0.32867134" />
432
       <window_info anchor="bottom" id="Message" order="0" />
433
       <window_info anchor="bottom" id="Message" order="0" />
433
       <window_info anchor="bottom" id="Find" order="1" />
434
       <window_info anchor="bottom" id="Find" order="1" />
434
-      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
435
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32867134" />
435
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
436
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
436
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
437
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
437
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
438
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
552
         </state>
553
         </state>
553
       </provider>
554
       </provider>
554
     </entry>
555
     </entry>
555
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
556
-      <provider selected="true" editor-type-id="text-editor">
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" />
559
-          <folding>
560
-            <element signature="imports" expanded="true" />
561
-          </folding>
562
-        </state>
563
-      </provider>
564
-    </entry>
565
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
556
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
566
       <provider selected="true" editor-type-id="text-editor">
557
       <provider selected="true" editor-type-id="text-editor">
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" />
558
+        <state relative-caret-position="556">
559
+          <caret line="170" column="21" selection-start-line="170" selection-start-column="21" selection-end-line="170" selection-end-column="21" />
569
           <folding>
560
           <folding>
570
             <element signature="e#3440#3441#0" expanded="true" />
561
             <element signature="e#3440#3441#0" expanded="true" />
571
             <element signature="e#3482#3483#0" expanded="true" />
562
             <element signature="e#3482#3483#0" expanded="true" />
577
         </state>
568
         </state>
578
       </provider>
569
       </provider>
579
     </entry>
570
     </entry>
571
+    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
572
+      <provider selected="true" editor-type-id="text-editor">
573
+        <state relative-caret-position="533">
574
+          <caret line="363" column="63" selection-start-line="363" selection-start-column="63" selection-end-line="363" selection-end-column="63" />
575
+          <folding>
576
+            <element signature="imports" expanded="true" />
577
+          </folding>
578
+        </state>
579
+      </provider>
580
+    </entry>
580
   </component>
581
   </component>
581
   <component name="masterDetails">
582
   <component name="masterDetails">
582
     <states>
583
     <states>

+ 13
- 0
arraz/src/main/java/Arraz.java Voir le fichier

157
                 return true;
157
                 return true;
158
             }else{return false;}
158
             }else{return false;}
159
     }
159
     }
160
+
161
+    public boolean theTotalOfTenIs30(Integer[] array){
162
+        int sum10 = 0;
163
+        for (Integer each:array){
164
+            if(each == 10){
165
+                sum10 += each;
166
+                if(sum10 == 30){
167
+                    return true;
168
+                }
169
+            }
170
+        }
171
+        return false;
172
+    }
160
 }
173
 }

+ 12
- 0
arraz/src/test/java/ArrazTest.java Voir le fichier

352
         Assert.assertFalse(testArraz.arrayHas65and77(array));
352
         Assert.assertFalse(testArraz.arrayHas65and77(array));
353
     }
353
     }
354
 
354
 
355
+    @Test
356
+    public void testTheTotalOfTenIs301() {
357
+        Integer[] array = new Integer[]{10, 4, 3, 10, 56, 10};
358
+        Assert.assertTrue(testArraz.theTotalOfTenIs30(array));
359
+    }
360
+
361
+    @Test
362
+    public void testTheTotalOfTenIs302(){
363
+        Integer[] array = new Integer[]{10, 98, 2, 34,10};
364
+        Assert.assertFalse(testArraz.theTotalOfTenIs30(array));
365
+    }
366
+
355
 }
367
 }