Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Objects Delivering the MVP Using Method Overloading

Viewing the teacher's Workspace

Can i go onto the workspace that the teacher used for the video to compare mine to his to see what i did wrong, because i have a ton of errors and i have no idea where to start.

2 Answers

Jay Padzensky
Jay Padzensky
4,719 Points

Hi Fabian,

Thanks for writing. My apologies, we don't have the teacher's Workspaces available. I may recommend rewatching the videos to compare your code against theirs. This review is a great opportunity to make sure new concepts are solidified. Good luck!

Richard Williams
Richard Williams
856 Points

this is very annoying. I just want to see what is inside the isHit method. How do I know which video to go back to?

Is this the part you're looking for, @RichardWilliams5?

    public boolean promptForGuess() {
        Scanner scanner = new Scanner(System.in);
        boolean isHit = false;
        boolean isAcceptable = false;

        do {
            System.out.print("Enter a letter:  ");
            String guessInput = scanner.nextLine();
            try {
                isHit = game.applyGuess(guessInput);
                isAcceptable = true;
            } catch(IllegalArgumentException iae) {
                System.out.printf("%s. Please try again. %n",
                iae.getMessage());
            }

        } while(! isAcceptable);
        return isHit;
    }