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
Geocarlos Alves
13,969 PointsCall Center Challenge - Java Data Structures - Assist method call
LInk: https://teamtreehouse.com/library/java-data-structures/efficiency/call-center-queue
I cannot figure out what is wrong. The instructions say no other part of the code should be changed. I call the assist() method, I see its output on the preview, but even so I keep getting this 'Bummer' message:
"Bummer! Did you remember to call the assist method on the CustomerSupportRep?"
Can anybody help me spot what I've done wrong or is this challenge actually bugged?
Thanks.
Geocarlos Alves
13,969 PointsThanks for replying.
After some rest, I came back to the computer and figured it out.
The instructions is: " /******************************************** * TODO (1) * Wait until there is an available rep in the queue. * While there is not one available, playHoldMusic * HINT: That while assignmentcheck loop syntax we used to * read files seems pretty similar ******************************************** */"
And I had done this:
while(mSupportReps.poll()){ playHoldMusic(); }
and later, this:
csr = new CustomerSupportRep("James");
Whereas it should be this:
while(mSupportReps.isEmpty()){ playHoldMusic(); mSupportReps.add(new CustomerSupportRep("James")); }
csr = mSupportReps.poll(); csr.assist(customer);
However, the bummer message is misleading, as it keeps referring to the assist method, when my problem was in the loop.
Thanks again.
~ Geo
1 Answer
Balazs Peak
46,160 Pointsyou are most welcome. You have figured it out on your own - that is the best case scenario, because you've learned the most from it.
A lot of times, the "Bummer" messages are not exactly appropriate. Please note, that the technologies involved (processing regular expressions and machine learning) are a higher level of software development and are still very much evolving :)
Using treehouse for a while now, I already know with more than 80% certainty when the Bummer message is trying to bring me in a good or bad direction. You can learn a lot from good software, and you can learn even more from bugs, sometimes :)
Balazs Peak
46,160 PointsBalazs Peak
46,160 PointsCan I ask you to paste in the code you've wrote?