-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccount.java
More file actions
49 lines (38 loc) · 900 Bytes
/
Copy pathAccount.java
File metadata and controls
49 lines (38 loc) · 900 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
47
48
49
public class Account {
private int accNo;
private String ownerName;
private float balance;
public Account() {
accNo = 101;
ownerName = "Cyberia";
balance = 999000f;
}
public Account(int accNo, String ownerName, float balance) {
this.accNo = accNo;
this.ownerName = ownerName;
this.balance = balance;
}
public void setaccNo(int accNo) {
this.accNo = accNo;
}
public void setownerName(String ownerName) {
this.ownerName = ownerName;
}
public void setbalance(float balance) {
this.balance = balance;
}
public int getaccNo() {
return accNo;
}
public String getownerName() {
return ownerName;
}
public float getbalance() {
return balance;
}
public void displayAccount() {
System.out.println("Account No:" + accNo + ".");
System.out.println("Account Holder Name:" + ownerName + ".");
System.out.println("Account Balance:" + balance + ".");
}
}