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, 2 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 06 Nov 2017 My Price 10.00

test code provided by teacher is attached along with the starting code

help! test code provided by teacher is attached along with the starting code

import java.util.*;
import java.io.*;
/**
 * A bank account has a balance and a mechanism for applying interest or fees at
 * the end of the month. TODO: Implement the Formattable interface
 */
public class BankAccount
{
    private double balance;

    /**
     * Constructs a bank account with zero balance.
     */
    public BankAccount()
    {
        balance = 0;
    }

    /**
     * Constructs a bank account with a given balance.
     */
    public BankAccount(double amount)
    {
        balance = amount;
    }
    
    /**
     * Makes a deposit into this account.
     *
     * @param amount the amount of the deposit
     */
    public void deposit(double amount)
    {
        balance = balance + amount;

help! test code provided by teacher is attached along with the starting code

2017-08-01 (2).png


    }

    /**
     * Makes a withdrawal from this account.
     *
     * @param amount the amount of the withdrawal
     */
    public void withdraw(double amount)
    {
        balance = balance - amount;
    }

 
    /**
     * Gets the current balance of this bank account.
     *
     * @return the current balance
     */
    public double getBalance()
    {
        return balance;
    }

    //TODO: Your work goes here
    

    /**
     * Some quick self-tests to see if you've done the
     * formatting correctly.
     * @param args
     */
    public static void main(String[] args)
    {
       BankAccount account1 = new BankAccount(1000);
       BankAccount account2 = new BankAccount(55);
       BankAccount account3 = new BankAccount(345);
       BankAccount account4 = new BankAccount(99000);

       System.out.printf( "Actual  : |%10s|%10s|%10s|%10s|%n", account1, account2, account3, account4);
       System.out.println("Expected: |    1000.0|      55.0|     345.0|   99000.0|");
    }
    
}

Attachments:

Answers

(5)
Status NEW Posted 06 Nov 2017 01:11 PM My Price 10.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)