CST 338 – Software Design – Week 02
Jotto-
This week’s homework assignment was the
program called Jotto. It is very similar to Wordle where you must guess a word
and the computer lets you know how many letters from your guess are in the word
you are trying to guess. The unit tests I had trouble with were the ones for
showWordList() and getLetterCount(). I could not get them to pass. I was able
to get the method showWordList() to work but it would not pass the test. The
method getLetterCount() was more challenging and I was not able to make it
work. The part where we must check for duplicate letters because each letter
guessed only counts for one letter from the word you are trying to guess is
where I struggled the most. I tried using substring() in conjunction with
indexOf() but was not able to make it work. I will have to read more into
comparing strings to figure out how to compare each character from one string
to every character in another string.
The quizzes were also a bit more
challenging than the previous week. I was thrown off by a couple of questions. The
question in Quiz00 about the exceptions and the question about the replace(char,
char) method in Quiz01. I will have to watch the lecture videos for week 2
again and make sure I understand those two concepts.
Comments
Post a Comment