-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankApp.java
More file actions
46 lines (37 loc) · 1018 Bytes
/
BankApp.java
File metadata and controls
46 lines (37 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package BankApplicationpack;
import java.util.LinkedList;
import java.util.List;
public class BankApp {
public static void main(String[] args) {
// TODO Auto-generated method stub
/*Savings sav1 = new Savings("DINESH","2567w8r3i975454398",100000);
sav1.showinfo();
sav1.compound();
*/
List<Account> list = new LinkedList<Account>();
String file = "/home/priya/Downloads/original.csv";
List<String[]> newCustomers = utilities.Csv.read(file);
for(String[] acholder : newCustomers)
{
String name = acholder[0];
String ssN = acholder[1];
String accounttype = acholder[2];
double initDeposit = Double.parseDouble(acholder[3]);
if(accounttype.equals("Savings"))
{
list.add( new Savings(name,ssN,initDeposit));
}
else if(accounttype.equals("Checking"))
list.add(new Current(name,ssN,initDeposit));
else
{
System.out.println("Error creating account");
}
}
for(Account ac : list)
{
ac.showinfo();
System.out.println();
}
}
}