Posts

Showing posts from March, 2025

Week 11

CST-338 Week 3  This week was the third week of CST-338. In this week we continued to learn more design and Java concepts. Black Box & White Box Testing This week we learned about two methodologies used for testing programs, black box and white box testing. Black box tests only focuses on the input, output, and functionality of a program, and not the internal code, logic, or structure of a program. One of the advantages of black box tests is that they are simple and easy to run. White box tests focus on the code, logic, and structure of a program. One of the advantages of white box tests is that can find logical errors, security vulnerabilities, or inefficiencies in code. Coupling & Cohesion This week we learned about coupling and cohesion in objects and methods. Coupling refers to how much different classes rely on each other. If two classes have tight coupling then they are more dependent, and changes in one are more likely to affect the other. If two classes have loose c...

Week 10

Markov Text Generator This week we completed a fun assignment called Markov Text Generator . In this assignment, we had to write a class that takes a file, stores all of the words in the file, and the words immediately following those words, in a HashMap, and generates random sentences using those words. Once I finished the code, most of the unit tests failed, which was to be expected.What was surprising, was that I only had to fix two bugs to pass all of the tests. To fix the first bug I had to correctly get an array size while selecting random words, and to fix the second I had to move an condition checking for the end of a for loop into a separate if statement. If felt very satisfying to only have to fix two small bugs, out of all of the code I wrote. Comparing Objects In some of our lecture for this week, we learned about comparing objects in Java. Unlike primitive data types, we cannot use "==" to compare objects. This is because "==" checks to see if the objec...

Week 9: CST 338 Start

CST 338 - Software Engineering This week we started the next class in our computer science program. The class is called CST 338, or Software Engineering. The class focuses on how to design and create large scale software. We are using Java in the class, and we will be building programs for android emulators later in the class. Each week, the class features multiple small coding assignments, one or two larger coding assignments, and multiple quizzes. The class also features two large projects, which we have yet to start. Encapsulation Throughout CST 338 we will learn about the different principles of object-oriented programming. The first principle that we are learning about is Encapsulation. Encapsulation means that the information inside of classes is protected, and that the way the outside world can change a class's variables is controlled. As a part of Encapsulation, each method and field in a class has an access modifier: Public means that everyone has access to the method or ...