OC, oc Language

Source: Internet
Author: User

OC, oc Language

 

Features of the OC language 1. hyperset of the C-language statement, which allows the C-language program source code to be used in the OC. the compiler is compatible with the C-language program. 2. It has a complete pipeline object-oriented feature.

3. contains a runtime system.

5. Rich class libraries.

 

 

Division/remainder %
Use self to call its own object Methods


Object-Oriented Programming (OOP)


Class: Abstraction of things with the same features and Behaviors


The object is an instance of the class. The class is the object type.


Process-oriented programming philosophy: Event-centric, focus on the steps to solve the problem and implement a function call (step by step)


Object-Oriented Programming (OOP): It is centered on things and focuses on the objects involved in the question. To accomplish this problem is only a small function of all the functions of the object.


@ Interface
@ Interface Person: NSObject // interface Name: parent class


Class interface: starts with @ intherface and ends with @ end


@ Intherface + class name: (indicating inheritance) + parent class name {instance} method @ end


Declare the instance variables and methods of the class between @ intherface and @ end.


The Interface part of a class can be defined as long as it complies with this form.


@ Implementation
Class implementation: @ implementation starts with @ end


@ Implementation + class name


@ Implementation and @ end intermediate write, class method implementation


The class implementation can be completed as long as it complies with this form.

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.