incomplete lab 3
This commit is contained in:
parent
4abc213b6e
commit
95450b6beb
28
src/lab/three/one/Account.java
Normal file
28
src/lab/three/one/Account.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package lab.three.one;
|
||||||
|
|
||||||
|
public class Account {
|
||||||
|
|
||||||
|
private double balance;
|
||||||
|
public Account( double initialBalance )
|
||||||
|
{
|
||||||
|
if ( initialBalance > 0.0 )
|
||||||
|
balance = initialBalance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void credit( double amount )
|
||||||
|
{
|
||||||
|
balance = balance + amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getBalance()
|
||||||
|
{
|
||||||
|
return balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Debit(double debitAmount) {
|
||||||
|
if (debitAmount > balance) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user