Quellcode durchsuchen

removed account constructor

Trinh Tong vor 6 Jahren
Ursprung
Commit
c44d35b033
2 geänderte Dateien mit 56 neuen und 76 gelöschten Zeilen
  1. 54
    69
      .idea/workspace.xml
  2. 2
    7
      Checkbook/src/main/java/Account.java

+ 54
- 69
.idea/workspace.xml Datei anzeigen

32
       </usages-collector>
32
       </usages-collector>
33
       <usages-collector id="statistics.file.types.edit">
33
       <usages-collector id="statistics.file.types.edit">
34
         <counts>
34
         <counts>
35
-          <entry key="JAVA" value="11867" />
35
+          <entry key="JAVA" value="12042" />
36
           <entry key="Markdown" value="11" />
36
           <entry key="Markdown" value="11" />
37
         </counts>
37
         </counts>
38
       </usages-collector>
38
       </usages-collector>
44
         <entry file="file://$PROJECT_DIR$/README.md">
44
         <entry file="file://$PROJECT_DIR$/README.md">
45
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
45
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
46
             <state split_layout="FIRST">
46
             <state split_layout="FIRST">
47
-              <first_editor relative-caret-position="417">
48
-                <caret line="45" column="14" lean-forward="true" selection-start-line="45" selection-start-column="14" selection-end-line="45" selection-end-column="14" />
47
+              <first_editor relative-caret-position="145">
48
+                <caret line="42" column="49" lean-forward="true" selection-start-line="42" selection-start-column="49" selection-end-line="42" selection-end-column="49" />
49
               </first_editor>
49
               </first_editor>
50
               <second_editor />
50
               <second_editor />
51
             </state>
51
             </state>
142
           </provider>
142
           </provider>
143
         </entry>
143
         </entry>
144
       </file>
144
       </file>
145
-      <file pinned="false" current-in-tab="false">
145
+      <file pinned="false" current-in-tab="true">
146
         <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Account.java">
146
         <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Account.java">
147
           <provider selected="true" editor-type-id="text-editor">
147
           <provider selected="true" editor-type-id="text-editor">
148
-            <state relative-caret-position="940">
149
-              <caret line="50" lean-forward="true" selection-start-line="50" selection-end-line="50" />
148
+            <state relative-caret-position="207">
149
+              <caret line="9" column="5" lean-forward="true" selection-start-line="9" selection-start-column="5" selection-end-line="9" selection-end-column="5" />
150
               <folding>
150
               <folding>
151
-                <element signature="imports" expanded="true" />
152
-                <element signature="e#198#199#0" expanded="true" />
153
-                <element signature="e#236#237#0" expanded="true" />
154
                 <element signature="e#380#381#0" expanded="true" />
151
                 <element signature="e#380#381#0" expanded="true" />
155
                 <element signature="e#408#409#0" expanded="true" />
152
                 <element signature="e#408#409#0" expanded="true" />
156
                 <element signature="e#449#450#0" expanded="true" />
153
                 <element signature="e#449#450#0" expanded="true" />
157
                 <element signature="e#483#484#0" expanded="true" />
154
                 <element signature="e#483#484#0" expanded="true" />
158
                 <element signature="e#517#518#0" expanded="true" />
155
                 <element signature="e#517#518#0" expanded="true" />
159
                 <element signature="e#547#548#0" expanded="true" />
156
                 <element signature="e#547#548#0" expanded="true" />
160
-                <element signature="e#864#865#0" expanded="true" />
161
-                <element signature="e#918#919#0" expanded="true" />
162
-                <element signature="e#965#966#0" expanded="true" />
163
-                <element signature="e#1022#1023#0" expanded="true" />
164
               </folding>
157
               </folding>
165
             </state>
158
             </state>
166
           </provider>
159
           </provider>
167
         </entry>
160
         </entry>
168
       </file>
161
       </file>
169
-      <file pinned="false" current-in-tab="true">
162
+      <file pinned="false" current-in-tab="false">
170
         <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java">
163
         <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java">
171
           <provider selected="true" editor-type-id="text-editor">
164
           <provider selected="true" editor-type-id="text-editor">
172
-            <state relative-caret-position="230">
173
-              <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
165
+            <state relative-caret-position="92">
166
+              <caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
174
               <folding>
167
               <folding>
175
                 <element signature="imports" expanded="true" />
168
                 <element signature="imports" expanded="true" />
176
               </folding>
169
               </folding>
181
       <file pinned="false" current-in-tab="false">
174
       <file pinned="false" current-in-tab="false">
182
         <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
175
         <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
183
           <provider selected="true" editor-type-id="text-editor">
176
           <provider selected="true" editor-type-id="text-editor">
184
-            <state relative-caret-position="46">
185
-              <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
177
+            <state relative-caret-position="247">
178
+              <caret line="11" column="25" lean-forward="true" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
186
             </state>
179
             </state>
187
           </provider>
180
           </provider>
188
         </entry>
181
         </entry>
237
         <option value="$PROJECT_DIR$/README.md" />
230
         <option value="$PROJECT_DIR$/README.md" />
238
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" />
231
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" />
239
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" />
232
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" />
240
-        <option value="$PROJECT_DIR$/Checkbook/src/main/java/Account.java" />
241
         <option value="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" />
233
         <option value="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" />
242
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
234
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
243
         <option value="$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java" />
235
         <option value="$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java" />
236
+        <option value="$PROJECT_DIR$/Checkbook/src/main/java/Account.java" />
244
       </list>
237
       </list>
245
     </option>
238
     </option>
246
   </component>
239
   </component>
326
   <component name="PropertiesComponent">
319
   <component name="PropertiesComponent">
327
     <property name="WebServerToolWindowFactoryState" value="false" />
320
     <property name="WebServerToolWindowFactoryState" value="false" />
328
     <property name="aspect.path.notification.shown" value="true" />
321
     <property name="aspect.path.notification.shown" value="true" />
329
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544142505823" />
322
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544142656991" />
330
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
323
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
331
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
324
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
332
     <property name="extract.method.default.visibility" value="private" />
325
     <property name="extract.method.default.visibility" value="private" />
475
       <option name="presentableId" value="Default" />
468
       <option name="presentableId" value="Default" />
476
       <updated>1543958631974</updated>
469
       <updated>1543958631974</updated>
477
       <workItem from="1543958633447" duration="3259000" />
470
       <workItem from="1543958633447" duration="3259000" />
478
-      <workItem from="1544046850600" duration="30651000" />
471
+      <workItem from="1544046850600" duration="31245000" />
479
     </task>
472
     </task>
480
     <servers />
473
     <servers />
481
   </component>
474
   </component>
512
     </history-entry>
505
     </history-entry>
513
   </component>
506
   </component>
514
   <component name="TimeTrackingManager">
507
   <component name="TimeTrackingManager">
515
-    <option name="totallyTimeSpent" value="33910000" />
508
+    <option name="totallyTimeSpent" value="34504000" />
516
   </component>
509
   </component>
517
   <component name="ToolWindowManager">
510
   <component name="ToolWindowManager">
518
     <frame x="0" y="23" width="1440" height="877" extended-state="0" />
511
     <frame x="0" y="23" width="1440" height="877" extended-state="0" />
519
-    <editor active="true" />
520
     <layout>
512
     <layout>
521
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
513
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
522
       <window_info id="Structure" order="1" weight="0.25" />
514
       <window_info id="Structure" order="1" weight="0.25" />
523
       <window_info id="Image Layers" order="2" />
515
       <window_info id="Image Layers" order="2" />
524
       <window_info id="Designer" order="3" />
516
       <window_info id="Designer" order="3" />
529
       <window_info anchor="bottom" id="Messages" weight="0.32769832" />
521
       <window_info anchor="bottom" id="Messages" weight="0.32769832" />
530
       <window_info anchor="bottom" id="Message" order="0" />
522
       <window_info anchor="bottom" id="Message" order="0" />
531
       <window_info anchor="bottom" id="Find" order="1" />
523
       <window_info anchor="bottom" id="Find" order="1" />
532
-      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49928468" visible="true" weight="0.32769832" />
524
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49928468" weight="0.32769832" />
533
       <window_info anchor="bottom" id="Debug" order="3" weight="0.39921975" />
525
       <window_info anchor="bottom" id="Debug" order="3" weight="0.39921975" />
534
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
526
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
535
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
527
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
536
       <window_info anchor="bottom" id="TODO" order="6" />
528
       <window_info anchor="bottom" id="TODO" order="6" />
537
-      <window_info anchor="bottom" id="Terminal" order="7" weight="0.32769832" />
529
+      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.32769832" />
538
       <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.5007153" side_tool="true" weight="0.32769832" />
530
       <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.5007153" side_tool="true" weight="0.32769832" />
539
       <window_info anchor="bottom" id="Version Control" order="9" />
531
       <window_info anchor="bottom" id="Version Control" order="9" />
540
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
532
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
672
         </state>
664
         </state>
673
       </provider>
665
       </provider>
674
     </entry>
666
     </entry>
675
-    <entry file="file://$PROJECT_DIR$/README.md">
676
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
677
-        <state split_layout="FIRST">
678
-          <first_editor relative-caret-position="417">
679
-            <caret line="45" column="14" lean-forward="true" selection-start-line="45" selection-start-column="14" selection-end-line="45" selection-end-column="14" />
680
-          </first_editor>
681
-          <second_editor />
682
-        </state>
683
-      </provider>
684
-    </entry>
685
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
667
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
686
       <provider selected="true" editor-type-id="text-editor">
668
       <provider selected="true" editor-type-id="text-editor">
687
-        <state relative-caret-position="46">
688
-          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
669
+        <state relative-caret-position="161">
670
+          <caret line="7" selection-start-line="7" selection-end-line="8" selection-end-column="91" />
671
+          <folding>
672
+            <element signature="imports" expanded="true" />
673
+          </folding>
689
         </state>
674
         </state>
690
       </provider>
675
       </provider>
691
     </entry>
676
     </entry>
692
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
677
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
693
       <provider selected="true" editor-type-id="text-editor">
678
       <provider selected="true" editor-type-id="text-editor">
694
-        <state relative-caret-position="161">
695
-          <caret line="7" selection-start-line="7" selection-end-line="8" selection-end-column="91" />
679
+        <state relative-caret-position="-535">
680
+          <caret line="389" lean-forward="true" selection-start-line="389" selection-end-line="389" />
696
           <folding>
681
           <folding>
697
             <element signature="imports" expanded="true" />
682
             <element signature="imports" expanded="true" />
683
+            <element signature="e#2268#2269#0" expanded="true" />
684
+            <element signature="e#2316#2317#0" expanded="true" />
698
           </folding>
685
           </folding>
699
         </state>
686
         </state>
700
       </provider>
687
       </provider>
701
     </entry>
688
     </entry>
689
+    <entry file="file://$PROJECT_DIR$/README.md">
690
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
691
+        <state split_layout="FIRST">
692
+          <first_editor relative-caret-position="145">
693
+            <caret line="42" column="49" lean-forward="true" selection-start-line="42" selection-start-column="49" selection-end-line="42" selection-end-column="49" />
694
+          </first_editor>
695
+          <second_editor />
696
+        </state>
697
+      </provider>
698
+    </entry>
702
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
699
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
703
       <provider selected="true" editor-type-id="text-editor">
700
       <provider selected="true" editor-type-id="text-editor">
704
         <state relative-caret-position="3749">
701
         <state relative-caret-position="3749">
761
         </state>
758
         </state>
762
       </provider>
759
       </provider>
763
     </entry>
760
     </entry>
764
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Account.java">
761
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
765
       <provider selected="true" editor-type-id="text-editor">
762
       <provider selected="true" editor-type-id="text-editor">
766
-        <state relative-caret-position="940">
767
-          <caret line="50" lean-forward="true" selection-start-line="50" selection-end-line="50" />
768
-          <folding>
769
-            <element signature="imports" expanded="true" />
770
-            <element signature="e#198#199#0" expanded="true" />
771
-            <element signature="e#236#237#0" expanded="true" />
772
-            <element signature="e#380#381#0" expanded="true" />
773
-            <element signature="e#408#409#0" expanded="true" />
774
-            <element signature="e#449#450#0" expanded="true" />
775
-            <element signature="e#483#484#0" expanded="true" />
776
-            <element signature="e#517#518#0" expanded="true" />
777
-            <element signature="e#547#548#0" expanded="true" />
778
-            <element signature="e#864#865#0" expanded="true" />
779
-            <element signature="e#918#919#0" expanded="true" />
780
-            <element signature="e#965#966#0" expanded="true" />
781
-            <element signature="e#1022#1023#0" expanded="true" />
782
-          </folding>
763
+        <state relative-caret-position="247">
764
+          <caret line="11" column="25" lean-forward="true" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
783
         </state>
765
         </state>
784
       </provider>
766
       </provider>
785
     </entry>
767
     </entry>
786
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
768
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java">
787
       <provider selected="true" editor-type-id="text-editor">
769
       <provider selected="true" editor-type-id="text-editor">
788
-        <state relative-caret-position="-535">
789
-          <caret line="389" lean-forward="true" selection-start-line="389" selection-end-line="389" />
770
+        <state relative-caret-position="92">
771
+          <caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
790
           <folding>
772
           <folding>
791
             <element signature="imports" expanded="true" />
773
             <element signature="imports" expanded="true" />
792
-            <element signature="e#2268#2269#0" expanded="true" />
793
-            <element signature="e#2316#2317#0" expanded="true" />
794
           </folding>
774
           </folding>
795
         </state>
775
         </state>
796
       </provider>
776
       </provider>
797
     </entry>
777
     </entry>
798
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/AccountTest.java">
778
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Account.java">
799
       <provider selected="true" editor-type-id="text-editor">
779
       <provider selected="true" editor-type-id="text-editor">
800
-        <state relative-caret-position="230">
801
-          <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
780
+        <state relative-caret-position="207">
781
+          <caret line="9" column="5" lean-forward="true" selection-start-line="9" selection-start-column="5" selection-end-line="9" selection-end-column="5" />
802
           <folding>
782
           <folding>
803
-            <element signature="imports" expanded="true" />
783
+            <element signature="e#380#381#0" expanded="true" />
784
+            <element signature="e#408#409#0" expanded="true" />
785
+            <element signature="e#449#450#0" expanded="true" />
786
+            <element signature="e#483#484#0" expanded="true" />
787
+            <element signature="e#517#518#0" expanded="true" />
788
+            <element signature="e#547#548#0" expanded="true" />
804
           </folding>
789
           </folding>
805
         </state>
790
         </state>
806
       </provider>
791
       </provider>

+ 2
- 7
Checkbook/src/main/java/Account.java Datei anzeigen

9
         balance = book.getAmount();
9
         balance = book.getAmount();
10
     }
10
     }
11
 
11
 
12
-    public Account(T book, double balance) {
13
-        accountBook = book;
14
-        this.balance = balance;
15
-    }
16
-
17
-    public Account(T book, Payee owner, double balance) {
12
+    public Account(T book, Payee owner) {
18
         accountBook = book;
13
         accountBook = book;
19
         this.owner = owner;
14
         this.owner = owner;
20
-        this.balance = balance;
15
+        this.balance = book.getAmount();
21
     }
16
     }
22
 
17
 
23
     public Payee getOwner() {
18
     public Payee getOwner() {