-
Notifications
You must be signed in to change notification settings - Fork 0
/
Account.java
82 lines (64 loc) · 2.09 KB
/
Account.java
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
75
76
77
78
79
80
81
82
import java.util.Scanner;
public class Account extends Person {
Manager[]
manager = new Manager[1];
private String accountPin;
private String accountId;
private String accountName;
private int accountBalance;
private boolean accountInfo;
private boolean accountManager;
private String accountManagerId;
private boolean isManager = false;
public Account(String accountName, String accountId, String accountPin, int accountBalance) {
this.accountPin = accountPin;
this.accountId = accountId;
this.accountName = accountName;
this.accountBalance = accountBalance;
}
public String getAccountPin() {
return accountPin;
}
public String getAccountId() {
return accountId;
}
public String getAccountName() {
return accountName;
}
public int getAccountBalance() {
return accountBalance;
}
public boolean getaccountInfo() {
return accountInfo;
}
public boolean getAccountManager() {
return accountManager;
}
public void setAccountBalance(int balance) {
this.accountBalance = balance;
}
public void setaccountInfo(boolean accountInfo) {
this.accountInfo = accountInfo;
}
public void setManager(String managerId) {
Scanner inputAccountId = new Scanner(System.in);
manager[0] = new Manager();
manager[0].setManager(managerId);
manager[0].setHaveManager(true);
manager[0].setAccount(accountId, accountPin);
this.isManager = true;
this.accountManager = true;
System.out.println("Manager ID : " + manager[0].getManagerId());
}
public void getManagerInformation() {
System.out.println("Manager ID: " + manager[0].getManagerId());
System.out.println("Manager Password: " + manager[0].getManagerId());
System.out.println("Have Manager: " + manager[0].getManagerId());
}
public String getManagerId() {
return manager[0].getManagerId();
}
public boolean getIsManager() {
return isManager;
}
}