Authur Edwards

Greenhorn
+ Follow
since Jan 19, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Authur Edwards

Yes, i need help with one last problem, this time it is to do with the logic of the code. I fixed up most errors, this is a debugging exercise after all, but one annoying logic error keeps popping up.

This is the Account class



If you look at all the other classes I have posted, I am having trouble with the actual transfer_Action method, or something in the Savings class. when I hit the transfer button, it takes away money from the savings account, but fails to add it to the credit account, and the credit display value doesn't change. I might be asking for to much, but it would be good to get this logic error fixed. It is really annoying me.

I could possibly e-mail anyone all the corrected code.
17 years ago
thank you for all the advice. I figured it was something to do with not throwing an exception, or something related. I have gotten the program to compile by adding the following to the transfer_Action method. I think it is okay, but i would still like advice on if i was right doing the changes.


The Changed method in MudvilleInterface


The above change seems to make the program compile.

Here are the savings and credit classes, if they are any help


And the credit class

17 years ago
Hello, I don't know if the beginners forum is the right place for this but i will give it a go. I am having trouble trying to find the cause of this error message, "unreported exception NotEnoughMoney; must be caught or declared to be thrown" Line 315

I think i may have messed up the formating of the code, when i cut and pasted it into this post, hopefully you can make it out. I am presuming that this error is syntactic, and has something to do with the "withdraw_Action, or the transfer_Action methods near the bottom of the code.

Any help, in getting rid of this compiler method would be appreciated would be very much appreciated, very much. Sorry about the length of code included in the post


NB, this is for a educational course, but i don't think it violates any board rules to post something like this here?
cheerio









Also the following is the definition of the NotEnoughMoney exception, don't know if it is needed.

17 years ago