Question: need to update this file import static org.junit.Assert.*; import org.junit.Test; public class BankAccountIA3Test { // test constructors @Test public void test_creation(){ BankAccount b = new


need to update this file

import static org.junit.Assert.*;
import org.junit.Test;
public class BankAccountIA3Test { // test constructors @Test public void test_creation(){ BankAccount b = new BankAccount(); assertEquals("Expected initial balance to be 0.0", 0.0, b.getBalance(), 0.00001); String actualAccountNumber = b.getAccountNumber(); assertEquals("Account number should have exactly length 4 (4 digits)", 4, actualAccountNumber.length()); int num = Integer.parseInt(actualAccountNumber); assertTrue("Account number should be a number between 1 and 9999 (inclusive)", 1
String actualAccountNumber = b.getAccountNumber(); assertEquals("Account number should have exactly length 4 (4 digits)", 4, actualAccountNumber.length()); int num = Integer.parseInt(actualAccountNumber); assertTrue("Account number should be a number between 1 and 9999 (inclusive)", 1
String actualAccountNumber = b.getAccountNumber(); assertEquals("Account number should have exactly length 4 (4 digits)", 4, actualAccountNumber.length()); int num = Integer.parseInt(actualAccountNumber); assertTrue("Account number should be a number between 1 and 9999 (inclusive)", 1
String actualAccountNumber = b.getAccountNumber(); assertEquals("Account number should have exactly length 4 (4 digits)", 4, actualAccountNumber.length()); int num = Integer.parseInt(actualAccountNumber); assertTrue("Account number should be a number between 1 and 9999 (inclusive)", 1 )
1 public class BankAccount private double balance; private String accountNumber; 4 6 public double getBalance() return this.balance; 10 public String getAccountNumber) return this.accountNumber 12 13 @override 15 public String toString) 16 return ""this.accountNumber+":"+ String.value0f (this.balance) +"; 18 19 public void deposit (double amount) if (amountbalance 21 this.balance -balance +amount; 23 4 public void withdraw(double amount) 25 26 27 28 29 public BankAccount) 30 31 32 if (amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
