the train, the driver only operates the train, the actual internal or by the train braking system to force the train to stop; people close the door instead of people, imagine if the door does not have a rotating shaft you can not shut it, or the process of the encounter obstacles you can not shut it.
3. Class Diagram
Drawing is very helpful in understanding and analyzing problems, do you have a better way
);
Mytrain.run ();
public void Gotohenan ()//from Beijing to Henan {train mytrain = new Train ("1488");
Console.Write (name + "Go to Henan ride {0} train:", Mytrain.number);
Mytrain.run (); } person
Class program
{
static void Main (string[] args)
{person
person1 = new Person ("John");
Person Person2 = new Person ("Dick");
Train train1 = new Train
member variable;Dependency relationship (dependency)A dependency is represented by a set of dashed lines with arrows, such as a dependent on B; He describes the relationship of an object to another object while it is running;Unlike association relationships, it is a temporary relationship that usually occurs during operation and changes with the runtime, and dependencies can change;Obviously, the dependence also has the direction, the bidirectional dependence is one kind of very bad structure,
I know that rose can be very convenient for the reverse C + + code to the class diagram, share the following:
STEP1: Create a new Rose project (a new one will be created by default when you open Rose)
STEP2: Right-compoent view->new->compoent create a new component
STEP3: Double-click the new compoent or right button->open specification set the component features, name random
Name Ceguitest here, la
consistent.Just, the class involved in the association is logically a level, such as the student teacher above, but the aggregation involves the class is not a level.Look at the following example:It can be expressed as a has a/some B, at which point B is able to separate from a and exist independently. Without a car tire or a tire.Combination compositionThe composition relationship is a bit tighter than th
When reading other people's code without detailed documentation, how to quickly see the entire code structure (class structure) becomes a real problem. Today, I will introduce a method for automatically generating UML diagrams. Suppose I have a project folder: icultivator, which has a file Root. php (in fact, no matter how many levels of directories, multiple files can be used ). Lt ;? Phpabst
When reading other people's code without detailed documen
Understanding the JVM virtual Machine principle is a necessary step for every Java programmer to practice. But because there are a lot of things in the JVM virtual machine to tell the relatively broad, in the current exposure to the JVM virtual machine principle of the tutorial or blog, the vast majority of the text-based description, it is difficult to give people a visual perception, after reading the feeling is still confused. Feeling the above, I intend to learn from the process of the JVM v
PowerDesigner inversion Java code generation class diagram First of all, of course, a new oom. Click language-gt; Reverse Engineer Java ... Different versions, the menu may not be the same, mine is 12.5 In this step, of course, you choose the Java class to invert. But it took a long time to find a way to import the folder. Just click OK at the end of the l
class to know the properties and methods of another class, such as: teachers and students, the relationship between husband and wife can be two-way or one-way. Two-way associations can have two arrows or no arrows, and one-way associations have an arrow.
"Code embodiment": member variable
Arrows and points: solid lines with normal arrows, pointing to the owner
In the picture above, the teacher and the stu
Hanshunping _php Programmer Open Class (first quarter) 02_ single-linked list in memory form anatomy _ Learning Notes _ source code illustration _ppt document collation
Vencimaron:http://blog.csdn.net/wenximalong/
Linked List-The most flexible data structureIt is convenient to solve complex problems and algorithms with linked lists.Content Introduction1. What is a linked list2. One-way linked list3. Doubly linked list4. Ring Linked List5. Using the r
Several important grasp principles: 1. Controller mode 2. Creator mode (principle) 3. Information Expert mode (principle) 4. Cohesion Poly-low coupling The pattern described here is not a design pattern for specific events in JavaSeveral operations for the main success scenario: 1.makemewsale 2.enteritem 3.endsale 4.makepayments1) Consider the interaction diagram: Refer to the contract of operation to----Our first consideration is to select the contro
Object Class diagram: Class, attribute, connection (Association, generalization, aggregation, combination, dependency), interface, and constraint.
(Note: static attributes are underlined)
Interface ). The operation set used to describe a service of a class or component.
Data Type (datatype ). A type whose va
1. First, create your own class diagram and complete the settings of attributes and functions, as shown below:
Supplement: the attributes and functions inherited from the parent class of the subclass must be manually written to the subclass view. For example, the ID attribute and GETID function in the stubrrower class
Overview
The relationships in a UML class diagram include:
Association, aggregation, composition, dependency, generalization, and Realization)
Association(Association)
Line representation, optional arrows,
Is a relationship in a static structure, which tends to be a data relationship. The relationships in this static structure will be stored with the storage of class
current point, and move the chess piece on the current point.Chesspiece.javaThe class generated by the file is responsible for creating the pawn object. and draw the appearance of the pieces. A pawn object can get its own color, size, name, and can also set and get its own category, namely Red Chess and black chess.Makechessmanual,javaThe class generated by the file is responsible for creating the object t
" {0} "started operation", name);
Employee[0].startwork ();
Employee[1].startwork ();
Employee[2].startwork ();
}
public void Stop ()
{
Console.WriteLine ("Company" {0} "stop working", name);
}
Company
Console program:
Class program
{
static void Main (string[] args)
{
Group C = new Company ("Beijing Capacity Limited");
In Visio, the relationship between a package and a class is an inclusive relationship, and after the class is dragged into the folder of the package, the relationship is established, and the two-dollar correlation symbol can be set to: aggregation, composition.Interface: Hollow Circle + Straight line (Donald Duck class to achieve ' speaking ');Dependency: Dashed
Original: http://blog.csdn.net/u011514810/article/details/53196371-------------------------------------------------------------------------------------------------As a rookie, it is very important to view Java source code. In eclipse, it is very convenient to view the source code of a class, directly holding down the CTRL + mouse click on the class or method, then this
Symbol:+:p Ublic-:p Rovite#:p Rotected~:p ackageRelationship:
Relationship Name
Code relations
Uml
Generalization (generalization)
Inherited
Solid Line Triangle Arrow
Implementation (Interface realization)
Implementation of subclass inheritance of virtual base function
Dashed triangular arrow
Dependency (Dependency)
One class as a function parameter or ret
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.