Browse Source

{more progress Friday eve}

Jacqueline Joson 6 years ago
parent
commit
9f23eb1f3d
4 changed files with 306 additions and 168 deletions
  1. 192
    160
      .idea/workspace.xml
  2. 0
    7
      src/main/java/MyArrayList.java
  3. 43
    1
      src/main/java/MySet.java
  4. 71
    0
      src/test/java/MySetTest.java

+ 192
- 160
.idea/workspace.xml View File

3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="ada34df4-dfd8-4fb3-8f80-b9a79b2fcc05" name="Default Changelist" comment="">
4
     <list default="true" id="ada34df4-dfd8-4fb3-8f80-b9a79b2fcc05" name="Default Changelist" comment="">
5
       <change beforePath="$PROJECT_DIR$/src/main/java/MyArrayList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/src/main/java/MyArrayList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/src/main/java/MySet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/MySet.java" afterDir="false" />
7
     </list>
7
     </list>
8
     <ignored path="$PROJECT_DIR$/target/" />
8
     <ignored path="$PROJECT_DIR$/target/" />
9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
22
       </usages-collector>
22
       </usages-collector>
23
       <usages-collector id="statistics.file.extensions.open">
23
       <usages-collector id="statistics.file.extensions.open">
24
         <counts>
24
         <counts>
25
-          <entry key="JAVA/" value="2" />
25
+          <entry key="JAVA/" value="3" />
26
           <entry key="JAVA/MyArrayList" value="1" />
26
           <entry key="JAVA/MyArrayList" value="1" />
27
           <entry key="MODULES/mdl-generics" value="1" />
27
           <entry key="MODULES/mdl-generics" value="1" />
28
           <entry key="class" value="4" />
28
           <entry key="class" value="4" />
29
           <entry key="iml" value="1" />
29
           <entry key="iml" value="1" />
30
-          <entry key="java" value="3" />
30
+          <entry key="java" value="4" />
31
           <entry key="md" value="1" />
31
           <entry key="md" value="1" />
32
         </counts>
32
         </counts>
33
       </usages-collector>
33
       </usages-collector>
35
         <counts>
35
         <counts>
36
           <entry key="CLASS" value="4" />
36
           <entry key="CLASS" value="4" />
37
           <entry key="IDEA_MODULE" value="1" />
37
           <entry key="IDEA_MODULE" value="1" />
38
-          <entry key="JAVA" value="3" />
38
+          <entry key="JAVA" value="4" />
39
           <entry key="Markdown" value="1" />
39
           <entry key="Markdown" value="1" />
40
-          <entry key="UML" value="4" />
40
+          <entry key="UML" value="5" />
41
         </counts>
41
         </counts>
42
       </usages-collector>
42
       </usages-collector>
43
       <usages-collector id="statistics.file.extensions.edit">
43
       <usages-collector id="statistics.file.extensions.edit">
44
         <counts>
44
         <counts>
45
-          <entry key="java" value="4322" />
45
+          <entry key="java" value="6987" />
46
           <entry key="txt" value="59" />
46
           <entry key="txt" value="59" />
47
         </counts>
47
         </counts>
48
       </usages-collector>
48
       </usages-collector>
49
       <usages-collector id="statistics.file.types.edit">
49
       <usages-collector id="statistics.file.types.edit">
50
         <counts>
50
         <counts>
51
-          <entry key="JAVA" value="4322" />
51
+          <entry key="JAVA" value="6987" />
52
           <entry key="PLAIN_TEXT" value="59" />
52
           <entry key="PLAIN_TEXT" value="59" />
53
         </counts>
53
         </counts>
54
       </usages-collector>
54
       </usages-collector>
57
   <component name="FileEditorManager">
57
   <component name="FileEditorManager">
58
     <leaf>
58
     <leaf>
59
       <file pinned="false" current-in-tab="false">
59
       <file pinned="false" current-in-tab="false">
60
-        <entry file="file://$PROJECT_DIR$/README.md">
61
-          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
62
-            <state split_layout="SPLIT">
63
-              <first_editor />
64
-              <second_editor />
65
-            </state>
66
-          </provider>
67
-        </entry>
68
-      </file>
69
-      <file pinned="false" current-in-tab="false">
70
         <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
60
         <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
71
           <provider selected="true" editor-type-id="text-editor">
61
           <provider selected="true" editor-type-id="text-editor">
72
-            <state relative-caret-position="335">
73
-              <caret line="89" lean-forward="true" selection-start-line="89" selection-end-line="89" />
62
+            <state relative-caret-position="251">
63
+              <caret line="58" selection-start-line="58" selection-end-line="58" />
74
               <folding>
64
               <folding>
75
                 <element signature="e#67#68#0" expanded="true" />
65
                 <element signature="e#67#68#0" expanded="true" />
76
                 <element signature="e#107#108#0" expanded="true" />
66
                 <element signature="e#107#108#0" expanded="true" />
86
       <file pinned="false" current-in-tab="false">
76
       <file pinned="false" current-in-tab="false">
87
         <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
77
         <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
88
           <provider selected="true" editor-type-id="text-editor">
78
           <provider selected="true" editor-type-id="text-editor">
89
-            <state relative-caret-position="17">
90
-              <caret line="1" lean-forward="true" selection-start-line="1" selection-end-line="1" />
79
+            <state relative-caret-position="56">
80
+              <caret line="10" column="46" lean-forward="true" selection-start-line="10" selection-start-column="46" selection-end-line="10" selection-end-column="46" />
81
+              <folding>
82
+                <element signature="e#84#85#0" expanded="true" />
83
+                <element signature="e#128#129#0" expanded="true" />
84
+                <element signature="e#155#156#0" expanded="true" />
85
+                <element signature="e#207#208#0" expanded="true" />
86
+                <element signature="e#233#234#0" expanded="true" />
87
+                <element signature="e#272#273#0" expanded="true" />
88
+                <element signature="e#432#433#0" expanded="true" />
89
+                <element signature="e#461#462#0" expanded="true" />
90
+                <element signature="e#494#495#0" expanded="true" />
91
+                <element signature="e#524#525#0" expanded="true" />
92
+                <element signature="e#559#560#0" expanded="true" />
93
+                <element signature="e#579#580#0" expanded="true" />
94
+                <element signature="e#679#680#0" expanded="true" />
95
+                <element signature="e#706#707#0" expanded="true" />
96
+              </folding>
91
             </state>
97
             </state>
92
           </provider>
98
           </provider>
93
         </entry>
99
         </entry>
94
       </file>
100
       </file>
95
       <file pinned="false" current-in-tab="true">
101
       <file pinned="false" current-in-tab="true">
96
-        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
102
+        <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
97
           <provider selected="true" editor-type-id="text-editor">
103
           <provider selected="true" editor-type-id="text-editor">
98
-            <state relative-caret-position="148">
99
-              <caret line="129" column="82" lean-forward="true" selection-start-line="129" selection-start-column="82" selection-end-line="129" selection-end-column="82" />
104
+            <state relative-caret-position="248">
105
+              <caret line="55" column="29" selection-start-line="55" selection-start-column="29" selection-end-line="55" selection-end-column="29" />
100
               <folding>
106
               <folding>
101
                 <element signature="imports" expanded="true" />
107
                 <element signature="imports" expanded="true" />
102
-                <element signature="e#282#291#0" expanded="true" />
108
+                <element signature="e#210#219#0" expanded="true" />
103
               </folding>
109
               </folding>
104
             </state>
110
             </state>
105
           </provider>
111
           </provider>
106
         </entry>
112
         </entry>
107
       </file>
113
       </file>
108
       <file pinned="false" current-in-tab="false">
114
       <file pinned="false" current-in-tab="false">
109
-        <entry file="uml://JAVA/MyArrayList">
110
-          <provider selected="true" editor-type-id="UmlEditorProvider">
111
-            <state>
112
-              <ID>JAVA</ID>
113
-              <OriginalElement>MyArrayList</OriginalElement>
114
-              <nodes>
115
-                <node x="0.0" y="0.0">MyArrayList</node>
116
-              </nodes>
117
-              <notes />
118
-              <edges />
119
-              <settings layout="Hierarchic Group" zoom="1.0" x="-164.0" y="190.0" />
120
-              <SelectedNodes />
121
-              <Categories>
122
-                <Category>Methods</Category>
123
-                <Category>Constructors</Category>
124
-                <Category>Fields</Category>
125
-                <Category>Inner Classes</Category>
126
-              </Categories>
127
-              <SCOPE>All</SCOPE>
128
-              <VISIBILITY>private</VISIBILITY>
115
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
116
+          <provider selected="true" editor-type-id="text-editor">
117
+            <state relative-caret-position="109">
118
+              <caret line="11" column="66" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="66" />
119
+              <folding>
120
+                <element signature="imports" expanded="true" />
121
+              </folding>
129
             </state>
122
             </state>
130
           </provider>
123
           </provider>
131
         </entry>
124
         </entry>
135
   <component name="FileTemplateManagerImpl">
128
   <component name="FileTemplateManagerImpl">
136
     <option name="RECENT_TEMPLATES">
129
     <option name="RECENT_TEMPLATES">
137
       <list>
130
       <list>
138
-        <option value="JUnit4 Test Class" />
139
         <option value="Class" />
131
         <option value="Class" />
132
+        <option value="JUnit4 Test Class" />
140
       </list>
133
       </list>
141
     </option>
134
     </option>
142
   </component>
135
   </component>
146
   <component name="IdeDocumentHistory">
139
   <component name="IdeDocumentHistory">
147
     <option name="CHANGED_PATHS">
140
     <option name="CHANGED_PATHS">
148
       <list>
141
       <list>
142
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
149
         <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
143
         <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
150
         <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
144
         <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
151
-        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
145
+        <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
152
       </list>
146
       </list>
153
     </option>
147
     </option>
154
   </component>
148
   </component>
222
   <component name="PropertiesComponent">
216
   <component name="PropertiesComponent">
223
     <property name="WebServerToolWindowFactoryState" value="false" />
217
     <property name="WebServerToolWindowFactoryState" value="false" />
224
     <property name="aspect.path.notification.shown" value="true" />
218
     <property name="aspect.path.notification.shown" value="true" />
225
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542386512999" />
219
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542409926473" />
226
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
220
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
227
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
221
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
222
+    <property name="com.intellij.testIntegration.createTest.CreateTestDialog.includeInheritedMembers" value="true" />
228
     <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
223
     <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
229
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
224
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
230
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
225
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
231
-    <property name="project.structure.last.edited" value="Modules" />
232
-    <property name="project.structure.proportion" value="0.0" />
233
-    <property name="project.structure.side.proportion" value="0.0" />
226
+    <property name="project.structure.last.edited" value="SDKs" />
227
+    <property name="project.structure.proportion" value="0.15" />
228
+    <property name="project.structure.side.proportion" value="0.2" />
234
     <property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
229
     <property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
235
   </component>
230
   </component>
236
   <component name="RecentsManager">
231
   <component name="RecentsManager">
253
       </list>
248
       </list>
254
     </option>
249
     </option>
255
   </component>
250
   </component>
256
-  <component name="RunManager" selected="JUnit.MyArrayListTest">
257
-    <configuration name="MyArrayListTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
251
+  <component name="RunManager" selected="JUnit.MySetTest">
252
+    <configuration name="MySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
258
       <module name="generics" />
253
       <module name="generics" />
259
       <option name="PACKAGE_NAME" value="" />
254
       <option name="PACKAGE_NAME" value="" />
260
-      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
255
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
261
       <method v="2">
256
       <method v="2">
262
         <option name="Make" enabled="true" />
257
         <option name="Make" enabled="true" />
263
       </method>
258
       </method>
264
     </configuration>
259
     </configuration>
265
-    <configuration name="MyArrayListTest.addOverrideTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
260
+    <configuration name="MySetTest.addTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
266
       <module name="generics" />
261
       <module name="generics" />
267
       <option name="PACKAGE_NAME" value="" />
262
       <option name="PACKAGE_NAME" value="" />
268
-      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
269
-      <option name="METHOD_NAME" value="addOverrideTest" />
263
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
264
+      <option name="METHOD_NAME" value="addTest" />
270
       <option name="TEST_OBJECT" value="method" />
265
       <option name="TEST_OBJECT" value="method" />
271
       <method v="2">
266
       <method v="2">
272
         <option name="Make" enabled="true" />
267
         <option name="Make" enabled="true" />
273
       </method>
268
       </method>
274
     </configuration>
269
     </configuration>
275
-    <configuration name="MyArrayListTest.containsFalseTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
270
+    <configuration name="MySetTest.clearTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
276
       <module name="generics" />
271
       <module name="generics" />
277
       <option name="PACKAGE_NAME" value="" />
272
       <option name="PACKAGE_NAME" value="" />
278
-      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
279
-      <option name="METHOD_NAME" value="containsFalseTest" />
273
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
274
+      <option name="METHOD_NAME" value="clearTest" />
280
       <option name="TEST_OBJECT" value="method" />
275
       <option name="TEST_OBJECT" value="method" />
281
       <method v="2">
276
       <method v="2">
282
         <option name="Make" enabled="true" />
277
         <option name="Make" enabled="true" />
283
       </method>
278
       </method>
284
     </configuration>
279
     </configuration>
285
-    <configuration name="MyArrayListTest.containsTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
280
+    <configuration name="MySetTest.getTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
       <module name="generics" />
281
       <module name="generics" />
287
       <option name="PACKAGE_NAME" value="" />
282
       <option name="PACKAGE_NAME" value="" />
288
-      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
289
-      <option name="METHOD_NAME" value="containsTest" />
283
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
284
+      <option name="METHOD_NAME" value="getTest" />
290
       <option name="TEST_OBJECT" value="method" />
285
       <option name="TEST_OBJECT" value="method" />
291
       <method v="2">
286
       <method v="2">
292
         <option name="Make" enabled="true" />
287
         <option name="Make" enabled="true" />
293
       </method>
288
       </method>
294
     </configuration>
289
     </configuration>
295
-    <configuration name="MyArrayListTest.isEmptyTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
290
+    <configuration name="MySetTest.sizeTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
296
       <module name="generics" />
291
       <module name="generics" />
297
       <option name="PACKAGE_NAME" value="" />
292
       <option name="PACKAGE_NAME" value="" />
298
-      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
299
-      <option name="METHOD_NAME" value="isEmptyTest" />
293
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
294
+      <option name="METHOD_NAME" value="sizeTest" />
300
       <option name="TEST_OBJECT" value="method" />
295
       <option name="TEST_OBJECT" value="method" />
301
       <method v="2">
296
       <method v="2">
302
         <option name="Make" enabled="true" />
297
         <option name="Make" enabled="true" />
303
       </method>
298
       </method>
304
     </configuration>
299
     </configuration>
305
     <list>
300
     <list>
306
-      <item itemvalue="JUnit.MyArrayListTest" />
307
-      <item itemvalue="JUnit.MyArrayListTest.isEmptyTest" />
308
-      <item itemvalue="JUnit.MyArrayListTest.containsTest" />
309
-      <item itemvalue="JUnit.MyArrayListTest.containsFalseTest" />
310
-      <item itemvalue="JUnit.MyArrayListTest.addOverrideTest" />
301
+      <item itemvalue="JUnit.MySetTest" />
302
+      <item itemvalue="JUnit.MySetTest.addTest" />
303
+      <item itemvalue="JUnit.MySetTest.getTest" />
304
+      <item itemvalue="JUnit.MySetTest.sizeTest" />
305
+      <item itemvalue="JUnit.MySetTest.clearTest" />
311
     </list>
306
     </list>
312
     <recent_temporary>
307
     <recent_temporary>
313
       <list>
308
       <list>
314
-        <item itemvalue="JUnit.MyArrayListTest" />
315
-        <item itemvalue="JUnit.MyArrayListTest.addOverrideTest" />
316
-        <item itemvalue="JUnit.MyArrayListTest.containsFalseTest" />
317
-        <item itemvalue="JUnit.MyArrayListTest.containsTest" />
318
-        <item itemvalue="JUnit.MyArrayListTest.isEmptyTest" />
309
+        <item itemvalue="JUnit.MySetTest" />
310
+        <item itemvalue="JUnit.MySetTest.clearTest" />
311
+        <item itemvalue="JUnit.MySetTest.sizeTest" />
312
+        <item itemvalue="JUnit.MySetTest.getTest" />
313
+        <item itemvalue="JUnit.MySetTest.addTest" />
319
       </list>
314
       </list>
320
     </recent_temporary>
315
     </recent_temporary>
321
   </component>
316
   </component>
329
       <option name="number" value="Default" />
324
       <option name="number" value="Default" />
330
       <option name="presentableId" value="Default" />
325
       <option name="presentableId" value="Default" />
331
       <updated>1542236797011</updated>
326
       <updated>1542236797011</updated>
332
-      <workItem from="1542236798436" duration="20962000" />
327
+      <workItem from="1542236798436" duration="35275000" />
333
     </task>
328
     </task>
334
     <servers />
329
     <servers />
335
   </component>
330
   </component>
336
   <component name="TestHistory">
331
   <component name="TestHistory">
337
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 08h 56m 05s.xml">
338
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
332
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 17h 40m 43s.xml">
333
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
339
     </history-entry>
334
     </history-entry>
340
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 08h 56m 16s.xml">
341
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
335
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 17h 54m 24s.xml">
336
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
342
     </history-entry>
337
     </history-entry>
343
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 08h 58m 50s.xml">
344
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
338
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 17h 57m 59s.xml">
339
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
345
     </history-entry>
340
     </history-entry>
346
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 10h 57m 57s.xml">
347
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
341
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 00m 09s.xml">
342
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
348
     </history-entry>
343
     </history-entry>
349
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 10h 58m 04s.xml">
350
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
344
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 00m 13s.xml">
345
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
351
     </history-entry>
346
     </history-entry>
352
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 10h 59m 54s.xml">
353
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
347
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 00m 16s.xml">
348
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
354
     </history-entry>
349
     </history-entry>
355
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 11h 00m 33s.xml">
356
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
350
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 02m 23s.xml">
351
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
357
     </history-entry>
352
     </history-entry>
358
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 11h 02m 07s.xml">
359
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
353
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 02m 27s.xml">
354
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
360
     </history-entry>
355
     </history-entry>
361
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 11h 02m 10s.xml">
362
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
356
+    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 02m 31s.xml">
357
+      <configuration name="MySetTest.addTest" configurationId="JUnit" />
363
     </history-entry>
358
     </history-entry>
364
-    <history-entry file="MyArrayListTest_addOverrideTest - 2018.11.16 at 11h 35m 04s.xml">
365
-      <configuration name="MyArrayListTest.addOverrideTest" configurationId="JUnit" />
359
+    <history-entry file="MySetTest_getTest - 2018.11.16 at 18h 04m 18s.xml">
360
+      <configuration name="MySetTest.getTest" configurationId="JUnit" />
366
     </history-entry>
361
     </history-entry>
367
   </component>
362
   </component>
368
   <component name="TimeTrackingManager">
363
   <component name="TimeTrackingManager">
369
-    <option name="totallyTimeSpent" value="20962000" />
364
+    <option name="totallyTimeSpent" value="35275000" />
370
   </component>
365
   </component>
371
   <component name="ToolWindowManager">
366
   <component name="ToolWindowManager">
372
     <frame x="0" y="23" width="1280" height="712" extended-state="0" />
367
     <frame x="0" y="23" width="1280" height="712" extended-state="0" />
382
       <window_info anchor="bottom" id="Messages" weight="0.32903227" />
377
       <window_info anchor="bottom" id="Messages" weight="0.32903227" />
383
       <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
378
       <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
384
       <window_info anchor="bottom" id="Terminal" order="1" />
379
       <window_info anchor="bottom" id="Terminal" order="1" />
385
-      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
380
+      <window_info anchor="bottom" id="Event Log" order="2" sideWeight="0.50080776" side_tool="true" weight="0.32903227" />
386
       <window_info anchor="bottom" id="Message" order="3" />
381
       <window_info anchor="bottom" id="Message" order="3" />
387
       <window_info anchor="bottom" id="Find" order="4" weight="0.32903227" />
382
       <window_info anchor="bottom" id="Find" order="4" weight="0.32903227" />
388
-      <window_info active="true" anchor="bottom" id="Run" order="5" visible="true" weight="0.32903227" />
383
+      <window_info active="true" anchor="bottom" id="Run" order="5" sideWeight="0.49919224" visible="true" weight="0.32903227" />
389
       <window_info anchor="bottom" id="Database Changes" order="6" show_stripe_button="false" />
384
       <window_info anchor="bottom" id="Database Changes" order="6" show_stripe_button="false" />
390
       <window_info anchor="bottom" id="Debug" order="7" weight="0.4" />
385
       <window_info anchor="bottom" id="Debug" order="7" weight="0.4" />
391
       <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
386
       <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
412
     <breakpoint-manager>
407
     <breakpoint-manager>
413
       <breakpoints>
408
       <breakpoints>
414
         <line-breakpoint enabled="true" type="java-method">
409
         <line-breakpoint enabled="true" type="java-method">
415
-          <url>file://$PROJECT_DIR$/src/main/java/MyArrayList.java</url>
416
-          <line>71</line>
417
-          <properties class="MyArrayList" method="add">
410
+          <url>file://$PROJECT_DIR$/src/main/java/MySet.java</url>
411
+          <line>17</line>
412
+          <properties class="MySet" method="add">
418
             <option name="EMULATED" value="true" />
413
             <option name="EMULATED" value="true" />
419
           </properties>
414
           </properties>
420
-          <option name="timeStamp" value="9" />
415
+          <option name="timeStamp" value="14" />
421
         </line-breakpoint>
416
         </line-breakpoint>
422
       </breakpoints>
417
       </breakpoints>
423
     </breakpoint-manager>
418
     </breakpoint-manager>
442
         </state>
437
         </state>
443
       </provider>
438
       </provider>
444
     </entry>
439
     </entry>
440
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
441
+      <provider selected="true" editor-type-id="text-editor">
442
+        <state relative-caret-position="221">
443
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
444
+        </state>
445
+      </provider>
446
+    </entry>
447
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/Assert.class">
448
+      <provider selected="true" editor-type-id="text-editor">
449
+        <state relative-caret-position="94">
450
+          <caret line="333" selection-start-line="333" selection-end-line="333" />
451
+          <folding>
452
+            <element signature="e#8323#8324#0" expanded="true" />
453
+            <element signature="e#8383#8384#0" expanded="true" />
454
+          </folding>
455
+        </state>
456
+      </provider>
457
+    </entry>
445
     <entry file="uml://JAVA/">
458
     <entry file="uml://JAVA/">
446
       <provider selected="true" editor-type-id="UmlEditorProvider">
459
       <provider selected="true" editor-type-id="UmlEditorProvider">
447
         <state>
460
         <state>
448
           <ID>JAVA</ID>
461
           <ID>JAVA</ID>
449
           <OriginalElement />
462
           <OriginalElement />
450
           <nodes>
463
           <nodes>
451
-            <node x="" y="">com</node>
452
-            <node x="" y="">netscape</node>
453
-            <node x="" y="">junit</node>
454
-            <node x="" y="">oracle</node>
455
-            <node x="" y="">org</node>
456
-            <node x="" y="">resources</node>
457
-            <node x="" y="">toolbarButtonGraphics</node>
458
-            <node x="" y="">MyArrayList</node>
459
-            <node x="" y="">sun</node>
460
-            <node x="" y="">META-INF</node>
461
-            <node x="" y="">jdk</node>
462
-            <node x="" y="">apple</node>
463
-            <node x="" y="">groovyjarjarasm</node>
464
-            <node x="" y="">java</node>
465
-            <node x="" y="">groovy</node>
466
-            <node x="" y="">javax</node>
467
-            <node x="" y="">groovyjarjarcommonscli</node>
468
-            <node x="" y="">javafx</node>
469
-            <node x="" y="">groovyjarjarantlr</node>
464
+            <node x="159.0" y="664.0">com</node>
465
+            <node x="617.0" y="516.0">netscape</node>
466
+            <node x="0.0" y="664.0">junit</node>
467
+            <node x="175.0" y="590.0">oracle</node>
468
+            <node x="53.0" y="368.0">MySet</node>
469
+            <node x="516.0" y="0.0">MySetTest</node>
470
+            <node x="628.0" y="664.0">org</node>
471
+            <node x="424.0" y="516.0">resources</node>
472
+            <node x="278.0" y="442.0">toolbarButtonGraphics</node>
473
+            <node x="0.0" y="0.0">MyArrayList</node>
474
+            <node x="473.0" y="664.0">sun</node>
475
+            <node x="230.0" y="516.0">META-INF</node>
476
+            <node x="0.0" y="738.0">jdk</node>
477
+            <node x="512.0" y="590.0">apple</node>
478
+            <node x="0.0" y="516.0">groovyjarjarasm</node>
479
+            <node x="317.0" y="664.0">java</node>
480
+            <node x="0.0" y="590.0">groovy</node>
481
+            <node x="677.0" y="590.0">javax</node>
482
+            <node x="0.0" y="442.0">groovyjarjarcommonscli</node>
483
+            <node x="344.0" y="590.0">javafx</node>
484
+            <node x="237.0" y="0.0">MyArrayListTest</node>
485
+            <node x="552.0" y="442.0">groovyjarjarantlr</node>
470
           </nodes>
486
           </nodes>
471
           <notes />
487
           <notes />
472
-          <edges />
473
-          <settings layout="Hierarchic Group" zoom="1.0" x="253.5" y="264.5" />
474
-          <SelectedNodes />
488
+          <edges>
489
+            <edge source="MySet" target="MyArrayList">
490
+              <point x="0.0" y="-14.5" />
491
+              <point x="0.0" y="159.0" />
492
+            </edge>
493
+          </edges>
494
+          <settings layout="Hierarchic Group" zoom="0.6381118881118881" x="-55.3191780821918" y="356.1095890410959" />
495
+          <SelectedNodes>
496
+            <node>MyArrayList</node>
497
+          </SelectedNodes>
475
           <Categories>
498
           <Categories>
476
             <Category>Constructors</Category>
499
             <Category>Constructors</Category>
500
+            <Category>Fields</Category>
477
             <Category>Methods</Category>
501
             <Category>Methods</Category>
478
             <Category>Properties</Category>
502
             <Category>Properties</Category>
479
             <Category>Inner Classes</Category>
503
             <Category>Inner Classes</Category>
483
         </state>
507
         </state>
484
       </provider>
508
       </provider>
485
     </entry>
509
     </entry>
486
-    <entry file="file://$PROJECT_DIR$/README.md">
487
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
488
-        <state split_layout="SPLIT">
489
-          <first_editor />
490
-          <second_editor />
491
-        </state>
492
-      </provider>
493
-    </entry>
494
     <entry file="uml://JAVA/MyArrayList">
510
     <entry file="uml://JAVA/MyArrayList">
495
       <provider selected="true" editor-type-id="UmlEditorProvider">
511
       <provider selected="true" editor-type-id="UmlEditorProvider">
496
         <state>
512
         <state>
497
           <ID>JAVA</ID>
513
           <ID>JAVA</ID>
498
           <OriginalElement>MyArrayList</OriginalElement>
514
           <OriginalElement>MyArrayList</OriginalElement>
499
           <nodes>
515
           <nodes>
500
-            <node x="0.0" y="0.0">MyArrayList</node>
516
+            <node x="" y="">MyArrayList</node>
501
           </nodes>
517
           </nodes>
502
           <notes />
518
           <notes />
503
           <edges />
519
           <edges />
504
-          <settings layout="Hierarchic Group" zoom="1.0" x="-164.0" y="190.0" />
520
+          <settings layout="Hierarchic Group" zoom="1.0" x="60.5" y="132.5" />
505
           <SelectedNodes />
521
           <SelectedNodes />
506
           <Categories>
522
           <Categories>
507
             <Category>Methods</Category>
523
             <Category>Methods</Category>
514
         </state>
530
         </state>
515
       </provider>
531
       </provider>
516
     </entry>
532
     </entry>
517
-    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
518
-      <provider selected="true" editor-type-id="text-editor">
519
-        <state relative-caret-position="221">
520
-          <caret line="16" selection-start-line="16" selection-end-line="16" />
533
+    <entry file="file://$PROJECT_DIR$/README.md">
534
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
535
+        <state split_layout="SPLIT">
536
+          <first_editor />
537
+          <second_editor />
521
         </state>
538
         </state>
522
       </provider>
539
       </provider>
523
     </entry>
540
     </entry>
524
-    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/Assert.class">
541
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
525
       <provider selected="true" editor-type-id="text-editor">
542
       <provider selected="true" editor-type-id="text-editor">
526
-        <state relative-caret-position="94">
527
-          <caret line="333" selection-start-line="333" selection-end-line="333" />
543
+        <state relative-caret-position="251">
544
+          <caret line="58" selection-start-line="58" selection-end-line="58" />
528
           <folding>
545
           <folding>
529
-            <element signature="e#8323#8324#0" expanded="true" />
530
-            <element signature="e#8383#8384#0" expanded="true" />
546
+            <element signature="e#67#68#0" expanded="true" />
547
+            <element signature="e#107#108#0" expanded="true" />
548
+            <element signature="e#216#217#0" expanded="true" />
549
+            <element signature="e#250#251#0" expanded="true" />
550
+            <element signature="e#1551#1552#0" expanded="true" />
551
+            <element signature="e#1596#1597#0" expanded="true" />
531
           </folding>
552
           </folding>
532
         </state>
553
         </state>
533
       </provider>
554
       </provider>
534
     </entry>
555
     </entry>
535
     <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
556
     <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
536
       <provider selected="true" editor-type-id="text-editor">
557
       <provider selected="true" editor-type-id="text-editor">
537
-        <state relative-caret-position="17">
538
-          <caret line="1" lean-forward="true" selection-start-line="1" selection-end-line="1" />
558
+        <state relative-caret-position="56">
559
+          <caret line="10" column="46" lean-forward="true" selection-start-line="10" selection-start-column="46" selection-end-line="10" selection-end-column="46" />
560
+          <folding>
561
+            <element signature="e#84#85#0" expanded="true" />
562
+            <element signature="e#128#129#0" expanded="true" />
563
+            <element signature="e#155#156#0" expanded="true" />
564
+            <element signature="e#207#208#0" expanded="true" />
565
+            <element signature="e#233#234#0" expanded="true" />
566
+            <element signature="e#272#273#0" expanded="true" />
567
+            <element signature="e#432#433#0" expanded="true" />
568
+            <element signature="e#461#462#0" expanded="true" />
569
+            <element signature="e#494#495#0" expanded="true" />
570
+            <element signature="e#524#525#0" expanded="true" />
571
+            <element signature="e#559#560#0" expanded="true" />
572
+            <element signature="e#579#580#0" expanded="true" />
573
+            <element signature="e#679#680#0" expanded="true" />
574
+            <element signature="e#706#707#0" expanded="true" />
575
+          </folding>
539
         </state>
576
         </state>
540
       </provider>
577
       </provider>
541
     </entry>
578
     </entry>
542
-    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
579
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
543
       <provider selected="true" editor-type-id="text-editor">
580
       <provider selected="true" editor-type-id="text-editor">
544
-        <state relative-caret-position="335">
545
-          <caret line="89" lean-forward="true" selection-start-line="89" selection-end-line="89" />
581
+        <state relative-caret-position="109">
582
+          <caret line="11" column="66" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="66" />
546
           <folding>
583
           <folding>
547
-            <element signature="e#67#68#0" expanded="true" />
548
-            <element signature="e#107#108#0" expanded="true" />
549
-            <element signature="e#216#217#0" expanded="true" />
550
-            <element signature="e#250#251#0" expanded="true" />
551
-            <element signature="e#1551#1552#0" expanded="true" />
552
-            <element signature="e#1596#1597#0" expanded="true" />
584
+            <element signature="imports" expanded="true" />
553
           </folding>
585
           </folding>
554
         </state>
586
         </state>
555
       </provider>
587
       </provider>
556
     </entry>
588
     </entry>
557
-    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
589
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
558
       <provider selected="true" editor-type-id="text-editor">
590
       <provider selected="true" editor-type-id="text-editor">
559
-        <state relative-caret-position="148">
560
-          <caret line="129" column="82" lean-forward="true" selection-start-line="129" selection-start-column="82" selection-end-line="129" selection-end-column="82" />
591
+        <state relative-caret-position="248">
592
+          <caret line="55" column="29" selection-start-line="55" selection-start-column="29" selection-end-line="55" selection-end-column="29" />
561
           <folding>
593
           <folding>
562
             <element signature="imports" expanded="true" />
594
             <element signature="imports" expanded="true" />
563
-            <element signature="e#282#291#0" expanded="true" />
595
+            <element signature="e#210#219#0" expanded="true" />
564
           </folding>
596
           </folding>
565
         </state>
597
         </state>
566
       </provider>
598
       </provider>

+ 0
- 7
src/main/java/MyArrayList.java View File

71
 
71
 
72
         public void add(int index, T elementToAdd) {
72
         public void add(int index, T elementToAdd) {
73
             T[] newArray = (T[]) new Object[theArray.length + 1];
73
             T[] newArray = (T[]) new Object[theArray.length + 1];
74
-//            int track = 0;
75
             for (int i = 0; i < theArray.length; i++) {
74
             for (int i = 0; i < theArray.length; i++) {
76
                 newArray[i] = theArray[i];
75
                 newArray[i] = theArray[i];
77
                 if (i == index) {
76
                 if (i == index) {
79
                     i = i+1;
78
                     i = i+1;
80
                 }
79
                 }
81
             }
80
             }
82
-//                if (i == index) {
83
-//                    newArray[track] = elementToAdd;
84
-//                }
85
-//                newArray[track] = theArray[i];
86
-//                track++;
87
-//            }
88
         }
81
         }
89
 }
82
 }

+ 43
- 1
src/main/java/MySet.java View File

1
-public class MySet <T, E> extends MyArrayList {
1
+
2
+public class MySet <T> {
3
+
4
+    MyArrayList <T> mySet;
5
+
6
+    public MySet() {
7
+        mySet = new MyArrayList<>();
8
+    }
9
+
10
+    public MySet(T [] array) {
11
+        this.mySet = new MyArrayList<>(array);
12
+    }
13
+
14
+    public T get(int index) {
15
+        return mySet.get(index);
16
+    }
17
+
18
+    public void add(T elementToAdd) {
19
+        if(!mySet.contains(elementToAdd)) {
20
+            mySet.add(elementToAdd);
21
+        }
22
+    }
23
+
24
+    public void clear() {
25
+        this.mySet.clear();
26
+    }
27
+
28
+    public boolean isEmpty() {
29
+        return this.mySet.isEmpty();
30
+    }
31
+
32
+    public boolean contains(T elementToCheck) {
33
+        return this.mySet.contains(elementToCheck);
34
+    }
35
+
36
+    public int size() {
37
+        return mySet.size();
38
+    }
39
+
40
+//    public int size() {
41
+//        return this.mySet.size();
42
+//    }
2
 
43
 
3
 }
44
 }
45
+

+ 71
- 0
src/test/java/MySetTest.java View File

1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+public class MySetTest {
5
+
6
+    @Test
7
+    public void addTest() {
8
+        //given
9
+        Integer [] numbers = {1, 2, 3};
10
+        MySet <Integer> mySet = new MySet<Integer>(numbers);
11
+        int expected = 3;
12
+        //when
13
+        mySet.add(1);
14
+        mySet.add(1);
15
+        int actual = mySet.size();
16
+        //then
17
+        Assert.assertEquals(expected, actual);
18
+    }
19
+
20
+    @Test
21
+    public void getTest() {
22
+        //given
23
+        Integer [] numbers = {1, 2, 3};
24
+        MySet <Integer> mySet = new MySet<>(numbers);
25
+        mySet.add(1);
26
+        mySet.add(2);
27
+        mySet.add(4);
28
+        int expected = 4;
29
+        //when
30
+        int actual = mySet.get(3);
31
+        //then
32
+        Assert.assertEquals(expected, actual);
33
+    }
34
+
35
+    @Test
36
+    public void clearTest() {
37
+        //given
38
+        Integer [] numbers = {1, 2, 3};
39
+        MySet<Integer> mySet = new MySet<>(numbers);
40
+        //when
41
+        mySet.clear();
42
+        //then
43
+        
44
+
45
+    }
46
+
47
+    @Test
48
+    public void isEmptyTest() {
49
+    }
50
+
51
+    @Test
52
+    public void containsTest() {
53
+    }
54
+
55
+    @Test
56
+    public void sizeTest() {
57
+        //given
58
+        String [] wordies = {"I", "almost", "threw", "my", "computer", "out", "the", "window"};
59
+        MySet<String> wordsSet = new MySet<>(wordies);
60
+        wordsSet.add("but");
61
+        wordsSet.add("nah");
62
+        int expected = 10;
63
+        //when
64
+        int actual = wordsSet.size();
65
+        //then
66
+        Assert.assertEquals(expected, actual);
67
+    }
68
+
69
+
70
+
71
+}