1. Basic object-oriented features: encapsulation, inheritance, polymorphism
Java fully supports the use of object, class, inheritance, encapsulation, message and other basic concepts to design, allowing the real world from the existence of objects (i.e. object) to construct software systems, in the system structure as far as possible the use of human natural thinking mode. In fact, these advantages are common features of all object-oriented programming languages. The object-oriented approach is actually composed of OOA (object-oriented analysis), OOD (object-oriented design), and OOP (object-oriented programming) three parts, where OOA and OOD structures need to be described and documented in a way that At present, the industry unifies UML (Unified Modeling Language) to describe and record the results of OOA and Ood. Currently the latest version of UML is 2.0 it includes 13 types of graphics, using some of these 13 graphs to describe and document the results of software analysis and design very well.
2. Object-oriented basic structure
1) Sequential structure
2) Select structure
3) Cycle structure
3. UML
1) Use case diagram: Describe the system function from the user's point of view, and refer to the operator of each function
2) class Diagram: Represents a set of objects, interfaces, collaborations, and relationships between them. A class diagram describes a static relationship that is valid throughout the life of the system and is the most common diagram in the modeling of object-oriented systems.
3) Component diagram: Represents the physical structure of a set of components and the dependencies between components. Part diagrams help you analyze and understand the degree of interaction between components.
4) Deployment diagram: Shows the configuration of the running processing node and the components therein. The deployment diagram gives the system architecture and static implementation views. It is associated with a component diagram, usually one node containing one or more builds.
5) Sequence diagram: Shows the detailed process of the use case and the invocation relationship between the different objects.
6) Activity diagram: A special state diagram that shows the flow of one activity to another within the system. Activity diagrams are useful for identifying parallel activities.
7) State machine diagram: Consists of States, transformations, events, and activities that describe all possible states of an object of a class and the conditions of transition when an event occurs. Usually the state diagram is a complement to the class diagram, only for those classes that have multiple states and whose behavior changes with the external environment.
4. Several common relationships
Association (association), generalization (generalization), dependency (Dependency)
1) Association (Association)
Association: An owning relationship that enables a class to know the properties and methods of another class, such as: teachers and students, husbands and wives
Associations can be bidirectional or unidirectional. Two-way associations can have two arrows or no arrows, and one-way associations have an arrow.
Arrows and points: solid lines with normal arrows, pointing to the owner
2) generalization (generalization)
Generalization relationship: is an inheritance relationship that specifies how subclasses can characterize all the characteristics and behaviors of a parent class. For example: A tiger is a kind of animal.
Arrow pointing to: Solid line with triangular arrows, arrow pointing to Parent class
3) Dependence (Dependency)
"Dependency": is a use of the relationship, so try not to use two-way interdependence.
"Code representation": A local variable, a parameter to a method, or a call to a static method
Arrows and points: dashed lines with arrows pointing to the user
More information: http://blog.csdn.net/column/details/u-m-l.html
"Crazy Java Handout (3rd edition)". (Li Gang)-object-oriented and UML