Object-oriented Thinking, object-oriented

Source: Internet
Author: User

Object-oriented Thinking, object-oriented

Object-Oriented Programming (Object OrientedProgramming, OOP, Object-Oriented Programming) is a computer programming architecture, one basic principle of OOP is that a computer program is composed of a single unit or object that can act as a subroutine. OOP achieves three objectives of Software Engineering: reusability, flexibility, and scalability. To achieve the overall operation, each object can receive, process, and send information to other objects.

 

Some specific operations need to access and assign values to the encapsulated types. In this case, we need other functions to help us complete these operations. PHP provides us with a method name: _ Set (), _ get ()Encapsulate keywords: public, protected, private encapsulate related functions :__ set (), _ get () public indicates global, and internal and external subclass of the class can be accessed; protected indicates protected, only this class, its subclass, or its parent class can be accessed. private indicates private and can only be used within this class;

Class concept: A class is a set of objects with the same attributes and services. It provides a unified abstract description for all objects belonging to this class, which includes two main parts: attribute and service. In an object-oriented programming language, a class is an independent program unit. It should have a class name and contain two main parts: attribute description and service description.

Object: an object is an entity used to describe objective things in a system. It is a basic unit of a system. An object consists of a group of attributes and a group of services that operate on these attributes.

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.