Skip to content

ATM Complete - read the README.md for some use notes. #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
5612c37
DB core functionality mostly in - much too long since committing
deltaGPhys Oct 24, 2019
87554cc
gitignore
deltaGPhys Oct 24, 2019
04d3b7f
fix the bad branching
deltaGPhys Oct 24, 2019
26cea5b
.
deltaGPhys Oct 24, 2019
cbebe65
comment out testing thing
deltaGPhys Oct 24, 2019
e4aad6f
testing for row length, getting file name
deltaGPhys Oct 24, 2019
19b163e
DB deletion
deltaGPhys Oct 24, 2019
7de21bb
DB integrity checks
deltaGPhys Oct 24, 2019
5c74f2d
row replacement
deltaGPhys Oct 24, 2019
83e5e50
row deletion by index
deltaGPhys Oct 24, 2019
4a92b4f
row reading and row serialization - static and object-referenced
deltaGPhys Oct 24, 2019
7c0ab19
partial serialization - static and object-focused
deltaGPhys Oct 25, 2019
732dff6
find row and find partial row
deltaGPhys Oct 25, 2019
888b5c5
find partial multiple rows
deltaGPhys Oct 25, 2019
6901ec7
resolve merge conflict
deltaGPhys Oct 25, 2019
70981f8
Too much work - stubbed ATM and Console
deltaGPhys Oct 25, 2019
dab56e1
Stub User and Transaction
ryan0 Oct 26, 2019
315d374
accounts stubbed
michkin32 Oct 26, 2019
f4613c4
interface added
deltaGPhys Oct 26, 2019
9898daf
branch switching
deltaGPhys Oct 26, 2019
12b6c7c
resolve merge conflict
deltaGPhys Oct 26, 2019
0de62b8
resolve merge conflict
deltaGPhys Oct 26, 2019
a0ce94b
storeable ref conflicts fixed
deltaGPhys Oct 26, 2019
2ccb396
Add some ATM tests
deltaGPhys Oct 26, 2019
b75a035
connections between models made, all tests run without catastrophe
deltaGPhys Oct 26, 2019
dc1f11e
one ATM test
deltaGPhys Oct 26, 2019
b17e895
branch switch
deltaGPhys Oct 26, 2019
cc07aa9
added fields
michkin32 Oct 26, 2019
3ebb3e2
Merge branch 'accounts' into interface
deltaGPhys Oct 26, 2019
fd49924
Fillout user methods
ryan0 Oct 26, 2019
392df6d
fixed constuctors for accounts
michkin32 Oct 26, 2019
e7ba2bc
Merge branch 'accounts' into interface
deltaGPhys Oct 26, 2019
ea1f497
overide toStringArray
ryan0 Oct 26, 2019
57599e0
current status for Brian
deltaGPhys Oct 26, 2019
106d5bc
override stoarable in user
ryan0 Oct 26, 2019
721004f
Merge pull request #1 from deltaGPhys/userOverride
ryanmil Oct 26, 2019
85ae276
resolve mc
deltaGPhys Oct 26, 2019
b2b99e8
storeable tests
deltaGPhys Oct 26, 2019
591b76f
make db methods private
ryan0 Oct 26, 2019
1ad47f6
save user method and test
deltaGPhys Oct 26, 2019
f5ff777
read user pass
ryan0 Oct 26, 2019
d077a0d
Merge branch 'atmtests' into serviceLoop
ryan0 Oct 26, 2019
e85082b
saveUserToDB and test
deltaGPhys Oct 26, 2019
e1a895d
getters for accountID and owner
deltaGPhys Oct 26, 2019
d0684d5
Delete .DS_Store
deltaGPhys Oct 26, 2019
b1bf738
Added some investment methods
michkin32 Oct 26, 2019
b11a6c6
input loop
ryan0 Oct 27, 2019
aed31bb
branch moment
deltaGPhys Oct 27, 2019
7f53150
Merge branch 'dev' into atmtests
deltaGPhys Oct 27, 2019
119d562
Merge branch 'atmtests' into accounts
michkin32 Oct 27, 2019
24ecb31
Merge branch 'dev' into accounts
michkin32 Oct 27, 2019
e0e65d3
added some account methods and test
michkin32 Oct 27, 2019
e053bfe
ATM helper methods for loading accounts and users
deltaGPhys Oct 27, 2019
6e438f2
DBtest addition
deltaGPhys Oct 27, 2019
e4eddb6
get all accounts for a user and test
deltaGPhys Oct 27, 2019
45415c3
save account to DB method and test
deltaGPhys Oct 27, 2019
1dc4127
Merge branch 'accounts' into atmtests
deltaGPhys Oct 27, 2019
8400e29
added investment test
michkin32 Oct 27, 2019
d9e911d
merge
ryan0 Oct 27, 2019
04fc382
Merge branch 'dev' of github.com:deltaGPhys/CR-MacroLabs-OOP-ATM into…
ryan0 Oct 27, 2019
2717f9a
Card Number Gen
ryan0 Oct 27, 2019
a3fcf8c
Basic imp to create user
ryan0 Oct 27, 2019
6f20a15
remove print
ryan0 Oct 27, 2019
94ad687
get max user number method and test
deltaGPhys Oct 27, 2019
6a6ef18
get max account number method and test
deltaGPhys Oct 27, 2019
8c1933a
Merge remote-tracking branch 'origin/menu' into accountCreation
ryan0 Oct 27, 2019
ed8175d
Merge branch 'accountCreation' into menu
deltaGPhys Oct 27, 2019
e3a184e
Merge remote-tracking branch 'origin/accounts' into accountCreation
ryan0 Oct 27, 2019
c72946a
Merge remote-tracking branch 'origin/menu' into accountCreation
ryan0 Oct 27, 2019
6f36962
move around methods in ATM
deltaGPhys Oct 27, 2019
f7be97b
Clean atm
ryan0 Oct 27, 2019
66809e7
start of real menu
deltaGPhys Oct 27, 2019
9e9b57f
Stub Menu Methods
ryan0 Oct 27, 2019
97cae6f
menus with and without headers
deltaGPhys Oct 27, 2019
a488609
create/choose account
ryan0 Oct 27, 2019
1f39412
Merge branch 'userMenu' of https://github.com/deltaGPhys/CR-MacroLabs…
deltaGPhys Oct 27, 2019
d4e71cc
.
deltaGPhys Oct 27, 2019
0797161
added Test
michkin32 Oct 27, 2019
97d32d9
Merge branch 'uesrMenuAcc' of https://github.com/deltaGPhys/CR-MacroL…
deltaGPhys Oct 27, 2019
daf94b2
moved convenience methods
deltaGPhys Oct 27, 2019
99fe970
account creation firmed up
deltaGPhys Oct 28, 2019
1c6be26
more menu updates
deltaGPhys Oct 28, 2019
059f63c
account display stuff
deltaGPhys Oct 28, 2019
e8b1d8d
formatting
deltaGPhys Oct 28, 2019
7ef35fb
Transaction History for User
deltaGPhys Oct 28, 2019
849691e
transaction history for individual accounts
deltaGPhys Oct 28, 2019
fbbe32b
interest stub
deltaGPhys Oct 28, 2019
35f441c
investment returns and interest
deltaGPhys Oct 28, 2019
a9fe31b
deposit and withdraw
deltaGPhys Oct 28, 2019
94f92ef
menu loops pretty well
deltaGPhys Oct 28, 2019
47312a9
close accounts
deltaGPhys Oct 28, 2019
475e64e
merge
ryan0 Oct 29, 2019
a19252c
Merge branch 'dev' of github.com:deltaGPhys/CR-MacroLabs-OOP-ATM into…
ryan0 Oct 29, 2019
9033da7
readme info
deltaGPhys Oct 29, 2019
1f67276
Transfer working
ryan0 Oct 29, 2019
554b772
Merge branch 'dev' of github.com:deltaGPhys/CR-MacroLabs-OOP-ATM into…
ryan0 Oct 29, 2019
9b5dd06
Update README.md
deltaGPhys Oct 29, 2019
05d33d3
db info and final bug fix
deltaGPhys Oct 29, 2019
7a5eae6
project ship
deltaGPhys Oct 29, 2019
55ce15a
gitignore
deltaGPhys Oct 29, 2019
1bab24f
Update README.md
deltaGPhys Oct 29, 2019
f490b34
UML Diagram
deltaGPhys Oct 29, 2019
f123d57
Delete .DS_Store
deltaGPhys Oct 29, 2019
1e56d10
.
deltaGPhys Jan 18, 2020
2fa87ee
Merge branch 'master' of https://github.com/deltaGPhys/CR-MacroLabs-O…
deltaGPhys Jan 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target/
.project
.classpath
.settings
data/*
*.DS_Store
180 changes: 180 additions & 0 deletions ATMUML.uml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<Diagram>
<ID>JAVA</ID>
<OriginalElement />
<nodes>
<node x="847.0818888888887" y="651.0">Account</node>
<node x="36.5" y="959.0">Savings</node>
<node x="657.4999999999999" y="1447.5">User</node>
<node x="565.5624999999999" y="1093.0">Storeable</node>
<node x="1098.8318888888887" y="982.5">Checking</node>
<node x="167.4999999999999" y="1426.0">Console</node>
<node x="297.6443888888887" y="1193.0">Transaction</node>
<node x="636.2643888888888" y="1862.0">ATM</node>
<node x="769.2643888888888" y="2953.0">Main</node>
<node x="888.75" y="0.0">DB</node>
<node x="904.8318888888887" y="948.0">Investment</node>
</nodes>
<notes />
<edges>
<edge source="User" target="Storeable">
<point x="118.0" y="-146.5" />
<point x="952.4999999999999" y="1406.0" />
<point x="897.3668333333331" y="1406.0" />
<point x="897.3668333333331" y="1168.0" />
<point x="708.0624999999999" y="1168.0" />
<point x="47.5" y="25.0" />
</edge>
<edge source="ATM" target="Savings">
<point x="-171.20000000000005" y="-520.5" />
<point x="679.0643888888887" y="1832.0" />
<point x="85.80433333333315" y="1832.0" />
<point x="85.80433333333315" y="1073.0" />
<point x="69.33333333333337" y="1073.0" />
<point x="-65.66666666666663" y="36.5" />
</edge>
<edge source="Account" target="Storeable">
<point x="-22.444444444444457" y="113.5" />
<point x="925.6374444444443" y="928.0" />
<point x="647.0624999999999" y="928.0" />
<point x="647.0624999999999" y="1073.0" />
<point x="660.5624999999999" y="1073.0" />
<point x="0.0" y="-25.0" />
</edge>
<edge source="Account" target="DB">
<point x="5.6843418860808015E-14" y="-113.5" />
<point x="948.0818888888888" y="631.0" />
<point x="1002.375" y="631.0" />
<point x="-37.875" y="300.5" />
</edge>
<edge source="Storeable" target="Savings">
<point x="-76.0" y="-25.0" />
<point x="584.5624999999999" y="1073.0" />
<point x="200.66666666666663" y="1073.0" />
<point x="65.66666666666663" y="36.5" />
</edge>
<edge source="Main" target="ATM">
<point x="40.5" y="-25.0" />
<point x="890.7643888888888" y="2928.0" />
<point x="957.2643888888888" y="2928.0" />
<point x="107.0" y="520.5" />
</edge>
<edge source="Transaction" target="Storeable">
<point x="0.0" y="-91.5" />
<point x="392.6443888888887" y="1168.0" />
<point x="613.0624999999999" y="1168.0" />
<point x="-47.5" y="25.0" />
</edge>
<edge source="Console" target="Transaction">
<point x="0.0" y="-168.0" />
<point x="402.4999999999999" y="1406.0" />
<point x="392.6443888888887" y="1406.0" />
<point x="0.0" y="91.5" />
</edge>
<edge source="ATM" target="Transaction">
<point x="-85.60000000000002" y="-520.5" />
<point x="764.6643888888888" y="1802.0" />
<point x="157.0" y="1802.0" />
<point x="157.0" y="1406.0" />
<point x="354.6443888888887" y="1406.0" />
<point x="-38.0" y="91.5" />
</edge>
<edge source="Investment" target="Storeable">
<point x="-21.625" y="47.5" />
<point x="969.7068888888887" y="1073.0" />
<point x="736.5624999999999" y="1073.0" />
<point x="76.0" y="-25.0" />
</edge>
<edge source="ATM" target="Investment">
<point x="57.06666666666672" y="-520.5" />
<point x="907.3310555555555" y="1792.0" />
<point x="1021.9999999999999" y="1792.0" />
<point x="1021.9999999999999" y="1073.0" />
<point x="1012.9568888888887" y="1073.0" />
<point x="21.625" y="47.5" />
</edge>
<edge source="ATM" target="Console">
<point x="-57.066666666666606" y="-520.5" />
<point x="793.1977222222222" y="1792.0" />
<point x="402.4999999999999" y="1792.0" />
<point x="0.0" y="168.0" />
</edge>
<edge source="ATM" target="Checking">
<point x="142.66666666666674" y="-520.5" />
<point x="992.9310555555555" y="1822.0" />
<point x="1149.8318888888887" y="1822.0" />
<point x="0.0" y="13.0" />
</edge>
<edge source="Savings" target="Account">
<point x="-49.249999999999886" y="-36.5" />
<point x="85.75000000000011" y="898.0" />
<point x="858.304111111111" y="898.0" />
<point x="-89.77777777777777" y="113.5" />
</edge>
<edge source="ATM" target="User">
<point x="28.533333333333303" y="-520.5" />
<point x="878.7977222222221" y="1782.0" />
<point x="952.4999999999999" y="1782.0" />
<point x="118.0" y="146.5" />
</edge>
<edge source="Storeable" target="Account">
<point x="-38.0" y="-25.0" />
<point x="622.5624999999999" y="1073.0" />
<point x="636.0624999999999" y="1073.0" />
<point x="636.0624999999999" y="918.0" />
<point x="903.1929999999999" y="918.0" />
<point x="-44.88888888888886" y="113.5" />
</edge>
<edge source="ATM" target="Account">
<point x="114.13333333333344" y="-520.5" />
<point x="964.3977222222222" y="1812.0" />
<point x="1088.3318888888887" y="1812.0" />
<point x="1088.3318888888887" y="918.0" />
<point x="992.9707777777776" y="918.0" />
<point x="44.88888888888886" y="113.5" />
</edge>
<edge source="ATM" target="DB">
<point x="171.20000000000002" y="-520.5" />
<point x="1021.4643888888888" y="1832.0" />
<point x="1211.3318888888887" y="1832.0" />
<point x="1211.3318888888887" y="631.0" />
<point x="1078.125" y="631.0" />
<point x="37.875" y="300.5" />
</edge>
<edge source="Checking" target="Account">
<point x="25.5" y="-13.0" />
<point x="1175.3318888888887" y="898.0" />
<point x="1037.8596666666665" y="898.0" />
<point x="89.77777777777777" y="113.5" />
</edge>
<edge source="Investment" target="Account">
<point x="43.25" y="-47.5" />
<point x="1034.5818888888887" y="928.0" />
<point x="970.5263333333332" y="928.0" />
<point x="22.444444444444457" y="113.5" />
</edge>
<edge source="User" target="Transaction">
<point x="0.0" y="-146.5" />
<point x="834.4999999999999" y="1396.0" />
<point x="468.6443888888887" y="1396.0" />
<point x="76.0" y="91.5" />
</edge>
<edge source="Storeable" target="Investment">
<point x="38.0" y="-25.0" />
<point x="698.5624999999999" y="1063.0" />
<point x="926.4568888888887" y="1063.0" />
<point x="-64.875" y="47.5" />
</edge>
</edges>
<settings layout="Hierarchic Group" zoom="1.0" x="389.0" y="1298.0" />
<SelectedNodes>
<node>Main</node>
</SelectedNodes>
<Categories>
<Category>Fields</Category>
<Category>Methods</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
</Diagram>

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# project-2-ATM
Week 2 project: ATM Simulator

## Notes for Use
- The DB class defines database objects and a number of attendant methods to delete, search, modify, and add rows in the database
- Information is stored in csv files in the /data folder. An example data set is included and will be run when you run `main()`. Any changes to accounts, users, or additional transactions will be saved there. These files are in the `.gitignore`, so any changes you make locally wouldn't overwrite them
- There's one path test that has a hardcoded path from dev, which wasn't a great choice, but the user's `pwd` is used in the actual method, so the file paths will be fine when you test
- One example user, for convenience of entry during testing, has card number 1 and password 1234
- There are also a couple of test database files (`test.db` and `testbad.csv` which are used in certain tests. Other tests create and destory temporary database files
- Every time a user logs in, interest is earned on savings accounts and investments get returns, based on random chance and risk tolerance defined when creating the account


## ATM Requirements

Every feature must have corresponding unit tests
Expand Down
3 changes: 3 additions & 0 deletions data/accounts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"350","275","1320.0","Checking",""
"33","275","5560.36","Savings","0.06"
"2","275","53250.23","Investment","0.06"
4 changes: 4 additions & 0 deletions data/test.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"Item 1","Item 2","Item 3","Item 4"
"Item 1b","Item 2b","Item 3b","Item 4b"
"Item 1c","Item 2c","Item 3c","Item 4c"
"Item 1d","Item 2d","Item 3d","Item 4d"
4 changes: 4 additions & 0 deletions data/testBad.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"Item 1","Item 2","Item 3","Item 4"
"Item 1b","Item 2b","Item 3b","Item 4b"
"Item 1c","Item 2c","Item 3c"
"Item 1d","Item 2d","Item 3d","Item 4d"
Empty file added data/testaccountDB.csv
Empty file.
Empty file added data/testtransactionDB.csv
Empty file.
Empty file added data/testuserDB.csv
Empty file.
11 changes: 11 additions & 0 deletions data/transactions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"credit","350","1200.00","Tue Oct 29 13:19:54 EDT 2019","Opened account"
"credit","33","5670.30","Tue Oct 29 13:20:08 EDT 2019","Opened account"
"credit","2","45607.30","Tue Oct 29 13:20:21 EDT 2019","Opened account"
"credit","33","3.40","Tue Oct 29 13:20:27 EDT 2019","Interest earned"
"credit","2","2788.62","Tue Oct 29 13:20:27 EDT 2019","Investment returns"
"debit","33","-120.00","Tue Oct 29 13:23:18 EDT 2019","ATM Transfer"
"credit","350","120.00","Tue Oct 29 13:23:18 EDT 2019","ATM Transfer"
"credit","33","3.33","Tue Oct 29 13:24:46 EDT 2019","Interest earned"
"credit","2","3303.34","Tue Oct 29 13:24:46 EDT 2019","Investment returns"
"credit","33","3.33","Tue Oct 29 13:27:00 EDT 2019","Interest earned"
"credit","2","1550.97","Tue Oct 29 13:27:00 EDT 2019","Investment returns"
4 changes: 4 additions & 0 deletions data/users.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"719","john","jimmy","90486264","blorp"
"606","jones","jim","84170304","jimmy"
"275","peasy","easy","1","1234"
"827","davis","john","16690334","12345"
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,32 @@
<artifactId>project-2-atm</artifactId>
<version>1.0-SNAPSHOT</version>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.5</version>
</dependency>
</dependencies>

</project>
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/main/.DS_Store
Binary file not shown.
Loading