Programming Concepts and Programming Concepts

Source: Internet
Author: User

Programming Concepts and Programming Concepts

(Personal understanding)

Object Oriented Programming (OOP) is mainly embodied in encapsulation, inheritance, polymorphism, and virtual functions;

Encapsulation: Put the specific method to implement the function into a class. The caller does not need to know how to implement the function. Instead, the caller only needs to know what function it can implement, what the parameter needs and the type of the returned value can be used to achieve the desired effect;

Inheritance: the member and method of the parent class (base class). If the subclass (derived class) inherits it, it can have all the Members and methods of the parent class, child classes can override the methods of the parent class and write new members and methods;

Destructor :~ Class Name () {}, the content of the Destructor is executed after the class is executed, and the resource release operation is usually executed;

Interface: the name of the interface definition function. It implements the interface class, writes the specific operation method, and implements all the methods of the interface;

Abstract ):

Polymorphism: subclasses can be assigned to the parent class. The parent class is in multiple States. For example, the parent class is a computer, and the Child classes include Asus computers and Apple computers;

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.