-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccount.java
More file actions
74 lines (60 loc) · 2 KB
/
Account.java
File metadata and controls
74 lines (60 loc) · 2 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
public class Account {
private String number;
private double balance;
private String customerName;
private String customerEmailaddress;
private String customerPhonenumber;
public Account(){
System.out.println("Empty Constructor called");
}
public Account(String number,double balance,String customerName,String customerEmailaddress,String customerPhonenumber){
this.number=number;
this.balance=balance;
this.customerName=customerName;
this.customerEmailaddress=customerEmailaddress;
this.customerPhonenumber=customerPhonenumber;
}
public void deposit(double depositAmount){
this.balance+=depositAmount;
System.out.println("Now the available balance is: "+this.balance);
}
public void withdrawl(double withdrawlAmount){
if(this.balance-withdrawlAmount<0){
System.out.println("Only balance available "+this.balance+" only available");
}
else {
this.balance-=withdrawlAmount;
System.out.println("Withdrwal amount processesd "+withdrawlAmount);
}
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public double getBalance() {
return balance;
}
public void setBalance(double balance) {
this.balance = balance;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerEmailaddress() {
return customerEmailaddress;
}
public void setCustomerEmailaddress(String customerEmailaddress) {
this.customerEmailaddress = customerEmailaddress;
}
public String getCustomerPhonenumber() {
return customerPhonenumber;
}
public void setCustomerPhonenumber(String customerPhonenumber) {
this.customerPhonenumber = customerPhonenumber;
}
}