CST 338 Week 2 Journal

 CST 338 Week 2 Journal

HW 01: Jotto

    The Jotto assignment was challenging and fun. I don't recall any unit tests that were challenging to pass. I focused mainly on creating the Jotto program so that it would mimic the demo given to us in the prompt. Doing this meant that the unit tests passed after I fixed some formatting issues. I formatted it based on how I would have preferred the text to be spaced out, but that caused some issues with the unit tests. Debugging those formatting issues was as simple as seeing which test was failing, checking which line in particular wasn't passing, and then changing my code slightly so that it would pass. The getLetterCount method was the most challenging but satisfying to complete. It was challenging because I chose to create the method so that it could account for multiple characters in a string. I did this by creating an ArrayList of Strings. This list would then hold the substrings of 1 character each from the original string. I found this to be the best method for checking duplicates as the ArrayList object has a remove method that makes it easier to keep track of which characters have been found in common.

Week 1:

    During week 1, we worked on working with String objects. There was some work done on maps, lists, and arrays. Learning the different methods associated with these objects allowed me to quickly put together plans for how I would approach problems. Maps are objects that store a pair of values. This pair is stored as a key and value set. Each key is paired to one value. A key can point to only one value. Duplicates of a value in a map are allowed. For example, if A and B are keys in a map, then they can both hold the Integer 1 simultaneously with no issue. CodingBat has been a great tool for practicing my problem solving skills. I am also able to practice using methods and functions so I can access them from memory more easily the next time I solve a similar problem.

Comments

Popular posts from this blog

CST 300 Fourth Week Journal

CST 300 Second Week Journal

CST 300 First Week Journal