Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects (Retired) Delivering the MVP Defaulting Parameters

pallavi kakathkar
pallavi kakathkar
700 Points

Can some one help me with the challenge for 'Defaulting parameters’?

The error I am seeing is: Bummer! Looks like you did not add a new method signature for addItem to ShoppingCart. It should just take one parameter of (Product item)

Method signature is the method name and for the Java tasks, it's not really flexible (you must type the exact word that they want); e.g. for some tasks, it is expected to write "private String mSomething" for the variables. We can't just write "private String something"

Try this one: public void addItem(Product item) { //write your code here }

Hope this helps you.

1 Answer


could you already solve the problem? If not, please show us what you have already done you we can help you further.