Arrays & Inheritance
This week we reviewed arrays and inheritance. I cannot recall ever using an array larger than 2 dimensions. I can visualize and (probably) use a 3-dimensional array, but 4-dimensional arrays and beyond become harder to grasp. I suppose a 4-dimensional array could be used to augment a 3D array with a time scale. Anything beyond that would certainly be unmanageable for me. I am not even sure what a 5th dimension would represent, although a Google search returns answers like this one.
Inheritance gives children (subclasses) access to the methods of their parents/ancestors (super classes). This creates a hierarchy of related classes that share common methods but also retain their own unique methods/properties. I have used it for various assignments, one of which had me create different vehicle classes, like Truck and Car, that inherited from the Wheel class. A real-world example is the C++ I/O library, where all input/output classes ultimately inherit from the ios_base class. Java uses a similar concept.
Keeping Up
This week brought our first team assignment. It was also my week to make a video about how to solve the programming problem. That alone brought some new experiences and challenges, but I am mostly satisfied with how it turned out. I also volunteered to be the project manager for the week since I would be analyzing the entire program for my video anyway. The role has allowed me to learn more about using Git to collaborate on and manage a software project. My group intends to rotate the project manager role for the remainder of this course.
No comments:
Post a Comment