The object-oriented appreciated java

1, the three basic programming structure

Sequence Structure

Represents the order of each operation program structure is arranged according to their order in the source code sequentially performed

 

Select structure

Select structure represented handlers need to select a branch execution based on which a specific condition. Select the structure of single and multiple choice selection double selection three forms

 

Loop structure

Loop structure indicates that the program is repeated one or some operations, until one stops the cycle when the condition is false (or true). The main structure is in circulation: the implementation cycle under what circumstances? What actions need to repeat? The basic form of a cyclic structure, there are two: when circulating through circulating and

 

2, three basic features of object-oriented

inherit

Inheritance is an object-oriented software reuse implemented important means, when the subclass inherits the parent class, subclass, as a special parent class, the attributes and methods of direct access to the parent class

Package

Packaging refers to hide the implementation details of the object, and then to expose the subject through a number of common features methods

Polymorphism

Polymorphism refers to the subclass object can be directly assigned to the parent class variable, but still showed the runtime behavior features subclass, which means that the object types in the implementation of the same method, may exhibit a variety of behavioral characteristics

abstract

In addition to these three, object-oriented abstraction is an important part of the abstract is to ignore those aspects of a topic unrelated to the current target, in order to more fully attention to the relevant aspects of the current target. Abstract does not intend to understand all the problems, but only consider part of the problem. For example, need to look at the Person object, can not put all the details in the program are defined Chu Person, the Person usually only part of the data definitions, some behavioral characteristics - and these data, behavioral traits are part of the software system are concerned.

 

Guess you like

Origin www.cnblogs.com/wgblog-code/p/11293704.html