Excercise 86 week 5 Lyyra card and cash register problem

170 views
Skip to first unread message

ossu...@gmail.com

unread,
Mar 23, 2015, 6:51:50 AM3/23/15
to moo...@googlegroups.com
Hi,

I'm having problems with week _ exercise _.

*Explain your problem here in English or Finnish*

The link to my work is here: PASTE TMC PASTEBIN LINK HERE
https://tmc.mooc.fi/mooc/paste/NauRMUXePOYPryfMfr_8pQ

It comes up with this error. Do not add new instance variables to CashRegistry those are not needed.

I can not see where the problem is, which variable?


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

ossu...@gmail.com

unread,
Mar 23, 2015, 6:58:02 AM3/23/15
to moo...@googlegroups.com, ossu...@gmail.com
Sorry week 5 exercise 86.

Joni

unread,
Mar 23, 2015, 8:00:35 AM3/23/15
to moo...@googlegroups.com, ossu...@gmail.com
As the error message says

Do not add new instance variables to CashRegistry, those are not needed!, NOTE: if you need to save lunc prices to instance variables, do it as follows private static final double PRICE_OF_ECONOMICAL = 2.5;

You should remove the following variables 
private double economicalPrice;
private double gourmetPrice;
private double change;
private double balanceOfcard;

-Joni

ossu...@gmail.com

unread,
Mar 23, 2015, 12:01:07 PM3/23/15
to moo...@googlegroups.com, ossu...@gmail.com

Thank you for the answer.
Reply all
Reply to author
Forward
0 new messages