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 trialTimothy Van Cauwenberge
8,958 PointsOyster Bar program help
Hi, I have to create the program that reads the size of a group that enters a leaves an oyster bar, and the maximum for the bar is 100 people. If the program reaches the max the program should quit. It recommends to use negative numbers for when groups leave. I am completely lost on this please help
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsi don't know how the crowds are being input but a while loop might be appropriate, while occupancy <=100... add subtract add subtract add to occupancy, if it goes over 100 the loop will exit.
Caleb Kleveter
Treehouse Moderator 37,862 PointsCaleb Kleveter
Treehouse Moderator 37,862 PointsTimothy. I am not very fluent in Java so I am not sure what would be the best way to solve your problem. Hope you find the answer to your question!