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 trialJulie Austin
1,322 PointsHow to check barCount?
So I'm doing the exercise where we set the GoKart to fill with MAX_BARS which I did but now the exercise is asking me to create a private field called barCount that tracks how many bars the GoKart currently has but you DID NOT teach this! You only showed how to fill the bar count!
Julie Austin
1,322 PointsThis is the link to the video right before the barCount assignment.
1 Answer
KRIS NIKOLAISEN
54,971 PointsWhat you are being asked to do is very similar to the video. But instead of MAX_PEZ, pezCount
and fill()
you will be using MAX_BARS, barCount
and charge()
Creating the private field is at the very being of the video and is done by declaring:
private int pezCount;
For the challenge you will have:
private int barCount;
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsCan you provide a link to the video?