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!
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
dunno what to do
I don't get what they want me to do here, don't give me the answer, but can someone explain what they want here? Thanks!
Durim Kryeziu14,002 Points
Hi Pixel HD,
So please read again the Example.java file after reading my answer :)
They want from you to create another method (wisely, because the topic is about refactoring, be careful DRY pattern ;) ) that allows others to be able to add an item using just
addItem(itemHere) which means add 1 itemHere on the cart
Hope it helps! If not, just let me know, I'll answer the challenge and explain to you why you should do it that way :)
Seth Kroger56,412 Points
They're asking you to add a second method to the ShoppingCart class. The method's name, which you should see in the commented out code in main() has the same name as the first, but with a different list of arguments.