-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChecking.java
More file actions
32 lines (28 loc) · 798 Bytes
/
Checking.java
File metadata and controls
32 lines (28 loc) · 798 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
package bankaccountapp;
public class Checking extends Account {
private int debitcardNumber;
private int debitcardPIN;
public Checking(String name,String sSN,double initdeposit){
super(name,sSN,initdeposit);
accountNumber="2"+accountNumber;
setDebitCard();
}
@Override
public void setRate() {
rate=getBaseRate()*.15;
}
private void setDebitCard() {
debitcardNumber=(int)(Math.random()*Math.pow(10, 12));
debitcardPIN=(int)(Math.random()*Math.pow(10, 4));
}
@Override
public void showInfo() {
super.showInfo();
System.out.println(
"your Checking account features:"+
"\nDebit card Number: "+debitcardNumber+
"\nDebit card PIN : "+debitcardPIN+
"\nRate : "+rate+"%"
);
}
}