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 trialCole Turner
5,872 PointsConferenceRegistrationAssistant: not 100% sure what this code is asking me to do. I defined a Line 1 & Line 2
I'm not sure what I am supposed to do for this exercise. I defined a Line 1 & Line 2 and have the last names sorted accordingly. Can I please have some clarification on what I am supposed to do and how my code is wrong. Thanks!
public class ConferenceRegistrationAssistant {
private String mLine1;
private String mLine2;
public int getLineFor(String lastName) {
/* If the last name is between A thru M send them to line 1
Otherwise send them to line 2 */
if (lastName.charAt(0) < 'M') {
mLine1 = mLine1 + lastName;
} else {
mLine2 = mLine2 + lastName;
}
int line = 0;
return line;
}
}
Cole Turner
5,872 PointsCole Turner
5,872 Pointsfigured it out from a former forum post, follow this link if you have the same question:
https://teamtreehouse.com/forum/i-have-no-idea-how-to-solve-the-challenge-on-stage-3-in-creatin-the-mvp