SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 4 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 15 Oct 2017 My Price 9.00

Keep getting insufficient funds exception when trying to withdraw funds. Please help thanks

/*** Created by bigh2 on 9/14/2017.*/public class Account {private final double serviceChargeAmt = 1.5;private double balance;private int withdrawal;// Constructorpublic Account() {balance = 0.00;withdrawal = 0;}// Method to get service chargesprivate double getServiceCharges() throws InsufficientFunds {if(withdrawal > 4) {if(balance - serviceChargeAmt < 0)throw new InsufficientFunds();}return balance - serviceChargeAmt;}// Method that will withdrawpublic void withdraw(double amount) throws InsufficientFunds {withdrawal++;double serviceCharges = getServiceCharges();if (balance < amount + serviceCharges) {throw new InsufficientFunds();}balance = balance - amount - serviceCharges;}// Method that will depositpublic void deposit(double amount) {balance = balance + amount;}// Method that will transfer between accountspublic void transfer(double amount, Account targetAccount) throwsInsufficientFunds {if(balance < amount)throw new InsufficientFunds();balance = balance - amount;targetAccount.deposit(amount);}// Method to receive the balance of the accountpublic double getBalance() {return balance;}}
Background image of page 1

Answers

(5)
Status NEW Posted 15 Oct 2017 09:10 AM My Price 9.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)