diff --git a/src/lab/three/one/Account.java b/src/lab/three/one/Account.java index e57bbd9..6ebc1e7 100644 --- a/src/lab/three/one/Account.java +++ b/src/lab/three/one/Account.java @@ -1,34 +1,34 @@ -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 void debit(double amount ) { - double newBalance = balance - amount; - if (newBalance < 0) { - System.out.println("Debit amount exceeds balance."); - } - else - balance = newBalance; - - } - - public double getBalance() - { - return balance; - } -} - +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 void debit(double amount ) { + double newBalance = balance - amount; + if (newBalance < 0) { + System.out.println("Debit amount exceeds balance."); + } + else + balance = newBalance; + + } + + public double getBalance() + { + return balance; + } +} +