For this post, I am going to be revisiting the concept of ADTs, Abstract Data Types. In my past slog entry about Abstract Data Types, I said that they consisted of stacks and subclasses. I also mentioned that I found it difficult to implement stacks and the concept of inheritance. Furthermore, I commented on Assignment 1, which was due earlier that week and which I had a slightly difficult time completing. However, after rereading the entry and revisiting those comments, I've found that I did not clearly or completely discuss this concept. Additionally, I also realized that the topics placed under ADTs was narrow. Through later weeks in this course, I've learned more ADTs that can be added along with stacks and subclasses, for instance trees and linked lists.
An abstract data type (ADT) is a model of data types, which are defined by behavior rather than the representation of data. This behavior is from the perspective of the user of the data, not the implementer. This is usually in terms of values, operations and the behavior of those operations. An ADT is a "class of objects whose logical behavior is defined by a set of values and a set of operations." As mentioned in the previous entry, stacks and queues are abstract data types. Now, weeks later I can add more to this short list. Trees, linked lists, and BSTs are other abstract data types. While individually a tree and a stack are vastly different, and each has its own advantages and disadvantages for when to implement them, they both fall under the term of ADTs. This may take a while to fully understand, but once it did, the concept really clicked. The applications and uses of ADTs are very diverse and vast.
Looking through my classmates slogs, its clear to see that they also have been able to fully understand the concept of ADTs better. Being able to understand and identify trees, lists, stacks and queues as Abstract Data Types is very important, especially for object-oriented programming. Or as one class mate put it: "Object Oriented Programming is focused on using custom classes with various special methods and properties included, some of which serve as Abstract Data Types (like lists, stacks, queues, trees)." . Another classmate, when discussing stacks and trees, mentions that they are also abstract data types. Being able to connect the concepts we learn now with previous concepts learned earlier in the course, is crucial, especially when implementing them. This also makes it easier to learn, when you group similar concepts together, and having a broad term to use when talking about vastly different objects, (such as a tree and a stack) makes it easier to get a point or an idea across, as well as making it able for a programmer to get his thoughts across in a short, concise manner (in as little words as possible).
No comments:
Post a Comment