Thursday, March 21, 2024

CST338 - Week 4

 

CST338 – Software Design Week4

Wk04: Learning Journal Markov

For the week 04 assignment, Markov text generation, I work with Krishna to review the proposed solutions. The Markov assignment focused on Java generics to create sets of a key and their corresponding unique elements. A string is converted to a set for the first following words, and duplicate elements are not allowed. When I started to work on this assignment, I underestimated its conceptual understanding and started to code immediately. Fortunately, I quickly realized the need for a different approach to solve the puzzle. One strategy I used was sketching a flowchart for the methods presented. In the past, I used Raptor to visualize the logic of a program and work from an initial pseudocode to develop the solution. Although I could not entirely create a functional workflow, I could at least produce a framework with a layout of all methods. This helped me translate the sequence into Java code. Further, some unit tests were not passed, but with minor modifications, all of the UTs passed, and the program worked. 

Most of the code lines followed the Google Java Style with the exception of the vertical whitespace. Single lines are missing between block comments, methods, and sections.   Also, the format of Javadoc blocks is inconsistent where the format of the block is missing * and lines are misaligned.

I thoroughly reviewed the Google Java Style Guide and detected the style guidelines violation in my code. Moreover, I downloaded the google/styleguide repository from GitHub and configured IntelliJ IDE to automatically apply the available rules for Google Java style to future projects.

 


Sunday, March 17, 2024

CST338 - Week 3

 

CST338 – Software Design Week3

Jotto Code Review 

The Jotto assignment was challenging to finish. I struggled to pass the test to update the word list and display the correct score. Nevertheless, I was able to work on the code and pass all tests, but I did not match all of the intended outcomes. A few improvements could be implemented to make this code fully work correctly. While I know how helpful it is to document the purpose, behavior, and usage of methods, I have not added enough comments.

I worked with two of teammates to review the Jotto code. There are several methods that need to be improved. The guess() was the hardest to pass correctly due to the multiple conditions presented in the exercise. There is one mistake in the guess() method that caused the displayed word to be the current instead of the guessed word.

Not all the existing test functions cover the full range of Jotto functionality. For example, the accuracy of the score record was untested, resulting in perfectly running code but not an accurate final score. I would add a unit test to track the accumulated score.

Most of my struggles related to the guess() method and score tracking. My teammates struggled with getting the current words and scores updated. Overall, I am proud of the time I invested in this first Full Calorie assignment and learned about analyzing Java code to make a unit test pass.

Tuesday, March 12, 2024

CST338 - Week 2

 

CST338 – Software Design Week1

In week 2, I worked on the first homework to build a guessing five-word game, Jotto. At the beginning of working on this program, I felt it would be challenging to come up with an entirely working code. I figured that I just needed to get the basics of the code written quickly and work towards a strategy that fixes every method. Dr.C posted an office hour video that shows building the menu of choices in Java and how to read from a file. This was definitely a good head start that explained the strategy behind implementing exception handling when working with files. I faced issues with almost every method especially the method showPlayerGuess(). For some reason, it was confusing to implement. Another challenge I had was related to the pickword() method. I had the logic implemented as an IF-Statement, but it was not passing for me. I ended up using a while loop to correct this issue. I also used office hours and received help from our TA. She is super helpful and understands the material well, and she is very responsive and eager to help. Overall, I learned a lot this week about inheritance, interfaces, and abstracted classes.


Tuesday, March 5, 2024

CST338 - Week 1

 CST338 – Software Design Week1

This week, I am refreshing my memory on the Java language. I have finished Lab00, installed Intellij Idea Ultimate Edition, installed Git, and integrated my GitHub account into the IDE.

I am reading the Unified Modeling Language (UML) reference to understand the charts. I definitely need to solve more exercises to get me on track with covering all the basics.

The CodingBat assignments were fun till I got to work with strings. For some reason, Strings2 was challenging compared to other categories. Some problems took many trials, but I was able to solve most of them afterward. However, I asked for assistance and used office hours to get more insights about Java Strings. I discovered that built-in Java methods are great tools for solving these practice problems. TA provided a good link for String class built-in methods with a description. What worked for me was analyzing the code or the loop iteration pattern, mapping out an initial solution, and then working from the bottom up. Overall, I am satisfied with the first week for the learning outcome and my effort.

CST462S - Final Week

Service Learning Journal Reflections This marks the final week of our Service Learning experience. Our team successfully completed the final...