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 trialvenix cador
1,128 Pointsneed help on how to check to see if the class need to be charged or not.
I am checking that class to see if it is empty or not and then base on that i can see if i need to call the charge function or not
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsIn this challenge, the GoKart
is not fully charged if the mBarCount
is less than the MAX_BARS
value. A boolean test for this can be stated as:
mBarCount < MAXBARS
Anthony Branze
4,887 PointsAnthony Branze
4,887 PointsCan you please include your code that you have so far. We can't really tell you what's going wrong without it. Try it with Java'''PasteYourCodeHere''' minus the **