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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Dinu Comendant](https://uploads.teamtreehouse.com/production/profile-photos/8558742/micro_67574933_472785873516384_4148477918722392064_n.jpg)
Dinu Comendant
6,049 PointsExercise error, or I don't fully understand something here?
The first task asks you to use -= and +=, so I did, and it counted, but then I've been looking at my formula and it didn't make sense. So I tried to write the formula differently, for example:
lapsDriven-=barCount;
lapsDriven+=barCount;
//
barCount-=lapsDriven;
lapsDriven+=barCount;
and so on, tried every method and the exercise will always tell me that it's correct, but I get the feeling that something is wrong and it doesn't make sense
1 Answer
![<noob />](https://uploads.teamtreehouse.com/production/profile-photos/10467642/micro_205-2059901_patrick-star-majin-buu.jpg)
<noob />
17,062 PointsHi, you understand it wrong, although this question is a little confusing but here is what u need to do:
public void drive(int laps) { lapsDriven += laps; barCount -= laps; }
they ask u to add a parameter to the method that represent the number of laps that a goKart user as drove. for example hypotatically let’s that laps = 3 then u drove 3 laps and then barCount decrement laps which holds 3 to know how many energy bars u wasted. laps is just a placeholder for the number of laps u drove, it is used to let the user to decide how many laps he will drive.