diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..88d050b --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +main \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..9b7ab75 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 0000000..d411041 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..f58bbc1 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..687810c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..122a905 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Pom.xml b/Pom.xml new file mode 100644 index 0000000..9fa8a1d --- /dev/null +++ b/Pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + com.zipcodewilmington + justcode + packaging> + 1.0-SNAPSHOT + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + + src + + + + + junit + junit + 4.12 + + + + + \ No newline at end of file diff --git a/ProjectStructure Readme b/ProjectStructure Readme new file mode 100644 index 0000000..85d820f --- /dev/null +++ b/ProjectStructure Readme @@ -0,0 +1,15 @@ +JUST CODE README + +Create a financial app which interacts with a user at a Point of Sale terminal. +The app scans the user’s purchase total, and gives the option to round up to the next whole dollar (or other specified figure) +The app then provides a menu of options of where to send the extra funds. The funds could be sent to a savings account, a charity, a mutual fund or other investment. +The app would also print a receipt showing the value of the original bill, the rounded up value, and how much was + committed to each account. +The initial development stage would involve creating the UML, the user interface, and the functionality of adding and subtracting dollar amounts. + + +Future functionality +The app could provide access to a database which stores customer account profile data, balance, fund choices. +It could also track the progress of the chosen fund from real market data, and return the resulting change in value to balance. +The app might also give the option to add a new fund or charity. + diff --git a/ProjectTestReadMe b/ProjectTestReadMe new file mode 100644 index 0000000..b7a4440 --- /dev/null +++ b/ProjectTestReadMe @@ -0,0 +1,15 @@ +JUST CODE TEST README + +*Create a test to ensure the console displays customer name, +bill Amount, Fund Name and new Total. + + +* Create test to ensure the console sends the right query to the user giving options to +complete transaction and print receipt or continue with options: +and test that if done with transaction the correct balance is returned. + +*test to ensure that the options chosen match what user picks, and returns the correct amount. + +*Ensure each of the methods for manipulating and accessing class fields have +appropriate testing. + diff --git a/main.iml b/main.iml new file mode 100644 index 0000000..a0383c0 --- /dev/null +++ b/main.iml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..0787fb7 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000..63b728b Binary files /dev/null and b/src/main/.DS_Store differ diff --git a/src/main/java/Bank/AccountInfo.java b/src/main/java/Bank/AccountInfo.java new file mode 100644 index 0000000..2932471 --- /dev/null +++ b/src/main/java/Bank/AccountInfo.java @@ -0,0 +1,39 @@ +package Bank; + +public final class AccountInfo { + private final int id; + private final String name; + private final String email; + private final float balance; + private final String typeAccount; + + AccountInfo(int id, String name, String email, float balance, String typeAccount) { + this.id = id; + this.name = name; + this.email = email; + this.balance = balance; + this.typeAccount = typeAccount; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getEmail() { + return email; + } + + public float getBalance() { + return balance; + } + + public String getTypeAccount() { + return typeAccount; + } + + } + diff --git a/src/main/java/Bank/Charity.java b/src/main/java/Bank/Charity.java new file mode 100644 index 0000000..9c1f1a4 --- /dev/null +++ b/src/main/java/Bank/Charity.java @@ -0,0 +1,20 @@ +package Bank; + +public class Charity implements Deposit +{ + + public void deposit(double deposit){ + + double d = 0; + } + + public void roundUp(double r) + { + + }; + + public void newBalance(double b) + { + + }; +} diff --git a/src/main/java/Bank/Deposit.java b/src/main/java/Bank/Deposit.java new file mode 100644 index 0000000..4c2d036 --- /dev/null +++ b/src/main/java/Bank/Deposit.java @@ -0,0 +1,12 @@ +package Bank; + +public interface Deposit { + +public Double Amount = null; + +public void deposit(double deposit); + +public void roundUp(double r); + +public void newBalance(double b); +} diff --git a/src/main/java/Bank/Family.java b/src/main/java/Bank/Family.java new file mode 100644 index 0000000..618ccba --- /dev/null +++ b/src/main/java/Bank/Family.java @@ -0,0 +1,4 @@ +package Bank; + +public class Family { +} diff --git a/src/main/java/Bank/GlobalCharities.java b/src/main/java/Bank/GlobalCharities.java new file mode 100644 index 0000000..e216a06 --- /dev/null +++ b/src/main/java/Bank/GlobalCharities.java @@ -0,0 +1,11 @@ +package Bank; + +public enum GlobalCharities { + UNICEF, + The_Missionaries_of_Charity, + Amoud_Foundation, + Save_the_Children, + Azim_Premji_Foundation, + + +} diff --git a/src/main/java/Bank/MainApplication.java b/src/main/java/Bank/MainApplication.java new file mode 100644 index 0000000..5d682ba --- /dev/null +++ b/src/main/java/Bank/MainApplication.java @@ -0,0 +1,20 @@ +package Bank; + +public class MainApplication { + +String customerName; + +Double billAmount; + +String fundName; + +Double newTotal; + +public void getCustomerInfo(){} + +public void printConsole(){} + +public boolean transferYorN(){ + return false; +} +} diff --git a/src/main/java/Bank/MutualFund.java b/src/main/java/Bank/MutualFund.java new file mode 100644 index 0000000..94ee9bd --- /dev/null +++ b/src/main/java/Bank/MutualFund.java @@ -0,0 +1,4 @@ +package Bank; + +public class MutualFund { +} diff --git a/src/main/java/Bank/ReceiptPrinter.java b/src/main/java/Bank/ReceiptPrinter.java new file mode 100644 index 0000000..30a83a8 --- /dev/null +++ b/src/main/java/Bank/ReceiptPrinter.java @@ -0,0 +1,15 @@ +package Bank; + +public class ReceiptPrinter { + + private String customerName; + + private String investmentName; + + private Double amountAdded; + + private Double newBalance; + + private void print() { + } +} diff --git a/src/main/java/Bank/SavingsChecking.java b/src/main/java/Bank/SavingsChecking.java new file mode 100644 index 0000000..9cec4d0 --- /dev/null +++ b/src/main/java/Bank/SavingsChecking.java @@ -0,0 +1,4 @@ +package Bank; + +public class SavingsChecking { +} diff --git a/src/main/java/Bank/Withdraw.java b/src/main/java/Bank/Withdraw.java new file mode 100644 index 0000000..5a7d805 --- /dev/null +++ b/src/main/java/Bank/Withdraw.java @@ -0,0 +1,12 @@ +package Bank; + +public interface Withdraw { + + public Double Amount = null; + + public void Withdraw(double w); + + public void showTotal(double s); + + public void newBalance(double b); +} diff --git a/src/main/java/Bank/localCharities.java b/src/main/java/Bank/localCharities.java new file mode 100644 index 0000000..c62b389 --- /dev/null +++ b/src/main/java/Bank/localCharities.java @@ -0,0 +1,13 @@ +package Bank; + +public enum localCharities { + + JUNIOR_LEAGUE_OF_WILMINGTON, + SUNDAY_BREAKFAST_MISSION, + MARTHA_HOUSE, + BAYARD_HOUSE, + LITERACY_LITERACY, + GREEN_DROP, + KIND_TO_KIDS, + CONNECTIONS_COMMUNITY_SUPPORT_PROGRAM, +} diff --git a/src/pom.xml b/src/pom.xml new file mode 100644 index 0000000..2b39858 --- /dev/null +++ b/src/pom.xml @@ -0,0 +1,15 @@ + + + + justcode + com.zipcodewilmington + 1.0-SNAPSHOT + + 4.0.0 + + src + + + \ No newline at end of file diff --git a/src/test/Bank/AccountInfoTest.java b/src/test/Bank/AccountInfoTest.java new file mode 100644 index 0000000..b2cf8c5 --- /dev/null +++ b/src/test/Bank/AccountInfoTest.java @@ -0,0 +1,40 @@ +package Bank; + +import Bank.AccountInfo; +import org.junit.Assert; +import org.junit.Test; + +public class AccountInfoTest { + @Test + public void getId() { + AccountInfo accData = new AccountInfo(1000, "Basic", "basic@gmail.com", 500, "basic"); + int expected = 1000; + int actual = accData.getId(); + Assert.assertEquals(expected,actual); + } + @Test + public void getName() { + AccountInfo accInfo = new AccountInfo(1000, "Basic", "basic@gmail.com", 500, "basic"); + String expected = "Basic"; + String actual = accInfo.getName(); + Assert.assertEquals(expected,actual); + } + + @Test + public void getEmail() { + AccountInfo accData = new AccountInfo(1000, "Basic", "basic@gmail.com", 500, "basic"); + String expected = "basic@gmail.com"; + String actual = accData.getEmail(); + Assert.assertEquals(expected,actual); + } + + @Test + public void getBalance() { + AccountInfo accData = new AccountInfo(1000, "Basic", "basic@gmail.com", 500, "basic"); + float expected = 500.00f; + float actual = accData.getBalance(); + Assert.assertEquals(expected,actual, 0.0); + } + +} + diff --git a/src/test/Bank/CharityTest.java b/src/test/Bank/CharityTest.java new file mode 100644 index 0000000..43625a6 --- /dev/null +++ b/src/test/Bank/CharityTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class CharityTest { +} diff --git a/src/test/Bank/FamilyTest.java b/src/test/Bank/FamilyTest.java new file mode 100644 index 0000000..96fa3d4 --- /dev/null +++ b/src/test/Bank/FamilyTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class FamilyTest { +} diff --git a/src/test/Bank/GlobalCharitiesTest.java b/src/test/Bank/GlobalCharitiesTest.java new file mode 100644 index 0000000..beec4fe --- /dev/null +++ b/src/test/Bank/GlobalCharitiesTest.java @@ -0,0 +1,4 @@ +package Bank; + +public enum GlobalCharitiesTest { +} diff --git a/src/test/Bank/MainApplicationTest.java b/src/test/Bank/MainApplicationTest.java new file mode 100644 index 0000000..27e652f --- /dev/null +++ b/src/test/Bank/MainApplicationTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class MainApplicationTest { +} diff --git a/src/test/Bank/MutualFundTest.java b/src/test/Bank/MutualFundTest.java new file mode 100644 index 0000000..b5499ab --- /dev/null +++ b/src/test/Bank/MutualFundTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class MutualFundTest { +} diff --git a/src/test/Bank/ReceiptPrinterTest.java b/src/test/Bank/ReceiptPrinterTest.java new file mode 100644 index 0000000..29fce5d --- /dev/null +++ b/src/test/Bank/ReceiptPrinterTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class ReceiptPrinterTest { +} diff --git a/src/test/Bank/SavingsCheckingTest.java b/src/test/Bank/SavingsCheckingTest.java new file mode 100644 index 0000000..fb14b25 --- /dev/null +++ b/src/test/Bank/SavingsCheckingTest.java @@ -0,0 +1,4 @@ +package Bank; + +public class SavingsCheckingTest { +} diff --git a/src/test/Bank/localCharitiesTest.java b/src/test/Bank/localCharitiesTest.java new file mode 100644 index 0000000..77573c6 --- /dev/null +++ b/src/test/Bank/localCharitiesTest.java @@ -0,0 +1,4 @@ +package Bank; + +public enum localCharitiesTest { +} diff --git a/target/classes/META-INF/main.kotlin_module b/target/classes/META-INF/main.kotlin_module new file mode 100644 index 0000000..a49347a Binary files /dev/null and b/target/classes/META-INF/main.kotlin_module differ diff --git a/target/test-classes/META-INF/main.kotlin_module b/target/test-classes/META-INF/main.kotlin_module new file mode 100644 index 0000000..a49347a Binary files /dev/null and b/target/test-classes/META-INF/main.kotlin_module differ