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 trialRussell Moore
3,119 PointsMy code looks write, but the test won't let me through, I even tested it in workspace's and it compiles.....so idk
My code looks write, but the test won't let me through, I even tested it in workspace's and it compiles.....so idk
Keeps saying "Did you build a constructor...", yes I did, but it won't take it.
package com.teamtreehouse; import java.util.Date;
public class treet {
private String mAuthor; private String mTitle; private String mBody; private String mCategory; private String mDescription; private Date mCreationDate;
public treet(String author, String title, String body, String category, String description, Date creationDate){
mAuthor = author; mTitle = title; mBody = body; mCategory = category; mDescription = description; mCreationDate = creationDate;
}
public String getAuthor(){
return mAuthor;
}
public String getDescription(){
return mDescription;
}
public Date getCreationDate(){
return mCreationDate;
}
}
package com.example;
import java.util.Date;
public class BlogPost {
private String mAuthor;
private String mTitle;
private String mBody;
private String mCategory;
private String mDescription;
private Date mCreationDate;
public BlogPost(String author, String title, String body, String category, String description, Date creationDate){
mAuthor = author;
mTitle = title;
mBody = body;
mCategory = category;
mDescription = description;
mCreationDate = creationDate;
}
}
3 Answers
Ken Alger
Treehouse TeacherRussell;
I don't see anywhere in the directions in which it asks for a description field. Most of the time the challenges are rather explicit on what they want and if you put too much in, even if it is correct from a syntax standpoint, it won't let you pass. I believe that is the case here.
Ken
Michael C
3,230 PointsDid you tried to redo the challenge? I actually can't see any mistake in your code aswell...
Russell Moore
3,119 PointsYou were right Ken. Not sure why I was adding it, but I am sure that when I did it the error message that was presented was worded in a way that suggested I needed a description.
Thanks Guys!