Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Tracey King   on Sep 16 In Java Category.

  
Question Answered By: Scott Simmons   on Sep 16

Well, here are some problems I see:

1.) customer.addAccount() takes an int as its arg, but you tried to send
it Account objects.
2.) customer.getAccount() takes no arg and returns a double (I am sure
that is not what you want).
3.) You are missing an opening bracket at these lines:

if (account instanceof CheckingAccount)
account_type = "Checking Account";
}

It should be:

If (account instanceof CheckingAccount){
account_type = "Checking Account";
}


There are other errors as well, but since the compiler hasn’t found them
yet, I will let you see them when they arrive. Part of the hardest part
of programming is debugging, as you are undoubtly now learning. Stick
with it though and it will make sense.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on can't compile the TestBanking.java Or get search suggestion and latest updates.


Tagged: