Lyrrca Card

49 views
Skip to first unread message

caseysc...@gmail.com

unread,
Apr 5, 2015, 7:26:16 PM4/5/15
to moo...@googlegroups.com
Hi,

I'm having problems with week 5 exercise 86.
I'm getting the following error.
When paying Economical lunch with 4 euros  (with call register.payEconomical(4)) the change should be returned correctly. expected:<1.5> but was:<-1.0>
The link to my work is here: PASTE TMC PASTEBIN LINK HERE

Best regards


Supported languages are English and Finnish

Please use our build in TMC Pastebin when asking questions related to your code  
 
TMC Plugin has built-in code sharing feature. 
In NetBeans, select TMC -> Send code to TMC pastebin. Copy the link you receive and paste it to your message.  

You may use our web interface to share code snippets: http://paste.mooc.fi

Joni

unread,
Apr 7, 2015, 3:31:51 AM4/7/15
to moo...@googlegroups.com
Hi,

In your payEconomically method there is

return -1;

Which is why the method returns one instead of correct change. Check the assignment or the comment in the method.

BR
Joni
Reply all
Reply to author
Forward
0 new messages