Skip to main content

Broken Code... help!

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-09-22

// The Account class has been modified by adding two instance variables containing the customer's name and account number.
// Primary constructor for the account class has three parameters: balance, customer name, and account number.
// Instance methods have been name getCustomerName and getAccountNumber with a TestAccount class to test new the new
// constructor and five new methods.

public class TestAccount {

public static void main(String[] args) {

Account acct1 = new Account(100.00, 000);

Account acct2 = new Account(200.00, 111);

Account acct3 = new Account(300.00, 222);

acct1 = acct2;





public acct2.Account(String(getFirstName), String(getLastName));
firstName = Tom;
lastName = Whiten;

public acct3.Account(String(getFirstName), String(getLastName));
firstName = Mike;
lastName = More;

System.out.print( + acct1.getFirstName + acct1.getLastName);
System.out.print(" has " + acct1.getID());
System.out.print("$" + acct1.getBalance());
System.out.println(" in the bank.");

System.out.print( + acct2.getFirstName + acct2.getLastName);
System.out.print(" has " + acct2.getID());
System.out.print("$" + acct2.getBalance());
System.out.println(" in the bank.");

System.out.print( + acct3.getFirstName + acct3.getLastName);
System.out.print(" has " + acct3.getID());
System.out.print("$" + acct3.getBalance());
System.out.println(" in the bank.");