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 trialcoder5837
1,535 PointsTHESE FREAKING QUESTIONS NEVER GET ANSWERED
CAN SOMEONE PLEASE JUST ANSWER THIS QUESTION TREEHOUSE IS A CRAPPY COMPANY THAT WONT EVEN HELP ME CAN SOMEONE JUST HELP ME PLEASE THEIR LAZY BUTTS ARE TOO STUPID TO EVEN DO ANYTHING BUT GIVE PEOPLE CHALLENGES
public class GoKart {
public static final int MAX_ENERGY_BARS = 8;
private String mColor;
private int mBarsCount;
public GoKart(String color) {
mColor = color;
mBarsCount = 0;
}
public String getColor() {
return mColor;
}
public void charge() {
mBarsCount = MAX_ENERGY_BARS;
}
}
public boolean isBatteryEmpty() {
return mBarsCount == 0;
}
public boolean isFullyCharged() {
return mBarsCount == MAX_ENERGY_BARS;
}
public boolean charge() {
boolean isFullyCharged = false;
while (!isFullyCharged) {
mBarsCount++;
}
}
}
3 Answers
Geoff Parsons
11,679 PointsWhat exactly is your question?
Ollie Prentice
11,685 PointsFirst... Chill.
Looks like the incrementing question.
You don't need to create a new method as you already have one for charge.
Move your code up to the charge method and add brackets as shown below.
public void charge() {
while (!isFullyCharged()) {
mBarsCount++;
}
}
Craig Dennis
Treehouse TeacherHi Emily,
Sorry you are frustrated. I'm trying to follow your complaint through the forum, and I think you'll find that questions that include code and a well thought out question actually do get answered, very frequently.
Based on the past 5 questions, all but one had an answer, and from what I could deduce, the correct answer, however they were not acknowledged as being the best answer. Are you still stuck on those?
Not sure what the caps lock tirade was attempting to accomplish, but if there is something I can do to help you here I'd be glad to do so, despite the tone.
I apologize for missing the time when you needed help so bad. I am in the process of writing the latest course, and I was heads down this week.
If you'd like to talk more about this in a less public setting please feel free to email me directly.
Again sorry that you got this frustrated, and please select best answer on the problems you are no longer stuck on.
Hope you are feeling better and back at it,
Craig
Farouk Charkas
1,957 PointsFarouk Charkas
1,957 PointsSo Geoff Parsons is someone from Team Treehouse (not a crappy company), and is he a lazy butt, no, he is nice enough to help you after all the mean things you have said to his employing company, be patient when asking questions