Sfoglia il codice sorgente

First Commit

ArrayList to Check
Transaction Implements AccountBook
Nick Satinover 6 anni fa
parent
commit
a4d0e10b7b

+ 16
- 0
Checkbook/.idea/compiler.xml Vedi File

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

+ 13
- 0
Checkbook/.idea/libraries/Maven__junit_junit_4_0.xml Vedi File

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

+ 13
- 0
Checkbook/.idea/misc.xml Vedi File

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

+ 8
- 0
Checkbook/.idea/modules.xml Vedi File

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

+ 6
- 0
Checkbook/.idea/vcs.xml Vedi File

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

+ 1
- 2
Checkbook/Checkbook.iml Vedi File

@@ -5,11 +5,10 @@
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">
7 7
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9 8
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10 9
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 10
     </content>
12
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
11
+    <orderEntry type="inheritedJdk" />
13 12
     <orderEntry type="sourceFolder" forTests="false" />
14 13
     <orderEntry type="library" name="Maven: junit:junit:4.0" level="project" />
15 14
   </component>

+ 6
- 1
Checkbook/src/main/java/Checkbook.java Vedi File

@@ -1,5 +1,10 @@
1
+import java.util.ArrayList;
2
+
1 3
 public class Checkbook {
4
+    private ArrayList<Transaction> transactionList;
2 5
 
3
-    //blind us with your Java eloquence....
6
+    Checkbook(ArrayList<Transaction> transactionList){
7
+        this.transactionList = transactionList;
8
+    }
4 9
 
5 10
 }

+ 1
- 1
Checkbook/src/main/java/Transaction.java Vedi File

@@ -1,7 +1,7 @@
1 1
 import java.time.LocalDate;
2 2
 import java.util.concurrent.atomic.AtomicReference;
3 3
 
4
-public class Transaction {
4
+public class Transaction implements AccountBook{
5 5
     private final AtomicReference<Integer> id = new AtomicReference<Integer>();
6 6
     private final AtomicReference<LocalDate> date = new AtomicReference<LocalDate>();
7 7
     private String memo;