Hangman Game

Passion

In an AP Computer Science I took as a Junior in high school, we were tasked with finishing a hangman program. It was a Java program in which we had to write a Hangman class that would be able to check for win and loss conditions, display the amount of the body that was “hanging”, and be able to take user input in order to actually progress through the game. I added an additional feature in which the user would be able to play by themselves or with another person. If the user chose to play solo, the game would choose randomly from an existing array of words, while in multiplayer, a second person could choose the word that the first person would have to guess. I thought that the project was interesting so I put a lot of time into making sure that I understood each aspect of the code and it was the first time in my life I felt the success of completing a difficult software project.

Reflection

This was a perfect beginner project for me in order to learn about object-oriented programming. Being able to create a class that implements different methods that work together in order to produce the game highlighted the importance of being able to code in chunks. I learned that if I were to try to create this all in one huge main method, many parts of the code would have intertwined, causing mass confusion. If anyone is interested in a starter Java project, I would recommend checking out the repository for this project and trying it out for themselves.