-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransfer.java
More file actions
67 lines (67 loc) · 3.71 KB
/
Transfer.java
File metadata and controls
67 lines (67 loc) · 3.71 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
/*****The Transfer class*****/
/* Here it's the default package */
package noureddinsameernaziralzar_2051710306;
/* Here I import the Date class */
import java.util.Date;
/* Here I design and implement a class and name it "Transfer" and I use the reserved word "extends" that refer to the inheritance and I define a subclass "Transfer" from a superclass "Transactions" */
public class Transfer extends Transactions{
/* Constructors of Transfer class......... */
/* Here I create the constructor of Transfer class (no-parameter) */
public Transfer(){
/* Here I use super() to invoke a superclass's constructors */
super();
}
/* Here I create the constructor of Transfer class (multiple parameters) */
public Transfer(String Account_Number,String Account_Number2,double MoneyOfTransactions){
/* Here I use super to invoke a superclass's constructor that take three-argument(Account_Number,Account_Number2,MoneyOfTransactions) */
super(Account_Number,Account_Number2,MoneyOfTransactions);
}
/* Methods(Actions) of the Transfer class......... */
@Override/* Here I override the toString method that is exist in the Object class */
public String toString(){
/* Here the method returns an assimilable String representation of the objects */
return "The transaction type: Transfer ,From "+getA().getAccount_Number()+" To "+getAccount_Number2()+" , The amount of money: "+super.getMoneyOfTransactions()+"$ ,Date: "+super.getDatecreatedOfTransactions()+" ,"+Bank.printStatusOfOperation(Bank.getX().isCheckOfStatus());
}
/* Getter methods(Accessor methods)......... */
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public boolean isCheckOfStatus() {
return super.isCheckOfStatus();
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public Accounts getA() {
return super.getA();
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public double getMoneyOfTransactions() {
return super.getMoneyOfTransactions();
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public String getAccount_Number2() {
return super.getAccount_Number2();
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public Date getDatecreatedOfTransactions() {
return super.getDatecreatedOfTransactions();
}
/* Setter methods(Mutator methods)......... */
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public void setCheckOfStatus(boolean checkOfStatus) {
super.setCheckOfStatus(checkOfStatus);
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public void setA(Accounts a) {
super.setA(a);
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public void setMoneyOfTransactions(double MoneyOfTransactions) {
super.setMoneyOfTransactions(MoneyOfTransactions);
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public void setAccount_Number2(String Account_Number2) {
super.setAccount_Number2(Account_Number2);
}
@Override/* Here I override the setAccount_Number2 method that is exist in the Transactions class */
public void setDatecreatedOfTransactions(Date datecreatedOfTransactions) {
super.setDatecreatedOfTransactions(datecreatedOfTransactions);
}
}