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 trialJackson Young
8,987 PointsJava Objects < Wrapping Up Challenge: Completely Lost
Can someone please post a step-by-step on how to complete the four parts of this challenge? I have been working for 30 minutes+ to try and figure this out and am admittedly lost. I may need to go back to previous sections for further clarity, but any information would be greatly appreciated! Thank you so much.
1 Answer
Jeremiah Montano
7,221 PointsI'm happy to assist.
1) Uncomment the lines in Forum.java at the bottom where it tells you to uncomment them.
2) Uncomment the following lines from Example.java
Forum forum = new Forum("Java");
// Take the first two elements passed args
User author = new User();
// Add the author, title and description
ForumPost post = new ForumPost();
forum.addPost(post);
3) Start bug fixing. The first line we notice is we need to take the main args array to use for First and Last name like this:
User author = new User(args[0], args[1]);
4) Next, add author, title, and description.
ForumPost post = new ForumPost(author, "A title you choose", "any description you want");
One you complete that, the challenge will be completed. I hope this helps understand what was needed to complete this challenge. If you have any questions, feel free to ask.
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherJackson;
Pleased to assist, but don't want to just give you the answer(s).
Where are you stuck specifically?
Ken