Thursday, October 24, 2013

Today I was doing lab #6 about linked lists and I created a linked list class. When searching the linked list I had created for a specific item in the list, I used a loop instead of recursion. I should've used a helper method that took two parameters: a node and the item that was being searched. The helper method would look to see if that node held the item that was being searched, and if not then the helper would be called with the next node.

My linked list was functional but not optimal, I needed to think recursively and not loopy.

Friday, October 18, 2013

Object Oriented Programming:
Object oriented programming is using code to represent entities with attributes and methods that can work with these attributes. This is important for creating data structures that can represent real life entities for solving real life problems. Another important aspect of OOP is that the objects can have different attributes based on the class they are created from. Creating different object from the class's blueprint is a major reason why OOP is used as it means that many different but similar situations can reuse the same code. All this is important for creating solutions to real world problems effectively and efficiently.

Recursion:
Recursion is the process of solving a big problem by breaking it down into smaller and smaller cases until it is the smallest case. This is very efficient in that it requires less lines of code a solution that would not use recursion. Also, it can be used to solve any size of a type of problem. Recursion is important because it is often times the only way to solve large problems without wasting large amounts of time.