This week we started discussing the last programming project, which will be called Life. The assignment, much like Darwin, the previous one, consists of a board, which now will contain a cell in all the positions with a state of either dead or alive, and we have to simulate however many turns based on the rules of the game. However, the project is a little more complicated than what I described so even prof. Downing hasn't fully explained it yet. We are still missing a formal explanation for what one of the classes' behavior should look like. My partner and I got started during the weekend, we are relying on a couple of the concepts that were used in the Darwin assignment, such as a 2d array for the table. We are populating the board and updating the number of neighbors of each element so it's looking good in its early stages.
In class we started discussing heavily the concept of inheritance and, as we have been doing during the whole semester, its differences and similarities in Java and C++. We learned about friend functions, which seemed a little confusing to me at first but I have been getting it more and more as the days have gone by. It is basically a way for a non-member function to access the private and/or protected member of a class if it is declared a friend of that class. I also learned how to use virtual functions in C++ this week which is basically overriding functions in C++ (Giving different different implementations to the same function signature depending on the class from which it is called).
No comments:
Post a Comment