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

Help with the mad lib prototype

I am trying to make a fully functioning mad lib, but for some reason it is not asking the right parts of speech and instead is just asking in the order that the strings are put into. Is making a fully working mad lib a little more advanced than this? Here is a link to my code.

https://w.trhou.se/vmeyduh14f

1 Answer

I am quite new to this; however, when I compiled and ran your code I noticed that only one noun variable was declared and I was able to input only one noun - I got the right order, but it looks like the story would need three different nouns to make sense. (I used the noun dog and got something to the effect of the dog running through the dog, etc...). This is only a guess, as I'm new on this track but just inferring from the mathematical definition of a variable - if you wanted three different nouns wouldn't you have to assign a different variable in each case?...Such as nounOne, nounTwo, nounThree, etc.... as you would with let's say three different x-coordinates by calling them x sub 1, x sub 2, x sub 3, etc... I could be way off but I'm just trying to see if that is a similarity that could be drawn here....