Object-Oriented Programming

Source: Internet
Author: User


During the program design process, the program describes the algorithm (command sequence) for manipulating data in pairs ). This is correct, but it is not always the most effective. Modern programs are often designed using the Object Oriented Programming (OOP) method. In Oop, a program is considered as a collection of interactive objects. Taking a Simulated Program as an example, you can easily understand this method. For example, if the program is to simulate highway overpasses, the objects may include cars and lanes. Each object uses its own algorithm to describe its behavior under different circumstances. During OOP programming, You need to design the object and the algorithm used. The OOP framework is used for programming. Therefore, "algorithm design" should be replaced with "design object and algorithm ".

Oop features encapsulation, inheritance, and polymorphism. Encapsulation is usually described as a form of information hiding (or abstraction. Although there is no problem, it is easier to understand this statement: encapsulation is a simplified form of "Object Description. Inheritance involves writing reusable code. Polymorphism means that a name has multiple meanings in the inherited context. Although it briefly describes Oop, it must be acknowledged that it is of little significance for readers who have never heard of OOP. But don't worry. All these terms will be explained in detail later in this book. C ++ provides a class to adapt to Oop-style programming. Class is a data type that integrates data and algorithms.


This article is from the "Object-Oriented Programming" blog, please be sure to keep this source http://lgy080600.blog.51cto.com/9168424/1439449

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.