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 Creating the MVP Getting Started

1 Answer

Dave Jindal
Dave Jindal
4,000 Points

Hey Kenneth,

that's most likely because the Hangman class is like the top level of the application. It's the casing so to speak. In it, there is the main method, which is the entry point of your application.

The game class, is just for the game logic, for example where you will have the variables that represent the state of the game.

The prompter class will be there to handle the input and output. This means it will display information and also read information to/from the user.

So what you actually want is to create an instance of the game and also an instance of the prompter, which will act as a mediator between the user and the "game". The game though, is not a part of the prompter and therefore doesn't belong inside of the Prompter class.

I hope i could clear things up, if not, maybe you want to narrow down your question a little bit.

Cheers, Dave