2015年2月26日星期四

A summary on abstract data type

ADT is a useful general class which makes it possible to add or pop element from a queue in a certain sequence, whether it is a first added first removed like class Queue or the reverse one like stack.

ADT is useful not only because it can be applied alone but also because it can be used in other class just like Tree in which you can put the children which is a list of elements that you can add or pop new ones to or from. It is true that ADT is a basic component of the class Tree.

Also the property of sequence ensures that all the elements are allocated in order. This property ensures that in the hierarchy things the property of the different levels can be kept and changed in order.

In the following assignment to be done, ADT should very useful and I will use it well to handle the following work.

2015年2月15日星期日

A summary of oriented object

In the last week I learned a special class of oriented objects: Tree. The Tree class has the structure in which each nodes have connection with each other with no loop-like connection in it. What's more, it has a hierarchical structure in it. Though I still don't know when exactly to use the structure, but if I encounter code like this, implementing the Tree class can be very useful.

What's more, when expanding the Tree structure with nested list or other sequences, we have to implement the recursion and queue things we learned before.Like when implementing the descendents_from_list method, the queue class is imported while using the contains method the recursion is useful since we may encounter some complicated structure. It becomes hard for me to understand some of the code described in the slides and the Python draft in that it combines all the things we have learned so far. But I'll try to figure it out anyway.

2015年2月4日星期三

Summary until the end of test1

It has been a month since I took CSC148. In this month, I learned quite a lot knowledge about programming.

First I get a deeper understanding about class this term. In the course of 108, the structure of the whole class is arranged by the instructors, all we need to do is to fill the class with method of right code. But now we need to write the whole structure by ourselves --- to find the proper name of the class, to find useful attributes, to get valid methods to write. We also need to construct parent class along with child class to make the code easy. Doing all these things independently make me feel more qualified as a programmer.

Another thing learned is the recursion. The recursion makes the nested sequence much more easier to evaluate. From easy steps to trace complicated forms, I am now able to figure out the regulation within the recursion. However I am not able to write my own recursion by now. I'll try to learn how to write in the future.