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

Java Java Objects Creating the MVP Current Progress

John Anselmo
PLUS
John Anselmo
Courses Plus Student 2,281 Points

What do each of the files do?

I'm doing fine with the program I'm understanding it. I just would like to know the jobs of each of the files, why that certain file exists, what it does, and why not just use one large file.

Pleeaaase do so with these files: Game.java Hangman.java Prompter.java

I'd just like to know more about what each individual file does :D

1 Answer

sankalp yadav
sankalp yadav
2,101 Points

You asked a very nice question , why we are using three separate files because all i want to hid the logic .

alright if you are fan of Game of Thrones then Imagine you are king of the North , being king of North is not easy , you have to be discreet and protective of your family members and slaves and other elements last be responsible for your duties toward the kingdom.

Since you are king so on daily task basis you have to deal with many things among one of them is spy news and treachery element and yes the white-walkers .A king will never want his people to be in panic so you have to be super discreet in handling white walker thing and spy business .

Now you got me , in same way to hide all the business and logic to create three files and put it there off course you can put up all your logic in one file and it will work but the discretion will lost. Do you want that ?wise answer is NO .

in Short++++++++++ hangman.java is king game.java is kingly business prompter.java is spy talking to king .