Skip to content

Commit c551733

Browse files
committed
New commit
1 parent ee95787 commit c551733

File tree

7 files changed

+90
-0
lines changed

7 files changed

+90
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
public class BalanceInquiry extends Transaction
3+
{
4+
public void execute()
5+
{
6+
7+
}
8+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
public class CashDispenser
3+
{
4+
private int count = 500;
5+
6+
public boolean isSufficientCashAvailable(int cash)
7+
{
8+
// made some extra stuff
9+
10+
boolean cashAvailability;
11+
12+
if(cash / 100 > 500)
13+
cashAvailability = false;
14+
else
15+
cashAvailability = true;
16+
17+
return cashAvailability;
18+
}
19+
20+
public void dispenseCash()
21+
{
22+
23+
}
24+
25+
26+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
public class Deposit extends Transaction
3+
{
4+
private double amount;
5+
6+
public void execute()
7+
{
8+
9+
}
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
public class Keypad
3+
{
4+
public int getInput(int keyInput)
5+
{
6+
return keyInput;
7+
}
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Class for object Transaction
2+
3+
public abstract class Transaction
4+
{
5+
private int accountNumber;
6+
7+
public int getAccountNumber()
8+
{
9+
return accountNumber;
10+
}
11+
12+
public abstract void execute();
13+
14+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Class withdrawal represents an ATM withdrawal transaction.
2+
3+
public class Withdrawal extends Transaction
4+
{
5+
// attributes
6+
private double amount; // the amount to be withdrawn
7+
private Keypad keypad; // reference to Keypad
8+
private CashDispenser cashDispener; // reference to cash dispenser
9+
10+
// no-argument constructor
11+
public Withdrawal()
12+
{
13+
14+
} // end no-argument Withdrawal constructor
15+
16+
// method overriding execute
17+
@Override
18+
public void execute()
19+
{
20+
21+
} // end method execute
22+
23+
24+
} // End class withdrawal

0 commit comments

Comments
 (0)