Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is an abstract data type

Shulou Source: shulou.com Published: 2022-06-03 02:56:29 09月26日 Update

This article to share with you is about what is an abstract data type, Xiaobian think quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.

Abstract data type refers to a mathematical model and a set of operations defined on the model. It depends only on its logical characteristics, and has nothing to do with how the computer is represented and implemented. It embodies the characteristics of problem decomposition and information hiding in programming.

An abstract data type (ADT) is a mathematical model and a set of operations defined on that model. It depends only on its logical characteristics and has nothing to do with how it is represented and implemented inside the computer. For example, the integer just mentioned, every computer, whether mainframe, minicomputer, PC, tablet computer or even smart phone, has "integer" type, which also needs integer operation, so integer is actually an abstract data type.

It also includes a set of operations on the model, depending on the definition that defines the abstract data type. Just like Super Mario, the classic Nintendo game, where Mario is the main character, we define basic operations for him, forward, backward, jump, shoot bullets, etc. This is an abstract data type that defines a data object, relationships between elements in the object, and operations on data elements.

As for which operations, this can only be determined by the designer according to actual needs. Mario may have started out walking and jumping, but later found that he should add a bullet operation, and then there was a running operation after holding down the bullet button. All this is determined according to the actual situation.

In fact, abstract data types characterize problem decomposition and information hiding in programming. It breaks down the problem into several smaller and easier to handle problems, and then implements each functional module as an independent unit to realize the whole problem through one or more calls.

Supplement:

Representation and format of abstract data types:

ADT =(D,S,P)(D: data object S: relational set on D P: set of operations on D) ADT abstract data type name { Data object: Data relationships: Basic operation: }

The above is what is an abstract data type, Xiaobian believes that some knowledge points may be what we see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Data types models problems objects features bullets that is computers designs information elements depending on basic operations practice mathematics more knowledge programs programming Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information Shulou Technology macOS MySQL