Introduction to Object-oriented (Object oriented) programming in Java

Source: Internet
Author: User

A program consists of two parts: a function of data and operation data;

The process-oriented design approach is the Top-down function decomposition,

Decompose a requirement into multiple subfeatures, develop subfeatures and unit tests, and assemble them into a complete application;

Problem:

1. The program focuses on functions, followed by data, and data flows from one function to another function;

2. Data structure needs to run through multiple functions;

3. Modify the data structure, will cause the chain reaction in the procedure;

4. Data integrity error, may occur in multiple functions, there are bugs, not easy to find;

The object-oriented design method is the design object, the main improvement:

1. The main concern data structure, second is the function;

2. The data structure is encapsulated in the object, only needs to be used by the object;

3. Change the data structure, only need to modify the internal structure of the object, does not produce a chain reaction;

4. Each object is responsible for ensuring the integrity of their data, isolate bugs;

Object-oriented solves the problem of process-oriented.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/Java/

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.