export class FundsCheck { private cashInAccount : number = 1000.00 ; public getCashInAccount ( ) { return this . cashInAccount ; } public decreaseCashInAccount ( cashWithdrawn ) { this . cashInAccount -= cashWithdrawn ; } public increaseCashInAccount ( cashDeposited ) { this . cashInAccount += cashDeposited ; } public haveEnoughMoney ( cashToWithdrawal ) { if ( cashToWithdrawal > this . getCashInAccount ( ) ) { console . log ( "Error: You don't have enough money" ) ; console . log ( "Current Balance: " + this . getCashInAccount ( ) ) ; return false ; } else { this . decreaseCashInAccount ( cashToWithdrawal ) ; console . log ( "Withdrawal Complete: Current Balance is " + this . getCashInAccount ( ) ) ; return true ; } } public makeDeposit ( cashToDeposit ) { this . increaseCashInAccount ( cashToDeposit ) ; console . log ( "Deposit Complete: Current Balance is " + this . getCashInAccount ( ) ) ; } }