-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathATM.java
More file actions
46 lines (37 loc) · 910 Bytes
/
ATM.java
File metadata and controls
46 lines (37 loc) · 910 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 ATM_Network_System;
/**
* ATM class that links the bank and the User
*
* @author Arvind Bhamidipati
* @version 1.0
*/
public class ATM {
private String associatedBankId;
private long MAX_WITHDRAW_LIMIT;
private Bank bank;
/**
* Create ATM Instance.
* @param associatedBankId
* @param bank
* @param MAX_WITHDRAW_LIMIT
*/
public ATM(String associatedBankId, Bank bank, long MAX_WITHDRAW_LIMIT){
this.associatedBankId = associatedBankId;
this.bank = bank;
this.MAX_WITHDRAW_LIMIT = MAX_WITHDRAW_LIMIT;
}
/**
* Prints the limitations set on how much a person can withdraw at a time.
*/
public void printATMStatus(){
System.out.println("Status for ATM with Bank ID: " + associatedBankId + " ATM max withdraw limit: " + MAX_WITHDRAW_LIMIT);
System.out.println();
}
/**
* Get Bank
* @return bank
*/
public Bank getBank(){
return this.bank;
}
}