Connor Dunnigan преди 6 години
родител
ревизия
942dbad71f

BIN
.DS_Store Целия файл


+ 16
- 0
arraz/.idea/compiler.xml Целия файл

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

+ 4
- 0
arraz/.idea/encodings.xml Целия файл

@@ -0,0 +1,4 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
+</project>

+ 13
- 0
arraz/.idea/libraries/Maven__junit_junit_4_0.xml Целия файл

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

+ 13
- 0
arraz/.idea/misc.xml Целия файл

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

+ 8
- 0
arraz/.idea/modules.xml Целия файл

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

+ 6
- 0
arraz/.idea/vcs.xml Целия файл

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

+ 259
- 0
arraz/.idea/workspace.xml Целия файл

@@ -0,0 +1,259 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="b3ba50be-3b8d-441a-8e91-35865d2e3cb7" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_0.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz.iml" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Arraz.java" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/ArrazTest.java" afterDir="false" />
14
+    </list>
15
+    <ignored path="$PROJECT_DIR$/target/" />
16
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
17
+    <option name="SHOW_DIALOG" value="false" />
18
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
19
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
20
+    <option name="LAST_RESOLUTION" value="IGNORE" />
21
+  </component>
22
+  <component name="FileEditorManager">
23
+    <splitter split-orientation="horizontal" split-proportion="0.5">
24
+      <split-first>
25
+        <leaf>
26
+          <file pinned="false" current-in-tab="true">
27
+            <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
28
+              <provider selected="true" editor-type-id="text-editor">
29
+                <state relative-caret-position="414">
30
+                  <caret line="18" lean-forward="true" selection-start-line="18" selection-end-line="18" />
31
+                </state>
32
+              </provider>
33
+            </entry>
34
+          </file>
35
+        </leaf>
36
+      </split-first>
37
+      <split-second>
38
+        <leaf>
39
+          <file pinned="false" current-in-tab="true">
40
+            <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
41
+              <provider selected="true" editor-type-id="text-editor">
42
+                <state relative-caret-position="161">
43
+                  <caret line="7" column="29" lean-forward="true" selection-start-line="7" selection-start-column="29" selection-end-line="7" selection-end-column="29" />
44
+                  <folding>
45
+                    <element signature="imports" expanded="true" />
46
+                  </folding>
47
+                </state>
48
+              </provider>
49
+            </entry>
50
+          </file>
51
+        </leaf>
52
+      </split-second>
53
+    </splitter>
54
+  </component>
55
+  <component name="Git.Settings">
56
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
57
+  </component>
58
+  <component name="IdeDocumentHistory">
59
+    <option name="CHANGED_PATHS">
60
+      <list>
61
+        <option value="$PROJECT_DIR$/src/main/java/Arraz.java" />
62
+        <option value="$PROJECT_DIR$/src/test/java/ArrazTest.java" />
63
+      </list>
64
+    </option>
65
+  </component>
66
+  <component name="ProjectFrameBounds">
67
+    <option name="x" value="16" />
68
+    <option name="y" value="23" />
69
+    <option name="width" value="1228" />
70
+    <option name="height" value="748" />
71
+  </component>
72
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
73
+  <component name="ProjectView">
74
+    <navigator proportions="" version="1">
75
+      <foldersAlwaysOnTop value="true" />
76
+    </navigator>
77
+    <panes>
78
+      <pane id="Scope" />
79
+      <pane id="PackagesPane" />
80
+      <pane id="ProjectPane">
81
+        <subPane>
82
+          <expand>
83
+            <path>
84
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
85
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
86
+            </path>
87
+            <path>
88
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
89
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
90
+              <item name="src" type="462c0819:PsiDirectoryNode" />
91
+            </path>
92
+            <path>
93
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
94
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
95
+              <item name="src" type="462c0819:PsiDirectoryNode" />
96
+              <item name="main" type="462c0819:PsiDirectoryNode" />
97
+            </path>
98
+            <path>
99
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
100
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
101
+              <item name="src" type="462c0819:PsiDirectoryNode" />
102
+              <item name="main" type="462c0819:PsiDirectoryNode" />
103
+              <item name="java" type="462c0819:PsiDirectoryNode" />
104
+            </path>
105
+            <path>
106
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
107
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
108
+              <item name="src" type="462c0819:PsiDirectoryNode" />
109
+              <item name="test" type="462c0819:PsiDirectoryNode" />
110
+            </path>
111
+            <path>
112
+              <item name="arraz" type="b2602c69:ProjectViewProjectNode" />
113
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
114
+              <item name="src" type="462c0819:PsiDirectoryNode" />
115
+              <item name="test" type="462c0819:PsiDirectoryNode" />
116
+              <item name="java" type="462c0819:PsiDirectoryNode" />
117
+            </path>
118
+          </expand>
119
+          <select />
120
+        </subPane>
121
+      </pane>
122
+    </panes>
123
+  </component>
124
+  <component name="PropertiesComponent">
125
+    <property name="WebServerToolWindowFactoryState" value="false" />
126
+    <property name="aspect.path.notification.shown" value="true" />
127
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544155039323" />
128
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
129
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
130
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
131
+    <property name="settings.editor.selected.configurable" value="MTConfigurable" />
132
+  </component>
133
+  <component name="RunDashboard">
134
+    <option name="ruleStates">
135
+      <list>
136
+        <RuleState>
137
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
138
+        </RuleState>
139
+        <RuleState>
140
+          <option name="name" value="StatusDashboardGroupingRule" />
141
+        </RuleState>
142
+      </list>
143
+    </option>
144
+  </component>
145
+  <component name="RunManager">
146
+    <configuration name="ArrazTest.testSumValsOfArr" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
147
+      <module name="arraz" />
148
+      <option name="PACKAGE_NAME" value="" />
149
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
150
+      <option name="METHOD_NAME" value="testSumValsOfArr" />
151
+      <option name="TEST_OBJECT" value="method" />
152
+      <method v="2">
153
+        <option name="Make" enabled="true" />
154
+      </method>
155
+    </configuration>
156
+    <recent_temporary>
157
+      <list>
158
+        <item itemvalue="JUnit.ArrazTest.testSumValsOfArr" />
159
+      </list>
160
+    </recent_temporary>
161
+  </component>
162
+  <component name="SvnConfiguration">
163
+    <configuration />
164
+  </component>
165
+  <component name="TaskManager">
166
+    <task active="true" id="Default" summary="Default task">
167
+      <changelist id="b3ba50be-3b8d-441a-8e91-35865d2e3cb7" name="Default Changelist" comment="" />
168
+      <created>1544151809976</created>
169
+      <option name="number" value="Default" />
170
+      <option name="presentableId" value="Default" />
171
+      <updated>1544151809976</updated>
172
+      <workItem from="1544151813460" duration="2687000" />
173
+    </task>
174
+    <servers />
175
+  </component>
176
+  <component name="TestHistory">
177
+    <history-entry file="ArrazTest_testSumValsOfArr - 2018.12.06 at 22h 51m 00s.xml">
178
+      <configuration name="ArrazTest.testSumValsOfArr" configurationId="JUnit" />
179
+    </history-entry>
180
+  </component>
181
+  <component name="TimeTrackingManager">
182
+    <option name="totallyTimeSpent" value="2687000" />
183
+  </component>
184
+  <component name="ToolWindowManager">
185
+    <frame x="16" y="23" width="1228" height="748" extended-state="0" />
186
+    <editor active="true" />
187
+    <layout>
188
+      <window_info id="Image Layers" />
189
+      <window_info id="Designer" />
190
+      <window_info id="UI Designer" />
191
+      <window_info id="Capture Tool" />
192
+      <window_info id="Favorites" side_tool="true" />
193
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.13996628" />
194
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
195
+      <window_info anchor="bottom" id="Messages" />
196
+      <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
197
+      <window_info anchor="bottom" id="Database Changes" />
198
+      <window_info anchor="bottom" id="Version Control" />
199
+      <window_info anchor="bottom" id="Terminal" />
200
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
201
+      <window_info anchor="bottom" id="Message" order="0" />
202
+      <window_info anchor="bottom" id="Find" order="1" />
203
+      <window_info anchor="bottom" id="Run" order="2" weight="0.3296875" />
204
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
205
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
206
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
207
+      <window_info anchor="bottom" id="TODO" order="6" />
208
+      <window_info anchor="right" id="Palette" />
209
+      <window_info anchor="right" id="Theme Preview" />
210
+      <window_info anchor="right" id="Maven" />
211
+      <window_info anchor="right" id="Capture Analysis" />
212
+      <window_info anchor="right" id="Palette&#9;" />
213
+      <window_info anchor="right" id="Database" />
214
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
215
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
216
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
217
+    </layout>
218
+  </component>
219
+  <component name="TypeScriptGeneratedFilesManager">
220
+    <option name="version" value="1" />
221
+  </component>
222
+  <component name="editorHistoryManager">
223
+    <entry file="file://$PROJECT_DIR$/pom.xml">
224
+      <provider selected="true" editor-type-id="text-editor" />
225
+    </entry>
226
+    <entry file="file://$PROJECT_DIR$/src/main/java/Arraz.java">
227
+      <provider selected="true" editor-type-id="text-editor">
228
+        <state relative-caret-position="414">
229
+          <caret line="18" lean-forward="true" selection-start-line="18" selection-end-line="18" />
230
+        </state>
231
+      </provider>
232
+    </entry>
233
+    <entry file="file://$PROJECT_DIR$/src/test/java/ArrazTest.java">
234
+      <provider selected="true" editor-type-id="text-editor">
235
+        <state relative-caret-position="161">
236
+          <caret line="7" column="29" lean-forward="true" selection-start-line="7" selection-start-column="29" selection-end-line="7" selection-end-column="29" />
237
+          <folding>
238
+            <element signature="imports" expanded="true" />
239
+          </folding>
240
+        </state>
241
+      </provider>
242
+    </entry>
243
+  </component>
244
+  <component name="masterDetails">
245
+    <states>
246
+      <state key="ScopeChooserConfigurable.UI">
247
+        <settings>
248
+          <splitter-proportions>
249
+            <option name="proportions">
250
+              <list>
251
+                <option value="0.2" />
252
+              </list>
253
+            </option>
254
+          </splitter-proportions>
255
+        </settings>
256
+      </state>
257
+    </states>
258
+  </component>
259
+</project>

+ 2
- 3
arraz/arraz.iml Целия файл

@@ -1,15 +1,14 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4 4
     <output url="file://$MODULE_DIR$/target/classes" />
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">
7 7
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9 8
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10 9
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 10
     </content>
12
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
11
+    <orderEntry type="inheritedJdk" />
13 12
     <orderEntry type="sourceFolder" forTests="false" />
14 13
     <orderEntry type="library" name="Maven: junit:junit:4.0" level="project" />
15 14
   </component>

+ 12
- 0
arraz/pom.xml Целия файл

@@ -7,6 +7,18 @@
7 7
     <groupId>rocks.zipcode.arraysgonewild</groupId>
8 8
     <artifactId>arraz</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <build>
11
+        <plugins>
12
+            <plugin>
13
+                <groupId>org.apache.maven.plugins</groupId>
14
+                <artifactId>maven-compiler-plugin</artifactId>
15
+                <configuration>
16
+                    <source>8</source>
17
+                    <target>8</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
10 22
     <dependencies>
11 23
         <dependency>
12 24
             <groupId>junit</groupId>

+ 16
- 0
arraz/src/main/java/Arraz.java Целия файл

@@ -1,2 +1,18 @@
1
+
1 2
 public class Arraz {
3
+
4
+    public Arraz() {
5
+    }
6
+    public Integer sumValuesOfArray(Integer[] nums){
7
+        int sum = 0;
8
+        for(Integer i : nums)
9
+            sum += i;
10
+        return sum;
11
+    }
12
+    public Double sumValuesOfArray(Double[] nums){
13
+        double sum = 0;
14
+        for(Double i : nums)
15
+            sum += i;
16
+        return sum;
17
+    }
2 18
 }

+ 10
- 1
arraz/src/test/java/ArrazTest.java Целия файл

@@ -1,5 +1,14 @@
1
-import static org.junit.Assert.*;
1
+import junit.framework.Assert;
2
+import org.junit.Test;
2 3
 
3 4
 public class ArrazTest {
5
+    Arraz arraz = new Arraz();
6
+
7
+    @Test
8
+    public void testSumValsOfArr(){
9
+        Integer[] nums = {3,4,5,6};
10
+        Integer actual = arraz.sumValuesOfArray(nums);
11
+        Assert.assertEquals(18,(int)actual);
12
+    }
4 13
 
5 14
 }