There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
The instructions for this section confused me a bit, because there was no lemonadeStand defined when it instructed me to call the advertise method on lemonadeStand. I believe the instructions should include a step to create the lemonadeStand object or it should already be apart of the boilerplate code to make it more clear for people who are just learning.
I am still having this issue as of 4/17/23. You can move on by selecting replace with solution. Even though nothing appears to change other than letting you move on.
How is productType able to switch between 2 strings? you’re storing whatever store name you created when using the store method, but if you create 2 it’s somehow able to print out different productType ? if that makes sense.
When you create a new store using the method, it should switch productType to whatever you put in the args of new Store, but it just somehow is different for each store even though it’s one string?
so for example:
Store lemonadeStand = new Store(“Lemonade”);
Store bookStore = new Store(“Books”);
lemonadeStand.advertise();
since I created the bookStore last, the productType string should be “Books” but when I use the lemonade stand to advertise, it somehow prints out “Selling Lemonade!” still. how is it possible?