Question: must be written in java and work with the following classes. thank you. This is BankAccount test class Public class BankTester { //your code here

must be written in java and work with the following classes. thankmust be written in java and work with the following classes. thank you.

This is BankAccount test class

Public class BankTester {

//your code here

}

This is the BankAccount Class

Should not be changed

Public class BankAccount {

private double balance;

private String name;

private int acctNumber;

public BankAccount (String initName , int acct )

{

name=initName;

acctNumber=acct;

balance=0.0;

}

public void deposit(double amt)

{

balance=balance+amt;

}

public void withdraw(double amt)

{

balance=balance-amt;

}

public double getBalance()

{

return balance;

}

}

Write a BankAccountTester class whose main method constructs a bank account, deposits $1,000, withdraws $500, withdraws another $400, and then prints the remaining balance. Also print the expected result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!