-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeposit.java
More file actions
67 lines (67 loc) · 3.69 KB
/
Copy pathDeposit.java
File metadata and controls
67 lines (67 loc) · 3.69 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 Deposit 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 "Deposit" and I use the reserved word "extends" that refer to the inheritance and I define a subclass "Deposit" from a superclass "Transactions" */
public class Deposit extends Transactions{
/* Constructors of Deposit class......... */
/* Here I create the constructor of Deposit class (no-parameter) */
public Deposit(){
/* Here I use super() to invoke a superclass's constructors */
super();
}
/* Here I create the constructor of Deposit class (two parameters),the first parameter is of type String, the second parameter is of type double */
public Deposit(String Account_Number,double MoneyOfTransactions){
/* Here I use super to invoke a superclass's constructor that take two-argument(Account_Number,MoneyOfTransactions) */
super(Account_Number,MoneyOfTransactions);
}
/* Methods(Actions) of the Deposit 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: Deposit ,The number of account: "+getA().getAccount_Number()+" ,The amount of money: "+super.getMoneyOfTransactions()+"$ ,Date: "+super.getDatecreatedOfTransactions()+" ,"+Bank.printStatusOfOperation(Bank.getX().isCheckOfStatus());
}
/* Getter methods(Accessor methods)......... */
@Override/* Here I override the isCheckOfStatus method that is exist in the Transactions class */
public boolean isCheckOfStatus() {
return super.isCheckOfStatus();
}
@Override/* Here I override the getA method that is exist in the Transactions class */
public Accounts getA() {
return super.getA();
}
@Override/* Here I override the getMoneyOfTransactions method that is exist in the Transactions class */
public double getMoneyOfTransactions() {
return super.getMoneyOfTransactions();
}
@Override/* Here I override the getAccount_Number2 method that is exist in the Transactions class */
public String getAccount_Number2() {
return super.getAccount_Number2();
}
@Override/* Here I override the getDatecreatedOfTransactions method that is exist in the Transactions class */
public Date getDatecreatedOfTransactions() {
return super.getDatecreatedOfTransactions();
}
/* Setter methods(Mutator methods)......... */
@Override/* Here I override the setCheckOfStatus method that is exist in the Transactions class */
public void setCheckOfStatus(boolean checkOfStatus) {
super.setCheckOfStatus(checkOfStatus);
}
@Override/* Here I override the setA method that is exist in the Transactions class */
public void setA(Accounts a) {
super.setA(a);
}
@Override/* Here I override the setMoneyOfTransactions 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 setDatecreatedOfTransactions method that is exist in the Transactions class */
public void setDatecreatedOfTransactions(Date datecreatedOfTransactions) {
super.setDatecreatedOfTransactions(datecreatedOfTransactions);
}
}