java-Object-oriented articles

Source: Internet
Author: User

1. Object-oriented design ideas

Process oriented: It is to take a process as the unit, consider its implementation method , the concern is its function realization .

Object-oriented: it is to consider its attributes (characteristics) and actions (behaviors) in the context of a specific thing .

2. Object-oriented approach to problem-thinking

    1. What are the objects?
    2. What are the characteristics and functions of an object?
    3. The relationship between objects?

3. Classes and objects

3.1, object-oriented programming idea: is trying to make the computer language in the description of things as much as possible with the reality of the real thing in the same.

3.2, classes (Class) and objects (object) are the core concepts of object-oriented methods.

Class: Is a description of a class of things, is an abstract, conceptual definition. such as: human

Object: An entity that is actually present in the class, also known as an instance (instance)

4.java and object-oriented

    • object is the core of Java, in Java "Everything is Object".
    • The class describes the object's properties and behavior, and the class is the object's template, drawing.
    • An object is an entity that actually exists in a class.
    • The JDK provides many classes for programmers to use, and programmers can customize classes
    • Class---(instantiated)-object----(abstract)---> class.

5. Encapsulation Class

For OOP (object-oriented programming):

    • Encapsulation: The properties and methods of a type of thing are packaged together in a program unit, which is implemented in the form of a class.
    • Abstraction: Describes the features of an objective object in the Java language. Abstraction focuses on only one topic and the relevant aspects of the current goal, ignoring other unrelated areas
    • Data abstraction: Abstract the properties and methods of a class.
    • Encapsulates a class that abstracts related properties and methods from objects of the same type, depending on the application.

java-Object-oriented articles

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.