Git , Pocket Monster

  


Over the past week, I worked through every step of the Pocket Monsters stub project—from reordering the instance variables in Monster.java to implementing the dice‐rolling methods and creating each subclass stub. First, arranging the fields in the exact order required by the UML took careful attention: I had to manually type each declaration in the right sequence and adjust my getters and setters accordingly. Integrating the utilities.Dice.roll(...) calls into calculateAttackModifier(), calculateAttackPoints(), and calculateDefensePoints() challenged me to locate the correct import and ensure each method signature and return type was precise. I spent a bit of time tracking down a misleading compile error caused by an incorrect package path, which taught me the importance of verifying imports immediately after writing code.

Switching to Git introduced its own set of hurdles. Remembering to create and switch to the stubs branch before committing was critical—I initially committed to main and had to undo that before pushing. Crafting clear, multi‐line commit messages helped me document exactly what changed in each step, and staging only the files I intended prevented accidental commits of unfinished work. Writing the subclass classes (ElectricRat, WeirdTurtle, FlowerFireLizard, etc.) also required careful typing of the correct package declaration and constructor stub each time; missing the package line once led to a runtime error that took a few minutes to resolve. Seeing all four commits neatly displayed in IntelliJ’s Git tool window made me appreciate how a disciplined workflow and attention to detail lay the groundwork for larger, more complex projects.


Comments

Popular posts from this blog

Week 2 Learning Journal 5 Parts

Week 4 Journal

BOOK REPORT EXTRA CREDIT