ADT, C, Java, ADT, CJava

Source: Internet
Author: User

ADT, C, Java, ADT, CJava

Chapter 2: data abstraction allows the user programmer to get rid of the Implementation Details of the Data Type while writing the customer program and only care about the interfaces of the data type. In computer science, there are some important data abstractions-data structures, which should be introduced as soon as possible. The data structures of computer science research mainly include linear tables, stacks, queues, sets, graphs, and trees.

Here we will talk about the course and language of data structure.

Yan Weimin and Wu Weimin in data structure (C language version) are classic textbooks, which are clearly described in the preface:

"Used in the bookClass C LanguageAs the description language of the data structure and algorithm, when describing the data storage structure and algorithm, consider the characteristics of the C language as much as possible, such as using the dynamic allocation of arrays to achieve sequential storage structure. AlthoughC language is not an ideal tool for describing Abstract Data TypesBut sinceCurrently and in the past one or two years (Note: The version is 1997.4)"Object-Oriented Programming" is not a prerequisite for data structures. Therefore, this book does not directly use classes, objects, and other facilities. Instead, it selects a core subset from the C language and addsC ++LanguageReference call parameter transfer methodClass C Description Language. It makes the definition and implementation of various abstract data types concise and clear in this book. It does not stick to the details of C language, but is easy to convert into C or C ++ programs executed on the machine. "

It's really strange why many people still use the C-language data structure. Although "data structure (C language version)" is easy to convert into C or C ++ programs executed on the computer, it is not easy for you. Do you know what a tool is? The more convenient the better. If Java and C # are more convenient than C, you should select Java/C #. Isn't it a place to exercise abstract thinking? If advanced mathematics and discrete mathematics are not enough, you can attend mathematics courses.

In fact, yqj2065 wants to say:From the perspective of Learning Object-oriented, data structure is a good practice field, which is better than GUI.This is why I put them in Chapter 5th linked list, array, and stack. Note: "Introduction to programming" is not a Data Structure course, so we only introduceLinked list)AndArray)And stack, and use them as a learning exercise that is familiar with Branch loops and object-oriented.


In the data structure course,Abstract Data Type (Abstract Data Type, ADT)Is an important concept. Here it is an optional term.

ADT for data structure modeling. The description includes:(1) set of data elements, (2) Relationship between elements and (3) operations owned by the ADT. We divide and conquer

(3) UseJava InterfaceI describe the operations owned by this ADT,

(2) Use a data type X (usually a node) to describe the data element of the ADT and describe the relationship between the elements based on the relationship between the objects of X.

(3) set of Class Management Elements Using interfaces.

Simply put, "abstract data type-A mathematical model and a group of operations defined on the model" is not the answer to the abstract data type, but the data type.

ADT is created for a certain type of data structure with the same behaviorMathematical Model-- For example, the stack should have the actions of pushing and popping up, alternatively, you can create a mathematical model for a data type in multiple programming languages with similar semantics-for example, each language has an integer.

The relationship between elements is the focus, The relationship is usuallySequence even. For example, the top element of the stack is first popped up, and this relationship is reflected in the implementation code. The relationship between elements in the linked list is intuitive and set by next.

To learn the data structure using Java, you only need three basic weapons: node, array, and String.



Why does my eclipse (java version) become eclipse for c/c ++ after ADT is installed ???

Have you installed the NDK part of the Android plug-in? Does it require CDT support? If so, that's the case.

Title display is not important. Eclipse is stacked by feature and plugin. feature is the basic unit for version management. feature includes feature and plugin, you can only use plugin without letting it belong to any feature, but you cannot use version management. It is advantageous to have version management, such as your original 1.0.0, later, you upgraded to 1.0.1, but you felt that the new version was unstable and you wanted to use 1.0.0 back. At this time, you did not know to manually delete 1.0.0 and then install 1.0.1, only 1.0.0 is disabled. With version management, you can enable 1.0.0 and disable 1.0.1 at the same time.

The title of Eclipse is displayed by Perspective name. That is to say, your current Perspective may be C/C ++. In Eclipse, there are two types of Windows: Editor and View. Editor and View form a Perspective, it looks at the same workspace from different perspectives. You can switch to Perspective at any time. For example, you can use the debug perspective during debugging to open the view for debugging. You can use the Java or C/C ++ perspective when writing code, including the view of compilation error prompts such as problems, docs, declarations, outline, and make file target, you can also switch to the CVS perspective when synchronizing code to CVS.

Multiple feature can be used to form a Product and give it a slash image to start the image. in ini, specify the current product. This is equivalent to the current combination of features. However, the current main product does not affect whether each features is enable or disable, they can still work.

If you want to switch to the original Java, use the Eclipse menu Window> Open Perspective> Other to find the Perspective you want.

An Eclipse platform that only provides file resource management, compilation, and version management is transparent. you can install various feature types, such as JDK, WST, and CDT, to overlay everything you want, if you have installed a variety of Java Development plug-ins, it is called Eclipse for Java, if you prefer to install a variety of C/C ++ plug-ins, its name is Eclipse for C/C ++. In essence, its kernel is exactly the same, and it is a plug-in for Eclipse Platform + for various purposes.

I can download an Eclipse Classic or Eclipse Java, install various plug-ins, and finally get the same plug-in configuration as Eclipse for C ++. The functions can be exactly the same. Eclipse for XXX only indicates which plug-ins have been installed, if you don't want anything, open the Eclipse menu Window> Preference> # Install/Update to Enable all the sites in the Available Software Site, then, choose Help> Eclipse Marketplace to search for various plug-ins for installation. Remember to first enable Available Software S... the remaining full text>

In java, how does one write ADT?

An ADT is defined only by the stored data type and operations that may be performed on this data type. Developers can only access the attributes of ADT through the ADT operation method, and they do not know how to implement various internal operations of this data type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.