What is a Function Object?
At first, I was confused too. Wikipedia attempted to explain it with many examples which to me did not help what so ever. In the end, my lab partner finally explained it to me and I got it. As it turns, I was overthinking about it. A function object is just a parameter in a function that refers to another function outside the function containing the parameter. Therefore, you don't have to call the function directly inside the function. It gets passed into the function as a parameter.
Recursion?!?!?!?
This was a fairly simple concept to comprehend, but to implement and fully understand was pretty complicated. It took a far bit of tracing before I began to understanding recursion and what it does. Recursion happens when a function uses itself in the function. I saw how it was really useful in solving problems that was really complicated to do without recursion. Simply put, recursion made solving certain problems really easy.
A1 - Brain Explosion
The assignment is really complicated and for me, really difficult to understand. I found the instructions to be really vague and I'm not really sure where to start exactly. I spent a long time just trying to see how the cheese was moved in 17 steps for only 6 pieces of cheese. Yes, I did spent my Friday night shoveling around 6 pens to try and move them across 4 pieces of paper in 17 steps. However, actually doing the program with real objects, it helped me see what things we need to do and how to do them. An example would be that each of the stools that the cheese goes on is like a stack where can you only take off the most recent one first and so forth. Hopefully a working program will be accomplished by the end of the week with another week left to further improve it.
No comments:
Post a Comment