Java programming 57-object-oriented Basics

Source: Internet
Author: User

Java programming 57-object-oriented Basics

Chen yuefeng, Zhengzhou game college

From:Http://blog.csdn.net/mailbomb

Chapter 8 object-oriented

In a program, the core is the data structure and algorithm. Different programs need to design different data structures as needed, and then rely on the functions of the program and the data structure to design the corresponding algorithms, this design method is the underlying design of the program, that is, to solve specific functions.

When a program project is complex to a certain extent, it should not only focus on the underlying design, but also design the program structure. Object-oriented (OO) is a common program structure design method.

The foundation of Object-oriented thinking is to combine relevant data and methods into a new composite data type, and then use the newly created Composite data type as the foundation of the project.

8.1 Introduction to object-oriented

The basic knowledge about Java is just the basic knowledge of programs. The object-oriented knowledge introduced in this chapter is related to design.

The object-oriented design method adopts the external-to-internal design method. First, design the entire project structure, and then focus on each internal detail according to the Association. The entire project is decomposed according to modularity. The object-oriented design idea is like this: first, the automobile must produce modules such as the engine and gearbox, and then consider the specific implementation of each module. Using this design idea, each part is modularized to facilitate functional breakdown and facilitate the development of more complex projects.

After dividing the modules, we can design each specific module. When designing the modules, if the modules are still complex, we can continue to break them down. If the modules have been carefully divided, you can design them.

The specific module is designed to determine the structure of the core data required by the module and the functions required by the module, that is, the data structure and algorithms mentioned at the beginning of this chapter, make each module an independent and complete structure, and provide corresponding services (functions) to other modules ).

The entire system (Project) runs through the association between modules, and each module only needs to open an interface to other modules.

The above mentioned is the object-oriented design method, which is summarized as two parts:

L module division

L module implementation

In object-oriented Programming (OOP), each module is generally called a class, and the data in a module is called a field, it is generally called an attribute, and the function inside a module is generally called a method ).

According to the object-oriented design method, in the actual project development process, the object-oriented technology is generally divided into three parts:

L object-oriented analysis (OOA)

In this step, project requirement information is extracted based on object-oriented thinking. Generally, the system analyst is responsible for this step. This part of the document is the project requirement analysis manual.

L object-oriented design (OOD)

This step is divided into modules according to the "project requirement analysis manual", as well as a brief design of the module. Generally, Senior programmers are responsible for this step. This part of the document is the "Project Outline Design Manual".

L Object-Oriented Programming (OOP)

This step details the structure of each module according to the Project Outline Design Manual, which is generally the responsibility of the programmer. This part of the document is the project detailed design manual.

Finally, the coder carries out the specific code according to the project detailed design manual. This is a simple description of the standard process of object-oriented development.

In the actual process of program development, we are more concerned with the OOP part, that is, the specific design and coding issues during actual implementation.

In addition to these design methods, object-oriented technology also has a lot of concepts and syntax knowledge that needs to be learned during programming. Next we will introduce the content of Object-Oriented Programming Based on the Java syntax.

Related Article

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.