through the keyword extends.
In Java, the extends keyword describes an inheritance form that inherits both interfaces and actions. This type of inheritance is sometimes called sub-classing. Unlike other object-oriented programming languages, Java classes can only inherit from one class. Many times, people who design UML diagrams are familiar with multiple prog
convert elements on the class diagram to Java. Java is used as a representative to combine some online instances. Below are some basic collection and summary of the individual: basic element Symbol: 1. Class (classes) class contains three components. The first is the class name defined in Java. The second is attribute
specific implementation details will be different, as shown in 4:Figure 4 Implementing a relationship instanceWhen implementing a relationship in a programmatic implementation, different object-oriented languages also provide different syntax, such as using the Implements keyword in the Java language, and using the colon ":" in c++/c#. The corresponding Java code
triangle. • During code implementation, the Object-oriented Inheritance mechanism is used to implement generalized relationships. For example, the extends keyword is used in Java and the colon is used in C ++/C #:.
public class Person { protected String name; protected int age; public void move() { …… } public void say() { …… }}public class Student extends Person {
relation, realization relation, dependency relation, association relation, and association relation is divided into common relation, aggregation relation and synthetic relation. In fact, these relationships are easy to understand, but more often than not, we need to be aware of how to translate into Java code:Generalization RelationshipsThe generalization relationship is essentially our inheritance, class inheritance and another class, this
Unified Modeling Language (UML. It includes the following important functions:
Visualizing)
Specifying)
Construting)
Document creation (documenting)
UML includes:
User case diagrams)
Class Diagrams)
Sequence Diagram (sequence diagrams)
Collaboration diagrams)
Activity diagram (activitiy diagrams)
Component
diagramsThere are four kinds of relationship between class diagram: Generalization relation, realization relation, dependency relation, association relation, and association relation is divided into common relation, aggregation relation and synthetic relation. But in fact these relationships we easy to understand, but many other times we have to pay attention to how to translate into Java code:Generalizati
Summary of the following four relationships
1. Generalization
2. Aggregation
3. Dependency
4. Join
1. Generalization
Is the integration relationship between the parent class and the Child class.
[Specific performance]
Parent class instance = new subclass ()
[UML diagram] (Fig. 1.1)
Figure 1.1generalized relationship between animal class and tiger class and Dog class
[
UML class diagram
Using UML class diagrams, we can express the static content of classes and their relationships. In the class diagram, we can show the member variables and member functions of the class, as well as the inheritance and reference relationships between classes. In short, we can depict all source
The existence of UML time series diagramIn the previous article, the UML class diagram was recorded, and the class diagram was used to describe the classes needed in the code and the relationship between them, and the whole program framework was displayed in front of us, lik
operations, no operation implementation. In UML, the interface is represented in a way similar to the class notation, as shown in 3:
Figure 3 UML diagram of the interface
Interfaces can also have inheritance and dependency relationships similar to the relationships between classes, but there is also a realization relationship between interfaces and classes. In
The various elements of UML are not mentioned here, I just want to talk about the relationship between classes in the class diagram, can understand the class diagram of the lines between the classes, arrows represent what meaning, it is enough to deal with daily work and communication, at the same time, we should be able to express the meaning of the class
2. Path name of String path file
3. Inline Enumeration Class
pathstatus Address is valid enum class private static enum Pathstatus {INVALID, CHECKED};
4. Prefixlength prefix length
The UML diagram for the file-related core is given below: in fact, the operation is FileSystem : The abstraction of the local file system, the real operation is the Filesytem of the derived class . Thr
UML Class diagram: To understand the class diagram of the lines between the various classes, what the arrow means is enough to deal with day-to-day work and communication, and we should be able to match the meaning of the class diagram to the final code; With this knowledge,
In my study of design patterns, I used UML for modeling.At first I was not too clear on the understanding of the various relations, on the internet also searched some information, now on the class diagram of these kinds of relationships: dependency, association, aggregation, composition, generalization, implementation of a description.First of all, we need to know two points:1. Order of their relationships:
can remember the original to fix a bug did what changes, don't be nervous, as long as you follow the above actions correctly submitted, idea will help you remember these details For example, select the recently submitted Task list, select Switch To,idea to automatically open the source code associated with the task, and navigate to the modified line of code. Of course, if the task is already close, you ca
name that differs from the other package. The name of the model package is a string that can be divided into simple names and path names .Simple name: refers to a package that contains only a simple name.pathname : Refers to the name of the outer package that the package is located in as a prefix.3, the role of package diagrams:Package diagrams can describe the requirements, the design of the high-level overview, package diagram through the rational
The meanings of the symbols of UML class diagramsClass diagram basic symbols can be broken down into dashed lines, arrows, solid lines, hollow right triangles, solid right triangles, hollow diamonds and solid diamonds. These basic graphs are combined to form the basic symbols of the class diagram. It is important to note that the order of these symbols represents
Copyright 2003 International Business Machines Corp.
Eclipse corner article
Draw a UML diagram using draw2d
Summary
The graphic editing framework (GEF) operates on draw2d. Draw2d is a plug-in that provides painting and layout management, providing graphics and layout manager for GEF applications to build programs.Graphical presentation layer. This article only focuses on how to use draw2d t
Reprinted: http://hi.baidu.com/dburu/blog/item/c60fc1881b37189ca4c2723f.html/cmtid/059096cb1ab0e0f352664fa7
Green UML:
A uml class diagram creation tool. You can use green UML to create a UML class diagram from the
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.