"Thinking in Java 4th Edition" Reading notes 1.1 abstract process

Source: Internet
Author: User

Q: What is Object-oriented? What is the difference from a process-oriented one?

A: Object-oriented: The problem-oriented space, based on the abstraction of the problem;

Process oriented: The solution space, based on the computer structure to abstract;

Five basic features of OOP:

1) All things are objects.


You can extract any conceptualization artifacts that you want to solve for a problem and represent them as objects in your program.

2) programs are collections of objects that they communicate to each other by sending messages.


That is, a request for a method of a particular object.

3) Each object has its own storage composed of other objects.


You can create new types of objects by creating a package that contains existing objects, so you can build complex systems in your programs, and colleagues hide their complexity behind the simplicity of the object.

4) Each object has its type.


Each object is an instance of a class (instance).

5) A particular type of even object can accept the same message.


Objects of the "circle" type are also objects of type "geometry", so the "circle" object must be able to accept messages sent to the Geometry object. This means that the "geometry" interacts and automatically handles all the code related to the geometry. This alternative (substitutablility) is one of the most powerful concepts in OOP (inheritance).

"Thinking in Java 4th Edition" Reading notes 1.1 abstract process

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.