JS basis --OOP general concepts

Wednesday start learning JS It is a highly skills-based prototype features, very flexible object-oriented programming language

Today wrote about a few simple concepts of OOP

Before I also learned some programming languages ​​such as Java language c

In the learning process or useless essence of which can be learned only learned a little fur effort, but still understand some of the basic general education 

Process-oriented object-oriented 

Object-oriented concepts programming (OOP) in the most commonly used 

Objects, methods, attributes

class

Package 

polymerization

Reuse and Inheritance

Polymorphism

1, Object

This procedure is called an object-oriented design style, its focus lies in the object. The so-called objects, in essence, means the manifestation of "things" in a programming language. Here the "something" can be any

thing

2, class

In real life, between similar objects often have some common characteristics of the composition. The Hummingbird column and has a characteristic Eagles birds, they may be collectively referred to as birds.

In oop, the class design blueprint is actually an object or Recipes

3, the package

OOP package is another related concept, it is mainly used for content included in the object set forth (or package)

  Relevant data based on these data can do

After the packaging is simply that we need to know what features you can use to for us

有public private protected

4 Polymerization

We actually refers to several existing objects into a new object of the process. It can be broken down into a number of complex issues

We destroyed one small problem easily

5 Inheritance

By inheriting this way, we can gracefully reuse of existing code. Listen to this term probably know

What is the function described ha ha ha

6 Multi-State

The ability to achieve their behavior different objects invoked by the same method, which we call polymorphism

I have a learning java in transition up and down two methods of transformation may be similar, there are many different JS 

In the latter study needs to experience feelings of difference

 

Guess you like

Origin www.cnblogs.com/ATnTention/p/11374554.html