latest news

Génie logiciel

 •V- Basic Design Concepts

•Something

An object is something that can be identified in the real world. He it may have a physical presence (a horse, a book) or not (an Identifiable legal document).means that the object can be named.

• every object has a set of attributes (of which structure) and a set of methods (of which condition). The attribute is a variable intended for a value. A method is a set of instructions that take values as input and modify the values of attributes or producing a fruit.


•Be abstractionist

Abstraction is a very important principle in modeling. It consists of maintaining only relevant resources

of something for a specific problem. Objects used in UML. They are abstractions of real-world objects.

Example: We like horses for racing. They fitness properties of speed, age and balance mental health as well as fostering a place of origin is important for this process and is protected. We like horses for draft work. They properties of age, length, strength and construction is useful for this work and is protected.

Abstraction is an essential simplification for the modeling process. The UML object is thus a the abstraction of the real-world object in relation to the needs of the system, of which only the essential elements are retained

•Product classes

A set of similar things, that is, to have a structure and a behavior too made up of the same qualities and skills, the same kind a class of objects. Structure and character then it can be defined together at the class level. Each object of a class, is also called instance of a class, distinct from its identity of one and there are specific values for it human characteristics.

Example: All horses form the Horse class which has the structure 

and behavior defined by amount.




 The Jorphe horse is an instance of the Horse class whose fewer attributes and their values are illustrated in the figure

The name of a class appears singular. There is always a common 

noun preceded or followed by one or more qualifying adjectives. 

This name is available significant of all the objects constituting the class.



•Packing things inside

Encapsulation has storage attributes too object methods with respect to other objects.

Of course, certain behaviors and strategies have the same purpose of the internal processing objective of the object and should not not being exposed to external objects. Encapsulated, they are

they are called private attributes and object methods. Encapsulation is an abstraction since we simplify the representation of the object relative to external objects.

A simplified representation based on public attributes and object methods. Definition of encapsulation occurs at the class level.

Objects outside of an object are therefore instances ofother classes.

•Example

When a horse is running, it will make various movements such as leg lift, head lift, tail lift. 

These movements are within the animal profession and need not be recognized on the outside. These are private methods. 

These operations access a the inside of a horse its muscles, its brain and its eyes.

This inner part is expressed in terms of human behavior.

All these attributes and methods are shown in Figure.


Specialization and generalization

So far, each object class has been included unlike other classes. A classroom is enough too be defined as a subset of another class, which this subset must always constitute a set such things. Then it is a subclass of the other class. It thus specializes this other class.

Example: The horse class is a subclass of.

class of mammals. Generalization is the inverse relationship of specialization.

If a class is a specialization of another class, that class The latter is a generalization of the former. She is classes beyond classes.

Example: Class mammals are a class improvement horses.

The specialization relationship can apply at multiple levels, giving rise to a class hierarchy. Example: The class of horses is a subclass of the class of mammals, itself a subclass of the class of animals. The cat class is another subclass of the mammal class. The corresponding class hierarchy is displayed

in Figure .


The legacy of the legacy

Inheritance is a property that allows a subclass to benefit from the structure and behavior of its superclass. Inheritance comes from the fact that a subclass is a subset of its superclass. Its instances are also Instances of its superclass. As a result, they benefit of the structure and characteristics described in this case outclasses, in addition to the structure and behavior introduced at the subclass level. Example :
either a system where the Horse class is a direct subclass of the Animal class, the horse is then described by a combination of structure and behavior derived from the Horse and Animal classes, that is, by the attributes age, size, weight , name and breeding as well beyond the art of eating and running. This inheritance is illustrated
Inheritance is a consequence of specialization. But, computer scientists use the term inheritance more frequently than professionals to describe the relationship between a small class and his improvement

•Abstract and concrete classes

A view of the hierarchy shown in Figure V.4 shows that there are two types of classes in the hierarchy:
●Instanced classes, that is Horse and Dog classes. These classes are called concrete classes.
●Classes that don't have one directly, as well the Beast class. Of course, if in the real world, there is horses, dogs, the idea of an animal remains abstract. It cannot fully explain a bug. The Animal class is called an abstract class. An abstract class is meant to have concrete subclasses. It is used to factor common attributes and methods into its subclasses. Example: Figure 👇 illustrates the hierarchy by specifying the abstract classes and the concrete classes. In UML, the the name of the abstract classes is in italics.

•Human Pomorphism

Polymorphism means that a class (very generally abstract) represents a composite set because they are instances of different subclasses.
When you call a method with the same name, this difference results in different behaviors (except in the case where the method is common and inherited from the superclass and subclasses). Example Consider the class hierarchy shown in Figure 👇. The method of it touching has different characteristics depending on whether the horse is present for example a Wild Horse or a Domestic Horse. In the former case, the attitude would be avoidance (resulting in nurturing) while in the latter, attitude it will be accepted. Looking at the Horse class as a whole, we thus have a unique set of horses. medium when you activate the strokes method.

The composition

One thing can be complex and made of other things ,The things inside. This association then combines these items is composition. It defines at the level of their classes but the links are built between the instants of classes. The products of the combination are called ,The compressing. For example, a horse is an example of something complicated. Is It is made up of its various parts (founds, heads, and so on). The graphic representation of this composition There is a face.

The composition can take two forms:
● the weak composition or aggregation;
● the strong composition. In the weak composition, the components can be
shared between several complex objects. In the strong composition, the components cannot be shared and the destruction of the compound object entrains the destruction of its components.
Example If we repeat the previous example in the case of one a harnessed racehorse and if you add the saddle inside the components, we obtain :
● A strong composition for legs and head indeed, legs and head can not be;
shared and the disappearance of the horse trains the disappearance of his organs.
● A weak aggregation or composition for the stool. The whole is illustrated in fig.






Post a Comment

Previous Post Next Post

نموذج الاتصال