Week 5 CST 338 Learning Journal
Who did you work with?
I worked with Sami Hobson and Luis Valadez.
What was your strategy for solving the Markov assignment? Did you start writing code right away? Did you plan it out on paper?
My strategy: For this assignment, I started by looking at the UML diagram and used it to guide how I set up my class. I began with the constructor and declared all the required fields so the overall structure was in place. After that, I didn’t follow the exact order of the method list in the project file. Instead, I built the methods based on how they were connected. If one method called another, I made sure to write the called method first. I focused on building the most independent methods first—the ones that didn’t rely on any others—and then moved on to the ones that used them. This approach helped me test things step by step and made it easier to build the more complex parts of the program later on.
What was THEIR strategy for solving the Markov assignment?
Luis's strategy: I watched the videos provided first then read through the prompt. I split what methods would fall under the dictionary branch and which would be under the sentence branch. I referred to the UML diagram to build the members and a shell of methods with //TODOs to keep me organized. As I worked through each explanation of the members and methods of the Markov class, I ran the isolated tests for each.I also created the Javadoc comments as I worked on each method to help reinforce how the logic should flow. Once I finished the dictionary and sentence branch I was able to run the MarkovTests which led me to modify the the addWord method. The MarkovTest.java seemed to be missing an import for asserting false, once that was imported all tests passed and I checked the remaining text files to ensure the Markov chain was working properly.
Sami's strategy: I started by reviewing the UML diagram and the assignment prompt to get a clear idea of how the class was supposed to be structured. I didn’t jump straight into coding, instead, I made a rough plan of the main methods and their purpose. I began by setting up the class structure and adding the fields and constructors so everything was laid out. Then, I focused on one section at a time, starting with the simpler methods that didn’t depend on others. As I added methods, I tested them with the provided files to make sure everything was working before moving on. This step-by-step process helped keep things organized and made it easier to debug when something didn’t work as expected. I will attach my Markov files when I get home! But I figured I would go ahead and send this over to ya so you can kinda get started!
How would you change your strategy having worked on the assignment?
Honestly, I don’t think I would’ve changed much about my strategy. I liked the way I started by building the smaller, independent methods first and then worked my way up to the ones that called them. That helped keep everything organized in my head. Maybe I could have gone through and written down my strategy first before starting. This may have helped me stay even more organized.
According to your classmate(s): how well does your code follow the Google Java Style Guide
Overall, my teammates only found two mistakes, one of them being a wild card import and the other being a format issue regarding my if else statements. I fixed them and am very grateful for the insight!
Comments
Post a Comment