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 field.
  • Protected means that only the same class, package, and subclass have access to the method or field.
  • Package-Protected, which is applied when a method or field does not have an access modifier, means that only the class and package have access to the method or field.
  • Private means that only the class itself has access to the method or field.

UML

 This week we learned about UML diagrams. UML diagrams specify the name, fields, access modifiers, methods, and parameters of a class. While UMLs can be useful for showing the structure of a class, they cannot represent more complex methods, as they don't describe in detail what each method does.

The image below, which was taken from my class's lecture, are two examples of UML diagrams. Both diagrams describe a class named "Sandwhich", its private fields, and its public methods.


Coding Bat

 This week we practiced Java by using CodingBat, which is a website that allows anyone to practice Java and Python. We started by doing some of the easier problems on CodingBat, specifically problems in String-1, Array-1, and Logic-1. For these problems I did not have to plan much. I was usually able to quickly write some code without thinking too much, and I was usually able to complete the problem on the first try.

After these problems we worked on harder problems, specifically problems in String-2, Map-1, and Functional-1. For these problems I usually had to plan my solution before I started writing code. Most of the time I was able to complete these problems in only a few tries.

Comments

Popular posts from this blog

Week 4

Week 2

Week 1