CST338 - Module 3

    This week has us start on our first project which would be the first time we get our hands wet with using abstract classes and concrete classes. However, that is still in the works. Additionally, we were tasked with creating a program called Markov, but I will likely talk about that in next week's post. 

    However, what I will talk about is more on our previous homework assignment called Jotto. This week we were allowed to review our classmates' solutions to their Jotto code. I reviewed two of my teammates' work (Ryan and Maria), and two of my other teammates reviewed my work, (Meagan and Chris). Overall, it seems there is nothing wrong functionally with the code (as in it doesn't break). However, I could do better by not repeating code in different areas and assigning hard to read values to an easy-to-read value to be clearer about what I'm trying to accomplish. I can also be a bit clearer with my commenting because currently, I may have oversimplified each method. I may have also misinterpreted how I should change a certain value after finishing the guess() method where the user is able to play the game. Otherwise, I believe my code has good formatting and avoided meaningless variable names.

    Along with the Jotto.java file, we also had to test it with a Junit test for each method of the class. I passed most of them in the first try, but ones that failed took me a while to fix. More notably, the test for the getLetterCount() method where it takes in a string and compares how many similar letters it has compared to another. It was recommended to use str.indexOf(), but I wasn't sure how to implement it, so I opted to use str.substring(). After having to constantly remind myself of how to determine the bounds of the substring, I was finally able to pass the test. Overall, the test functions we were given were good to test most aspects of the code, however, one change in particular I would make is to have the getLetterCount() test for an anagram.

    Besides struggling with the getLetterCount() test. I also struggled with interpreting someone else's instructions. I'm sure this will likely be necessary to get used to in the industry, so this is good practice. Some things seemed unclear at first and definitely prolonged the time it took for me to complete the assignment, but when you start to see the structure of the program, it goes much faster. And I wasn't the only one that struggled with this aspect. It seems my whole team struggled in the same way. 

    If there was one thing I was proud of in this assignment, it was the fact that I got it to work better than I thought it would. I thought maybe I would have to submit somehting that had a few broken bits, but for the most part, everything works fine. I probably have to improve the getLetterCount() method so it can detect an anagram if both words have a duplicate letter, but it seems everything else is good.

Comments

Popular posts from this blog

CST 300 - Module 4

CST 300 - Module 2

CST 300 - Module 3