浏览代码

prepared for student cloning

Leon 6 年前
父节点
当前提交
b7f26e8f92

+ 166
- 179
.idea/workspace.xml 查看文件

@@ -2,25 +2,12 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="268ab437-e0d5-4447-8401-9f321aad6d50" name="Default" comment="">
5
-      <change afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerToStringTest.java" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
5
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java" afterDir="false" />
7 6
       <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java" afterDir="false" />
8 7
       <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java" afterDir="false" />
9
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Butter.java" beforeDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Eggs.java" beforeDir="false" />
11
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Milk.java" beforeDir="false" />
12
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Product.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java" afterDir="false" />
13
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ConsoleTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ConsoleTest.java" afterDir="false" />
14
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ProductTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ProductTest.java" afterDir="false" />
15
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/AddTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryAddTest.java" afterDir="false" />
16
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/ConstructorTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryConstructorTest.java" afterDir="false" />
17
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/FindByIdTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryFindByIdTest.java" afterDir="false" />
18
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/GetQuantity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryGetQuantityTest.java" afterDir="false" />
19
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/GetTotalValueTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryGetTotalValueTest.java" afterDir="false" />
20
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/RemoveTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryRemoveTest.java" afterDir="false" />
21
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/AddTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerAddTest.java" afterDir="false" />
22
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/ConstructorTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerConstructorTest.java" afterDir="false" />
23
-      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/RemoveTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerRemoveTest.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java" afterDir="false" />
24 11
     </list>
25 12
     <ignored path="$PROJECT_DIR$/out/" />
26 13
     <ignored path="$PROJECT_DIR$/target/" />
@@ -33,11 +20,11 @@
33 20
   </component>
34 21
   <component name="FileEditorManager">
35 22
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
36
-      <file leaf-file-name="InventoryManagerToStringTest.java" pinned="false" current-in-tab="true">
37
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerToStringTest.java">
23
+      <file leaf-file-name="InventoryToStringTest.java" pinned="false" current-in-tab="false">
24
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryToStringTest.java">
38 25
           <provider selected="true" editor-type-id="text-editor">
39
-            <state relative-caret-position="315">
40
-              <caret line="22" column="36" selection-start-line="22" selection-start-column="36" selection-end-line="22" selection-end-column="36" />
26
+            <state relative-caret-position="165">
27
+              <caret line="11" column="16" selection-start-line="11" selection-start-column="16" selection-end-line="11" selection-end-column="16" />
41 28
               <folding>
42 29
                 <element signature="imports" expanded="true" />
43 30
               </folding>
@@ -45,47 +32,38 @@
45 32
           </provider>
46 33
         </entry>
47 34
       </file>
48
-      <file leaf-file-name="InventoryManagerConstructorTest.java" pinned="false" current-in-tab="false">
49
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerConstructorTest.java">
35
+      <file leaf-file-name="MainApplication.java" pinned="false" current-in-tab="true">
36
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java">
50 37
           <provider selected="true" editor-type-id="text-editor">
51
-            <state relative-caret-position="165">
52
-              <caret line="11" column="44" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="44" />
53
-              <folding>
54
-                <element signature="imports" expanded="true" />
55
-              </folding>
38
+            <state relative-caret-position="135">
39
+              <caret line="9" column="39" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" />
56 40
             </state>
57 41
           </provider>
58 42
         </entry>
59 43
       </file>
60
-      <file leaf-file-name="InventoryManagerAddTest.java" pinned="false" current-in-tab="false">
61
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerAddTest.java">
44
+      <file leaf-file-name="Inventory.java" pinned="false" current-in-tab="false">
45
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java">
62 46
           <provider selected="true" editor-type-id="text-editor">
63
-            <state relative-caret-position="165">
64
-              <caret line="12" column="29" selection-start-line="12" selection-start-column="29" selection-end-line="12" selection-end-column="29" />
65
-              <folding>
66
-                <element signature="imports" expanded="true" />
67
-              </folding>
47
+            <state relative-caret-position="690">
48
+              <caret line="46" column="20" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
68 49
             </state>
69 50
           </provider>
70 51
         </entry>
71 52
       </file>
72
-      <file leaf-file-name="InventoryFindByIdTest.java" pinned="false" current-in-tab="false">
73
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryFindByIdTest.java">
53
+      <file leaf-file-name="Product.java" pinned="false" current-in-tab="false">
54
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java">
74 55
           <provider selected="true" editor-type-id="text-editor">
75
-            <state relative-caret-position="120">
76
-              <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
77
-              <folding>
78
-                <element signature="imports" expanded="true" />
79
-              </folding>
56
+            <state relative-caret-position="414">
57
+              <caret line="36" column="20" selection-start-line="36" selection-start-column="20" selection-end-line="36" selection-end-column="20" />
80 58
             </state>
81 59
           </provider>
82 60
         </entry>
83 61
       </file>
84
-      <file leaf-file-name="InventoryGetQuantityTest.java" pinned="false" current-in-tab="false">
85
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryGetQuantityTest.java">
62
+      <file leaf-file-name="Console.java" pinned="false" current-in-tab="false">
63
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java">
86 64
           <provider selected="true" editor-type-id="text-editor">
87
-            <state relative-caret-position="120">
88
-              <caret line="8" column="37" selection-start-line="8" selection-start-column="37" selection-end-line="8" selection-end-column="37" />
65
+            <state relative-caret-position="444">
66
+              <caret line="36" lean-forward="true" selection-start-line="36" selection-end-line="36" />
89 67
               <folding>
90 68
                 <element signature="imports" expanded="true" />
91 69
               </folding>
@@ -93,11 +71,11 @@
93 71
           </provider>
94 72
         </entry>
95 73
       </file>
96
-      <file leaf-file-name="InventoryGetTotalValueTest.java" pinned="false" current-in-tab="false">
97
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryGetTotalValueTest.java">
74
+      <file leaf-file-name="MockConsole.java" pinned="false" current-in-tab="false">
75
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java">
98 76
           <provider selected="true" editor-type-id="text-editor">
99
-            <state relative-caret-position="120">
100
-              <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
77
+            <state relative-caret-position="105">
78
+              <caret line="7" column="3" selection-start-line="7" selection-start-column="3" selection-end-line="7" selection-end-column="69" />
101 79
               <folding>
102 80
                 <element signature="imports" expanded="true" />
103 81
               </folding>
@@ -105,23 +83,20 @@
105 83
           </provider>
106 84
         </entry>
107 85
       </file>
108
-      <file leaf-file-name="InventoryRemoveTest.java" pinned="false" current-in-tab="false">
109
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryRemoveTest.java">
86
+      <file leaf-file-name="InventoryManager.java" pinned="false" current-in-tab="false">
87
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java">
110 88
           <provider selected="true" editor-type-id="text-editor">
111
-            <state relative-caret-position="120">
112
-              <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
113
-              <folding>
114
-                <element signature="imports" expanded="true" />
115
-              </folding>
89
+            <state relative-caret-position="-303">
90
+              <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
116 91
             </state>
117 92
           </provider>
118 93
         </entry>
119 94
       </file>
120
-      <file leaf-file-name="InventoryManagerRemoveTest.java" pinned="false" current-in-tab="false">
121
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerRemoveTest.java">
95
+      <file leaf-file-name="InventoryManagerConstructorTest.java" pinned="false" current-in-tab="false">
96
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerConstructorTest.java">
122 97
           <provider selected="true" editor-type-id="text-editor">
123
-            <state relative-caret-position="114">
124
-              <caret line="13" column="39" selection-start-line="13" selection-start-column="39" selection-end-line="13" selection-end-column="39" />
98
+            <state relative-caret-position="165">
99
+              <caret line="11" column="44" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="44" />
125 100
               <folding>
126 101
                 <element signature="imports" expanded="true" />
127 102
               </folding>
@@ -129,11 +104,11 @@
129 104
           </provider>
130 105
         </entry>
131 106
       </file>
132
-      <file leaf-file-name="InventoryAddTest.java" pinned="false" current-in-tab="false">
133
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryAddTest.java">
107
+      <file leaf-file-name="InventoryManagerAddTest.java" pinned="false" current-in-tab="false">
108
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerAddTest.java">
134 109
           <provider selected="true" editor-type-id="text-editor">
135
-            <state relative-caret-position="120">
136
-              <caret line="8" column="13" lean-forward="true" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="22" />
110
+            <state relative-caret-position="165">
111
+              <caret line="12" column="29" selection-start-line="12" selection-start-column="29" selection-end-line="12" selection-end-column="29" />
137 112
               <folding>
138 113
                 <element signature="imports" expanded="true" />
139 114
               </folding>
@@ -141,11 +116,11 @@
141 116
           </provider>
142 117
         </entry>
143 118
       </file>
144
-      <file leaf-file-name="InventoryConstructorTest.java" pinned="false" current-in-tab="false">
145
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryConstructorTest.java">
119
+      <file leaf-file-name="InventoryRemoveTest.java" pinned="false" current-in-tab="false">
120
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryRemoveTest.java">
146 121
           <provider selected="true" editor-type-id="text-editor">
147
-            <state relative-caret-position="177">
148
-              <caret line="12" column="22" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" />
122
+            <state relative-caret-position="120">
123
+              <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
149 124
               <folding>
150 125
                 <element signature="imports" expanded="true" />
151 126
               </folding>
@@ -187,12 +162,9 @@
187 162
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/inventory/InventoryManager.java" />
188 163
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Milk.java" />
189 164
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Eggs.java" />
190
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java" />
191 165
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/products/Product.java" />
192 166
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ProductTest.java" />
193 167
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ConsoleTest.java" />
194
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java" />
195
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java" />
196 168
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/ToStringTest.java" />
197 169
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/ConstructorTest.java" />
198 170
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerConstructorTest.java" />
@@ -214,6 +186,14 @@
214 186
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/RemoveTest.java" />
215 187
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryRemoveTest.java" />
216 188
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerToStringTest.java" />
189
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryToStringTest.java" />
190
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryToStringTest.java" />
191
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java" />
192
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java" />
193
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java" />
194
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java" />
195
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java" />
196
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java" />
217 197
       </list>
218 198
     </option>
219 199
   </component>
@@ -304,6 +284,17 @@
304 284
               <item name="CR-MesoLabs-Inheritance-ProductManager" type="b2602c69:ProjectViewProjectNode" />
305 285
               <item name="CR-MesoLabs-Inheritance-ProductManager" type="462c0819:PsiDirectoryNode" />
306 286
               <item name="src" type="462c0819:PsiDirectoryNode" />
287
+              <item name="main" type="462c0819:PsiDirectoryNode" />
288
+              <item name="java" type="462c0819:PsiDirectoryNode" />
289
+              <item name="com" type="462c0819:PsiDirectoryNode" />
290
+              <item name="zipcodewilmington" type="462c0819:PsiDirectoryNode" />
291
+              <item name="productmanager" type="462c0819:PsiDirectoryNode" />
292
+              <item name="utils" type="462c0819:PsiDirectoryNode" />
293
+            </path>
294
+            <path>
295
+              <item name="CR-MesoLabs-Inheritance-ProductManager" type="b2602c69:ProjectViewProjectNode" />
296
+              <item name="CR-MesoLabs-Inheritance-ProductManager" type="462c0819:PsiDirectoryNode" />
297
+              <item name="src" type="462c0819:PsiDirectoryNode" />
307 298
               <item name="test" type="462c0819:PsiDirectoryNode" />
308 299
             </path>
309 300
             <path>
@@ -349,6 +340,17 @@
349 340
               <item name="com" type="462c0819:PsiDirectoryNode" />
350 341
               <item name="zipcodewilmington" type="462c0819:PsiDirectoryNode" />
351 342
               <item name="productmanager" type="462c0819:PsiDirectoryNode" />
343
+              <item name="inventory" type="462c0819:PsiDirectoryNode" />
344
+            </path>
345
+            <path>
346
+              <item name="CR-MesoLabs-Inheritance-ProductManager" type="b2602c69:ProjectViewProjectNode" />
347
+              <item name="CR-MesoLabs-Inheritance-ProductManager" type="462c0819:PsiDirectoryNode" />
348
+              <item name="src" type="462c0819:PsiDirectoryNode" />
349
+              <item name="test" type="462c0819:PsiDirectoryNode" />
350
+              <item name="java" type="462c0819:PsiDirectoryNode" />
351
+              <item name="com" type="462c0819:PsiDirectoryNode" />
352
+              <item name="zipcodewilmington" type="462c0819:PsiDirectoryNode" />
353
+              <item name="productmanager" type="462c0819:PsiDirectoryNode" />
352 354
               <item name="inventorymanager" type="462c0819:PsiDirectoryNode" />
353 355
             </path>
354 356
           </expand>
@@ -387,10 +389,21 @@
387 389
       </list>
388 390
     </option>
389 391
   </component>
390
-  <component name="RunManager" selected="JUnit.InventoryManagerToStringTest.toStringTest2">
392
+  <component name="RunManager" selected="JUnit.com.zipcodewilmington in productmanager">
391 393
     <configuration default="true" type="Applet" factoryName="Applet">
392 394
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
393 395
     </configuration>
396
+    <configuration name="MainApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
397
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.productmanager.MainApplication" />
398
+      <module name="productmanager" />
399
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
400
+      <extension name="coverage">
401
+        <pattern>
402
+          <option name="PATTERN" value="com.zipcodewilmington.productmanager.*" />
403
+          <option name="ENABLED" value="true" />
404
+        </pattern>
405
+      </extension>
406
+    </configuration>
394 407
     <configuration default="true" type="Application" factoryName="Application">
395 408
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
396 409
     </configuration>
@@ -398,7 +411,7 @@
398 411
       <module name="productmanager" />
399 412
       <extension name="coverage">
400 413
         <pattern>
401
-          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventorymanager.*" />
414
+          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventory.*" />
402 415
           <option name="ENABLED" value="true" />
403 416
         </pattern>
404 417
       </extension>
@@ -417,18 +430,18 @@
417 430
       </option>
418 431
       <patterns />
419 432
     </configuration>
420
-    <configuration name="InventoryManagerToStringTest.toStringTest1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
433
+    <configuration name="InventoryToStringTest.toStringTest1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
421 434
       <module name="productmanager" />
422 435
       <extension name="coverage">
423 436
         <pattern>
424
-          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventorymanager.*" />
437
+          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventory.*" />
425 438
           <option name="ENABLED" value="true" />
426 439
         </pattern>
427 440
       </extension>
428 441
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
429 442
       <option name="ALTERNATIVE_JRE_PATH" />
430
-      <option name="PACKAGE_NAME" value="com.zipcodewilmington.productmanager.inventorymanager" />
431
-      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.productmanager.inventorymanager.InventoryManagerToStringTest" />
443
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.productmanager.inventory" />
444
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.productmanager.inventory.InventoryToStringTest" />
432 445
       <option name="METHOD_NAME" value="toStringTest1" />
433 446
       <option name="TEST_OBJECT" value="method" />
434 447
       <option name="VM_PARAMETERS" value="-ea" />
@@ -440,18 +453,18 @@
440 453
       </option>
441 454
       <patterns />
442 455
     </configuration>
443
-    <configuration name="InventoryManagerToStringTest.toStringTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
456
+    <configuration name="InventoryToStringTest.toStringTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
444 457
       <module name="productmanager" />
445 458
       <extension name="coverage">
446 459
         <pattern>
447
-          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventorymanager.*" />
460
+          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventory.*" />
448 461
           <option name="ENABLED" value="true" />
449 462
         </pattern>
450 463
       </extension>
451 464
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
452 465
       <option name="ALTERNATIVE_JRE_PATH" />
453
-      <option name="PACKAGE_NAME" value="com.zipcodewilmington.productmanager.inventorymanager" />
454
-      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.productmanager.inventorymanager.InventoryManagerToStringTest" />
466
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.productmanager.inventory" />
467
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.productmanager.inventory.InventoryToStringTest" />
455 468
       <option name="METHOD_NAME" value="toStringTest2" />
456 469
       <option name="TEST_OBJECT" value="method" />
457 470
       <option name="VM_PARAMETERS" value="-ea" />
@@ -525,29 +538,6 @@
525 538
       </option>
526 539
       <patterns />
527 540
     </configuration>
528
-    <configuration name="com.zipcodewilmington.productmanager.inventory in productmanager" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
529
-      <module name="productmanager" />
530
-      <extension name="coverage">
531
-        <pattern>
532
-          <option name="PATTERN" value="com.zipcodewilmington.productmanager.inventory.*" />
533
-          <option name="ENABLED" value="true" />
534
-        </pattern>
535
-      </extension>
536
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
537
-      <option name="ALTERNATIVE_JRE_PATH" />
538
-      <option name="PACKAGE_NAME" value="com.zipcodewilmington.productmanager.inventory" />
539
-      <option name="MAIN_CLASS_NAME" />
540
-      <option name="METHOD_NAME" />
541
-      <option name="TEST_OBJECT" value="package" />
542
-      <option name="VM_PARAMETERS" value="-ea" />
543
-      <option name="PARAMETERS" />
544
-      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
545
-      <option name="PASS_PARENT_ENVS" value="true" />
546
-      <option name="TEST_SEARCH_SCOPE">
547
-        <value defaultName="singleModule" />
548
-      </option>
549
-      <patterns />
550
-    </configuration>
551 541
     <configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
552 542
       <module name="bankaccountlab" />
553 543
       <option name="VM_PARAMETERS" />
@@ -622,18 +612,18 @@
622 612
     </configuration>
623 613
     <list>
624 614
       <item itemvalue="JUnit.com.zipcodewilmington in productmanager" />
625
-      <item itemvalue="JUnit.com.zipcodewilmington.productmanager.inventory in productmanager" />
626 615
       <item itemvalue="JUnit.InventoryManagerRemoveTest.removeTest" />
627
-      <item itemvalue="JUnit.InventoryManagerToStringTest.toStringTest1" />
628
-      <item itemvalue="JUnit.InventoryManagerToStringTest.toStringTest2" />
616
+      <item itemvalue="JUnit.InventoryToStringTest.toStringTest1" />
617
+      <item itemvalue="JUnit.InventoryToStringTest.toStringTest2" />
618
+      <item itemvalue="Application.MainApplication" />
629 619
     </list>
630 620
     <recent_temporary>
631 621
       <list>
632
-        <item itemvalue="JUnit.InventoryManagerToStringTest.toStringTest2" />
633
-        <item itemvalue="JUnit.InventoryManagerToStringTest.toStringTest1" />
634 622
         <item itemvalue="JUnit.com.zipcodewilmington in productmanager" />
623
+        <item itemvalue="Application.MainApplication" />
624
+        <item itemvalue="JUnit.InventoryToStringTest.toStringTest2" />
625
+        <item itemvalue="JUnit.InventoryToStringTest.toStringTest1" />
635 626
         <item itemvalue="JUnit.InventoryManagerRemoveTest.removeTest" />
636
-        <item itemvalue="JUnit.com.zipcodewilmington.productmanager.inventory in productmanager" />
637 627
       </list>
638 628
     </recent_temporary>
639 629
   </component>
@@ -647,23 +637,11 @@
647 637
       <option name="number" value="Default" />
648 638
       <option name="presentableId" value="Default" />
649 639
       <updated>1515620835041</updated>
650
-      <workItem from="1542298993587" duration="6446000" />
640
+      <workItem from="1542298993587" duration="6946000" />
651 641
     </task>
652 642
     <servers />
653 643
   </component>
654 644
   <component name="TestHistory">
655
-    <history-entry file="com_zipcodewilmington_productmanager_in_productmanager - 2018.11.15 at 13h 01m 35s.xml">
656
-      <configuration name="com.zipcodewilmington.productmanager in productmanager" configurationId="JUnit" />
657
-    </history-entry>
658
-    <history-entry file="com_zipcodewilmington_in_productmanager - 2018.11.15 at 13h 02m 10s.xml">
659
-      <configuration name="com.zipcodewilmington in productmanager" configurationId="JUnit" />
660
-    </history-entry>
661
-    <history-entry file="com_zipcodewilmington_productmanager_inventorymanager_in_productmanager - 2018.11.15 at 13h 08m 53s.xml">
662
-      <configuration name="com.zipcodewilmington.productmanager.inventorymanager in productmanager" configurationId="JUnit" />
663
-    </history-entry>
664
-    <history-entry file="com_zipcodewilmington_productmanager_inventory_in_productmanager - 2018.11.15 at 13h 09m 00s.xml">
665
-      <configuration name="com.zipcodewilmington.productmanager.inventory in productmanager" configurationId="JUnit" />
666
-    </history-entry>
667 645
     <history-entry file="com_zipcodewilmington_in_productmanager - 2018.11.15 at 13h 09m 06s.xml">
668 646
       <configuration name="com.zipcodewilmington in productmanager" configurationId="JUnit" />
669 647
     </history-entry>
@@ -682,9 +660,21 @@
682 660
     <history-entry file="com_zipcodewilmington_in_productmanager - 2018.11.15 at 13h 11m 56s.xml">
683 661
       <configuration name="com.zipcodewilmington in productmanager" configurationId="JUnit" />
684 662
     </history-entry>
663
+    <history-entry file="InventoryManagerToStringTest_toStringTest1 - 2018.11.15 at 13h 18m 10s.xml">
664
+      <configuration name="InventoryManagerToStringTest.toStringTest1" configurationId="JUnit" />
665
+    </history-entry>
666
+    <history-entry file="InventoryManagerToStringTest_toStringTest1 - 2018.11.15 at 13h 18m 33s.xml">
667
+      <configuration name="InventoryManagerToStringTest.toStringTest1" configurationId="JUnit" />
668
+    </history-entry>
669
+    <history-entry file="InventoryManagerToStringTest_toStringTest1 - 2018.11.15 at 13h 19m 40s.xml">
670
+      <configuration name="InventoryManagerToStringTest.toStringTest1" configurationId="JUnit" />
671
+    </history-entry>
672
+    <history-entry file="InventoryManagerToStringTest_toStringTest2 - 2018.11.15 at 13h 19m 44s.xml">
673
+      <configuration name="InventoryManagerToStringTest.toStringTest2" configurationId="JUnit" />
674
+    </history-entry>
685 675
   </component>
686 676
   <component name="TimeTrackingManager">
687
-    <option name="totallyTimeSpent" value="6446000" />
677
+    <option name="totallyTimeSpent" value="6946000" />
688 678
   </component>
689 679
   <component name="ToolWindowManager">
690 680
     <frame x="0" y="23" width="1440" height="873" extended-state="6" />
@@ -808,33 +798,6 @@
808 798
         </state>
809 799
       </provider>
810 800
     </entry>
811
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java">
812
-      <provider selected="true" editor-type-id="text-editor">
813
-        <state relative-caret-position="120">
814
-          <caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
815
-          <folding>
816
-            <element signature="imports" expanded="true" />
817
-          </folding>
818
-        </state>
819
-      </provider>
820
-    </entry>
821
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java">
822
-      <provider selected="true" editor-type-id="text-editor">
823
-        <state relative-caret-position="309">
824
-          <caret line="35" selection-start-line="35" selection-end-line="35" />
825
-          <folding>
826
-            <element signature="imports" expanded="true" />
827
-          </folding>
828
-        </state>
829
-      </provider>
830
-    </entry>
831
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java">
832
-      <provider selected="true" editor-type-id="text-editor">
833
-        <state relative-caret-position="279">
834
-          <caret line="44" column="18" selection-start-line="44" selection-start-column="18" selection-end-line="44" selection-end-column="18" />
835
-        </state>
836
-      </provider>
837
-    </entry>
838 801
     <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/src.zip!/java/lang/Object.java">
839 802
       <provider selected="true" editor-type-id="text-editor">
840 803
         <state relative-caret-position="178">
@@ -880,13 +843,6 @@
880 843
         </state>
881 844
       </provider>
882 845
     </entry>
883
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java">
884
-      <provider selected="true" editor-type-id="text-editor">
885
-        <state relative-caret-position="60">
886
-          <caret line="4" column="3" selection-start-line="4" selection-start-column="3" selection-end-line="4" selection-end-column="3" />
887
-        </state>
888
-      </provider>
889
-    </entry>
890 846
     <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/ConsoleTest.java">
891 847
       <provider selected="true" editor-type-id="text-editor">
892 848
         <state relative-caret-position="294">
@@ -897,23 +853,6 @@
897 853
         </state>
898 854
       </provider>
899 855
     </entry>
900
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java">
901
-      <provider selected="true" editor-type-id="text-editor">
902
-        <state relative-caret-position="219">
903
-          <caret line="35" lean-forward="true" selection-start-line="35" selection-end-line="35" />
904
-        </state>
905
-      </provider>
906
-    </entry>
907
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java">
908
-      <provider selected="true" editor-type-id="text-editor">
909
-        <state relative-caret-position="617">
910
-          <caret line="75" selection-start-line="75" selection-end-line="75" />
911
-          <folding>
912
-            <element signature="imports" expanded="true" />
913
-          </folding>
914
-        </state>
915
-      </provider>
916
-    </entry>
917 856
     <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerRemoveTest.java">
918 857
       <provider selected="true" editor-type-id="text-editor">
919 858
         <state relative-caret-position="114">
@@ -1004,15 +943,63 @@
1004 943
         </state>
1005 944
       </provider>
1006 945
     </entry>
1007
-    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventorymanager/InventoryManagerToStringTest.java">
946
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/productmanager/inventory/InventoryToStringTest.java">
947
+      <provider selected="true" editor-type-id="text-editor">
948
+        <state relative-caret-position="165">
949
+          <caret line="11" column="16" selection-start-line="11" selection-start-column="16" selection-end-line="11" selection-end-column="16" />
950
+          <folding>
951
+            <element signature="imports" expanded="true" />
952
+          </folding>
953
+        </state>
954
+      </provider>
955
+    </entry>
956
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java">
957
+      <provider selected="true" editor-type-id="text-editor">
958
+        <state relative-caret-position="690">
959
+          <caret line="46" column="20" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
960
+        </state>
961
+      </provider>
962
+    </entry>
963
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java">
964
+      <provider selected="true" editor-type-id="text-editor">
965
+        <state relative-caret-position="-303">
966
+          <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
967
+        </state>
968
+      </provider>
969
+    </entry>
970
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java">
971
+      <provider selected="true" editor-type-id="text-editor">
972
+        <state relative-caret-position="414">
973
+          <caret line="36" column="20" selection-start-line="36" selection-start-column="20" selection-end-line="36" selection-end-column="20" />
974
+        </state>
975
+      </provider>
976
+    </entry>
977
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/Console.java">
978
+      <provider selected="true" editor-type-id="text-editor">
979
+        <state relative-caret-position="444">
980
+          <caret line="36" lean-forward="true" selection-start-line="36" selection-end-line="36" />
981
+          <folding>
982
+            <element signature="imports" expanded="true" />
983
+          </folding>
984
+        </state>
985
+      </provider>
986
+    </entry>
987
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java">
1008 988
       <provider selected="true" editor-type-id="text-editor">
1009
-        <state relative-caret-position="315">
1010
-          <caret line="22" column="36" selection-start-line="22" selection-start-column="36" selection-end-line="22" selection-end-column="36" />
989
+        <state relative-caret-position="105">
990
+          <caret line="7" column="3" selection-start-line="7" selection-start-column="3" selection-end-line="7" selection-end-column="69" />
1011 991
           <folding>
1012 992
             <element signature="imports" expanded="true" />
1013 993
           </folding>
1014 994
         </state>
1015 995
       </provider>
1016 996
     </entry>
997
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/productmanager/MainApplication.java">
998
+      <provider selected="true" editor-type-id="text-editor">
999
+        <state relative-caret-position="135">
1000
+          <caret line="9" column="39" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" />
1001
+        </state>
1002
+      </provider>
1003
+    </entry>
1017 1004
   </component>
1018 1005
 </project>

+ 5
- 0
src/main/java/com/zipcodewilmington/productmanager/MainApplication.java 查看文件

@@ -1,7 +1,12 @@
1 1
 package com.zipcodewilmington.productmanager;
2 2
 
3
+import com.zipcodewilmington.productmanager.inventory.InventoryManager;
4
+
3 5
 /**
4 6
  * Created by leon on 1/10/18.
5 7
  */
6 8
 public class MainApplication {
9
+    public static void main(String[] args) {
10
+        new InventoryManager().start();
11
+    }
7 12
 }

+ 6
- 32
src/main/java/com/zipcodewilmington/productmanager/inventory/Inventory.java 查看文件

@@ -1,75 +1,49 @@
1 1
 package com.zipcodewilmington.productmanager.inventory;
2 2
 
3
-import java.util.ArrayList;
4 3
 import java.util.List;
5
-import java.util.NoSuchElementException;
6 4
 
7 5
 /**
8 6
  * @author leon on 15/11/2018.
9 7
  */
10 8
 public class Inventory {
11
-    private List<Product> productList;
12 9
 
13 10
     public Inventory(List<Product> productList) {
14
-        this.productList = productList;
15 11
     }
16 12
 
17 13
     public Inventory() {
18
-        this(new ArrayList<>());
19 14
     }
20 15
 
21 16
     public void add(Product product) {
22
-        productList.add(product);
23 17
     }
24 18
 
25 19
     public List<Product> getProductList() {
26
-        return productList;
20
+        return null;
27 21
     }
28 22
 
29 23
     public Boolean contains(Product product) {
30
-        return productList.contains(product);
24
+        return null;
31 25
     }
32 26
 
33 27
     public Product findById(Long id) {
34
-        try {
35
-            return productList
36
-                    .stream()
37
-                    .filter(product -> product.getId().equals(id))
38
-                    .findFirst()
39
-                    .get();
40
-        } catch(NoSuchElementException nsee) {
41
-            return null;
42
-        }
28
+        return null;
43 29
     }
44 30
 
45 31
     public Integer getTotalQuantity() {
46
-        Integer total = 0;
47
-        for(Product p : productList) {
48
-            total += p.getQuantity();
49
-        }
50
-        return total;
32
+        return null;
51 33
     }
52 34
 
53 35
     public Double getTotalValue() {
54
-        Double total = 0.0;
55
-        for(Product p : productList) {
56
-            total += p.getQuantity() * p.getPrice();
57
-        }
58
-        return total;
36
+        return null;
59 37
     }
60 38
 
61 39
     public void remove(Product product) {
62
-        productList.remove(product);
63 40
     }
64 41
 
65 42
     public void removeById(Long id) {
66
-        remove(findById(id));
67 43
     }
68 44
 
69 45
     @Override
70 46
     public String toString() {
71
-        return "Inventory{" +
72
-                "productList=" + productList +
73
-                '}';
47
+        return null;
74 48
     }
75 49
 }

+ 28
- 53
src/main/java/com/zipcodewilmington/productmanager/inventory/InventoryManager.java 查看文件

@@ -6,90 +6,65 @@ import com.zipcodewilmington.productmanager.utils.Console;
6 6
  * @author leon on 15/11/2018.
7 7
  */
8 8
 public class InventoryManager {
9
-    private Inventory inventory;
10
-    private Console console;
11
-
12 9
     public InventoryManager() {
13
-        this(new Inventory(), new Console());
14 10
     }
15 11
 
16 12
     public InventoryManager(Inventory inventory, Console console) {
17
-        this.inventory = inventory;
18
-        this.console = console;
19 13
     }
20 14
 
21
-    public void welcome() {
22
-        String userInput = console.getStringInput(new StringBuilder()
23
-                .append("Welcome to the inventory manager!")
24
-                .append("\nFrom here you can select any of the following options:")
25
-                .append("\n\t[ add ] a product to the inventory")
26
-                .append("\n\t[ remove ] a product from the inventory")
27
-                .append("\n\t[ view inventory ] the inventory")
28
-                .append("\n\t[ view product ] in the inventory")
29
-                .append("\n\t[ exit ] the inventory manager")
30
-                .toString());
31
-
32
-        switch (userInput.toLowerCase()) {
33
-            case "add":
34
-                add();
35
-                break;
36
-
37
-            case "remove":
38
-                remove();
39
-                break;
40
-
41
-            case "view inventory":
42
-                viewInventory();
43
-                break;
44
-
45
-            case "view product":
46
-                viewProduct();
47
-                break;
48
-
49
-            case "exit":
50
-                return;
15
+    public void start() {
16
+        while (true) {
17
+            switch (getUserInput().toLowerCase()) {
18
+                case "add":
19
+                    add();
20
+                    break;
21
+
22
+                case "remove":
23
+                    remove();
24
+                    break;
25
+
26
+                case "view inventory":
27
+                    viewInventory();
28
+                    break;
29
+
30
+                case "view product":
31
+                    viewProduct();
32
+                    break;
33
+
34
+                case "exit":
35
+                    return;
36
+            }
51 37
         }
52 38
     }
53 39
 
40
+    public String getUserInput() {
41
+        return null;
42
+    }
43
+
54 44
     public void add() {
55
-        console.println("Adding an item to the inventory");
56
-        Long id = console.getLongInput("What is the id of the item?");
57
-        Double price = console.getDoubleInput("What is the price of the item?");
58
-        Integer quantity = console.getIntegerInput("What is the quantity of the item?");
59
-        inventory.add(new Product(id, price, quantity));
60 45
     }
61 46
 
62 47
 
63 48
     public void remove() {
64
-        Long id = console.getLongInput("What is the id of the item?");
65
-        inventory.removeById(id);
66
-        console.println("Item removed.");
67 49
     }
68 50
 
69 51
     public void viewProduct() {
70
-        Long id = console.getLongInput("What is the id of the item?");
71
-        console.println("Item found.");
72
-        console.println("Displaying details.");
73
-        console.println(inventory.findById(id).toString());
74 52
     }
75 53
 
76 54
     public void viewInventory() {
77
-        console.println(inventory.toString());
78 55
     }
79 56
 
80 57
     public Inventory getInventory() {
81
-        return inventory;
58
+        return null;
82 59
     }
83 60
 
84 61
     public void setInventory(Inventory inventory) {
85
-        this.inventory = inventory;
86 62
     }
87 63
 
88 64
     public Console getConsole() {
89
-        return console;
65
+        return null;
90 66
     }
91 67
 
92 68
     public void setConsole(Console console) {
93
-        this.console = console;
94 69
     }
95 70
 }

+ 4
- 17
src/main/java/com/zipcodewilmington/productmanager/inventory/Product.java 查看文件

@@ -4,49 +4,36 @@ package com.zipcodewilmington.productmanager.inventory;
4 4
  * Created by leon on 1/10/18.
5 5
  */
6 6
 public class Product {
7
-    private Long id;
8
-    private Double price;
9
-    private Integer quantity;
10 7
 
11 8
     public Product() {
12 9
     }
13 10
 
14 11
     public Product(Long id, Double price, Integer quantity) {
15
-        this.id = id;
16
-        this.price = price;
17
-        this.quantity = quantity;
18 12
     }
19 13
 
20 14
     public Long getId() {
21
-        return id;
15
+        return null;
22 16
     }
23 17
 
24 18
     public void setId(Long id) {
25
-        this.id = id;
26 19
     }
27 20
 
28 21
     public Double getPrice() {
29
-        return price;
22
+        return null;
30 23
     }
31 24
 
32 25
     public void setPrice(Double price) {
33
-        this.price = price;
34 26
     }
35 27
 
36 28
     public Integer getQuantity() {
37
-        return quantity;
29
+        return null;
38 30
     }
39 31
 
40 32
     public void setQuantity(Integer quantity) {
41
-        this.quantity = quantity;
42 33
     }
43 34
 
44 35
     @Override
45 36
     public String toString() {
46
-        return "Product{" +
47
-                "id=" + id +
48
-                ", price=" + price +
49
-                ", quantity=" + quantity +
50
-                '}';
37
+        return null;
51 38
     }
52 39
 }

+ 4
- 12
src/main/java/com/zipcodewilmington/productmanager/utils/Console.java 查看文件

@@ -8,37 +8,29 @@ import java.util.Scanner;
8 8
  * @author leon on 15/11/2018.
9 9
  */
10 10
 public class Console {
11
-    private final Scanner scanner;
12
-    private final PrintStream printStream;
13
-
14 11
     public Console() {
15 12
         this(System.in, System.out);
16 13
     }
17 14
 
18 15
     public Console(InputStream inputStream, PrintStream printStream) {
19
-        this.scanner = new Scanner(inputStream);
20
-        this.printStream = printStream;
21 16
     }
22 17
 
23 18
     public void println(String prompt) {
24
-        printStream.println(prompt);
25 19
     }
26 20
 
27 21
     public String getStringInput(String prompt) {
28
-        println(prompt);
29
-        String userInput = scanner.nextLine();
30
-        return userInput;
22
+        return null;
31 23
     }
32 24
 
33 25
     public Double getDoubleInput(String prompt) {
34
-        return Double.parseDouble(getStringInput(prompt));
26
+        return null;
35 27
     }
36 28
 
37 29
     public Long getLongInput(String prompt) {
38
-        return getDoubleInput(prompt).longValue();
30
+        return null;
39 31
     }
40 32
 
41 33
     public Integer getIntegerInput(String prompt) {
42
-        return getLongInput(prompt).intValue();
34
+        return null;
43 35
     }
44 36
 }

+ 2
- 1
src/main/java/com/zipcodewilmington/productmanager/utils/MockConsole.java 查看文件

@@ -5,8 +5,9 @@ import java.io.PrintStream;
5 5
 
6 6
 /**
7 7
  * @author leon on 15/11/2018.
8
+ * @ATTENTION_TO_STUDENTS You are forbidden from modifying this class
8 9
  */
9
-public class MockConsole extends Console {
10
+public final class MockConsole extends Console {
10 11
     public MockConsole(String input, PrintStream printStream) {
11 12
         super(new ByteArrayInputStream(input.getBytes()), printStream);
12 13
     }