CST 338 - Week 4 - Legally Distinct Learning Journal
I worked with Branden from my team.
With this assignment (and with most assignments) I always try to work directly off the prompt, filling out each defined method from the UML diagram of the assignment. Once I feel good about implementation, I use the unit test as a guide to help debug and get each function fully ironed out. Afterwards I go back in, format and clean up variable names and add single line comments for clarity. Through this process I am working through the logic in my code 2-3 times which leads to a cleaner output.
Branden mentioned his strategy was, “For Project 1, I took it one step at a time. I started with the Monster class and followed the prompt closely, making sure each method matched what was expected, especially with things like output formatting and phrases. I tested as I built each part, and when something didn’t work, I used the error messages to figure out what needed fixing. I created each monster type one by one and kept everything organized using Git branches. This approach helped me stay on track and avoid getting overwhelmed.”
I wouldn’t! My strategy worked pretty well.
Branden mentioned this about my code: “code mostly follows the Google Java Style Guide well. His class and method structure is organized, naming conventions are consistent, and he uses Javadoc-style comments throughout. There are a few areas for improvement, such as making fields private, marking constants like MAX_HP as final, and cleaning up some spacing and comment formatting. Overall, the code is readable and well-structured with only minor style adjustments needed.”
As usual, I do think that the hardest part is wrapping your head around the entire prompt first before jumping into the code. It’s important to understand the loose structure of what you’re trying to build first.
For LDPM in particular, it was a really good insight into how inheritance and overrides in Java work. I can see how important the patterns are to pure object oriented code. In fact, after finishing it I could see even more areas for refactoring as there was a lot of boilerplate in each of the child classes that could be placed directly in the parent class or separated as utils.
Definitely just being able to complete the assignment! As someone who hasn’t written a ton of Java I’m proud of being able to work through it.
Sleep! No, just kidding. I usually reward myself with a nice meal on the weekend! This weekend I had Thai food.
Comments
Post a Comment