Chapter Overviews of Programming

995 Words2 Pages

Chapter 8 of our text was all about string manipulation techniques. Lesson A started us out with a introducing us to a few simple string manipulation techniques, including the “length,” “trim,” “insert/remove,” and “contains” properties. Other concepts introduced in Lesson A included the “PadLeft/PadRight” methods, and using the “Like” operator to search strings. Lesson B continued with teaching us how to use the “MenuStrip” control and add it to a form, which is quite helpful when you need to give the user extra commands to use with your program. We were also taught how to insert a separator bar into the menu and how to assign shortcut keys to items on the menu. Lesson C didn’t necessarily teach us anything new, but it did give us an example on how to incorporate what we learned in the previous two lessons into our code. Chapter 9 introduced us to arrays (groups of related variables). It’s much easier to code an array than a bunch of independent variables by themselves, especially when they’re all going to be used for the same purpose. Lesson A gave us a basic overview of what a one-dimensional array is and how they are used. We learned about subscripts, and that the numbering method for subscripts starts at zero rather than one. We also went over the “GetUpperBound” method and the “For each… next” statement. Lesson B didn’t really introduce anything new, but it did teach us about parallel arrays. Lesson C introduced us to two-dimensional arrays, which are basically the same as a one-dimensional array with more than one row/column to populate and use. This lesson also covered how to use the “GetUpperBound” method with two-dimensional arrays. Chapter 10 was all about structures and sequential access files. Lesson A started out b... ... middle of paper ... ...when multiple methods need to have differing parameters in order to do what is basically the same task. Lesson C concluded the chapter by having us code a project with base classes and derived classes. A base class is the original class in a class file, while a derived class is a class that comes after the base class, and “inherits” the attributes and behaviors of the base class (constructors are never inherited though, and must always be created in new classes). We also learned that instead of re-coding constructors in derived classes, we can simply use the “MyBase” method to tell the computer to process the code written in the base class’s constructor(s). We finished off the lesson (and the chapter) by coding an application that used a base class and a derived class to calculate the area of a square and the area of a cube depending on which option the user picked.

Open Document