Wednesday, October 23, 2013

Class Diagram




The class diagram is the main building block of object oriented modelling. It is used both for general conceptual modelling of the systematics of the application, and for detailed modelling translating the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main objects, interactions in the application and the classes to be programmed.

A class diagram is an illustration of the relationships and source code dependencies among classes in the Unified Modeling Language (UML). In this context, a class defines the methods and variables in an object, which is a specific entity in a program or the unit of code representing that entity. Class diagrams are useful in all forms of object-oriented programming (OOP). The concept is several years old but has been refined as OOP modeling paradigms have evolved.

In a class diagram, the classes are arranged in groups that share common characteristics. A class diagram resembles a flowchart in which classes are portrayed as boxes, each box having three rectangles inside. The top rectangle contains the name of the class; the middle rectangle contains the attributes of the class; the lower rectangle contains the methods, also called operations, of the class. Lines, which may have arrows at one or both ends, connect the boxes. These lines define the relationships, also called associations, between the classes.

Introduction
A class with three sections.
In the diagram, classes are represented with boxes which contain three parts:
  • The top part contains the name of the class
  • The middle part contains the attributes of the class
  • The bottom part gives the methods or operations the class can take or undertake
In the design of a system, a number of classes are identified and grouped together in a class diagram which helps to determine the static relations between those objects. With detailed modelling, the classes of the conceptual design are often split into a number of subclasses.
In order to further describe the behaviour of systems, these class diagrams can be complemented by state diagram or UML state machine.

Scope
The UML specifies two types of scope for members: instance and classifier.
  • Classifier members are commonly recognized as “static” in many programming languages. The scope is the class itself.
    • Attribute values are equal for all instances
    • Method invocation does not affect the instance’s state
  • Instance members are scoped to a specific instance.
    • Attribute values may vary between instances
    • Method invocation may affect the instance’s state (i.e., change instance’s attributes)
To indicate a classifier scope for a member, its name must be underlined. Otherwise, instance scope is assumed by default.

 

Relationships

A relationship is a general term covering the specific types of logical connections found on class and object diagrams. UML shows the following relationships:

Instance level relationships

Links

A Link is the basic relationship among objects.

Association

Class diagram example of association between two classes
An association represents a family of links. Binary associations (with two ends) are normally represented as a line. An association can be named, and the ends of an association can be adorned with role names, ownership indicators, multiplicity, visibility, and other properties.
There are four different types of association: bi-directional, uni-directional, Aggregation (includes Composition aggregation) and Reflexive. Bi-directional and uni-directional associations are the most common ones.
For instance, a flight class is associated with a plane class bi-directionally. Association represents the static relationship shared among the objects of two classes. Example: "department offers courses", is an association relation.

Aggregation

Class diagram showing Aggregation between two classes
Aggregation is a variant of the "has a" association relationship; aggregation is more specific than association. It is an association that represents a part-whole or part-of relationship. As a type of association, an aggregation can be named and have the same adornments that an association can. However, an aggregation may not involve more than two classes.
Aggregation can occur when a class is a collection or container of other classes, but where the contained classes do not have a strong life cycle dependency on the container—essentially, if the container is destroyed, its contents are not.
In UML, it is graphically represented as a hollow diamond shape on the containing class end of the tree with a single line that connects the contained class to the containing class. The aggregate is semantically an extended object that is treated as a unit in many operations, although physically it is made of several lesser objects.

 

Composition

Class diagram showing Composition between two classes at top and Aggregation between two classes at bottom
Composition is a stronger variant of the "owns a" association relationship; composition is more specific than aggregation.
Composition usually has a strong life cycle dependency between instances of the container class and instances of the contained class(es): If the container is destroyed, normally every instance that it contains is destroyed as well. (Note that, where allowed, a part can be removed from a composite before the composite is deleted, and thus not be deleted as part of the composite.)

The UML graphical representation of a composition relationship is a filled diamond shape on the containing class end of the tree of lines that connect contained class(es) to the containing class.

Differences between composition and aggregation

When attempting to represent real-world whole-part relationships, e.g., an engine is a part of a car, the composition relationship is most appropriate. However, when representing a software or database relationship, e.g., car model engine ENG01 is part of a car model CM01, an aggregation relationship is best, as the engine, ENG01 may be also part of a different car model. Thus the aggregation relationship is often called "catalog" containment to distinguish it from composition's "physical" containment.

As you create your class diagram, you can set the visibility of each attribute and operation in the properties window, or by clicking to open a pop-up menu in the diagram. Convenient fast editing buttons and a specialized class diagram toolbar are also provided to help you easily add elements. UModel identifies the visibility property of each attribute and operation with a unique pictorial icon. The icons are keyed to indicate whether an attribute is public, protected, or private.

sumber : http://en.wikipedia.org/wiki/Class_diagram

Monday, October 7, 2013

use case diagram



writing is an activity that requires not only creativity, but rather the desire, feeling and idea of ​​the text. writing can also be a hobby to describe one's emotions which can not be described with words.
earlier times, writes synonymous with paper and pencil / pen to write by hand manually.
but along with the times and technological advances, can writing using electronic media. with the electronic device can connect the user with a social media that can be writing hobby into a media which we often call the "Blog". 

Blog is short for web log is a web application that resembles the form of writings (published as a post) on a public web page. These writings are often published in reverse order (most recent content first and then followed the older content), although not necessarily so. Web sites like these can usually be accessed by all Internet users according to the topics and goals of the user's blog. The following is an image workflow use cases that can show the relationship between users with media "blog" related to each other. 

In software and systems engineering, a use case is a list of steps, typically defining interactions between a role (known in UML as an "actor") and a system, to achieve a goal. The actor can be a human or an external system.
In systems engineering, use cases are used at a higher level than within software engineering, often representing missions or stakeholder goals. The detailed requirements may then be captured in SysML or as contractual statements.
A use case defines the interactions between external actors and the system under consideration to accomplish a goal. Actors must be able to make decisions, but need not be human: "An actor might be a person, a company or organization, a computer program, or a computer system — hardware, software, or both.” Actors are always stakeholders, but many stakeholders are not actors, since they "never interact directly with the system, even though they have the right to care how the system behaves.” For example, "the owners of the system, the company's board of directors, and regulatory bodies such as the Internal Revenue Service and the Department of Insurance" could all be stakeholders but are unlikely to be actors.



the picture above is a picture that shows the use case among users with blogs. there are 3 actors associated with the use case. The third actor is the user, admin and visitors. not only an actor, in the groove there are some use cases that occur as manage profile, manage posts, manatize blog, and log in immediately before starting to write a post.
1. users
as a user, we can manage profile, manage posts, and manage your own blog.

  • Manage profiles is the beginning when we joined the blog. because in the profile, we can put our personal data or to share the joy, hobbies, etc.. in managing profile, we can change the existing data on the profile, or delete data in the profile.
  • Manage the posting is a stage that have been targeted in a blog. we can share findings, along with pictures of the photo description of the meaning, sharing of knowledge that can be a life saver or just write the reference of the emotional expression that is being felt in the post. in managing the post, there are some use cases that can be described as, uploading stuff we want to share, modify existing posts, or delete posts that have been uploaded.
  • Manatize Blog is a step in changing the blog design that we have a blog that has become an attractive design in accordance with our expectations. we can change the position of text, change the color, font size and font type that we will use in the blog. not only change the font and layout, manatize blog can also change the look of our blog with a background image of your choice according to our will.
2. Admin
The next actor associated with this flow is admin. admin are the main actors behind the scenes role in the success of a blog. admin log-in controls use case when we want to open the blog site. admin who told whether the username and password used is appropriate or not. if both are false, then the admin will send the information to the user and make sure the username and password are entered correctly. in addition, the admin is in control of all the blogs listed. 

3. Visitor
The actor who plays a role in the next use case is a visitor. visitors was actor money targeted a post in the upload. visitors who read all the contents of the blogs that have terposting and provide a rebuttal or criticism and suggestions on these postings.

Limitations of use cases include:

  • Use cases are not well suited to capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.
  • Use case templates do not automatically ensure clarity. Clarity depends on the skill of the writer(s).
  • For some products and systems, use cases are complex to write and to understand, for both end users and developers who are not well trained.
  • As there are no fully standard definitions of use cases, each project must form its own interpretation.
  • Some use case relationships, such as extends, are ambiguous in interpretation and can be difficult for stakeholders to understand.

Big Five Personality Traits

In psychology, the Big Five personality traits are five broad domains or dimensions of personality that are used to describe human personality. The Big Five factors are openness, conscientiousness, extraversion, agreeableness, and neuroticism.
The Big Five has been preferably used, because it is able to measure different traits in personality without overlapping. During studies, the Big Five personality traits show consistency in interviews, self-descriptions and when observed. Acronyms commonly used to refer to the five traits collectively are OCEAN, NEOAC, or CANOE. Beneath each factor, a cluster of correlated specific traits is found; for example, extraversion includes such related qualities as gregariousness, assertiveness, excitement seeking, warmth, activity, and positive emotions.
 

1. Openness to experience

Openness is a general appreciation for art, emotion, adventure, unusual ideas, imagination, curiosity, and variety of experience. People who are open to experience are intellectually curious, appreciative of art, and sensitive to beauty. They tend to be, when compared to closed people, more creative and more aware of their feelings. They are more likely to hold unconventional beliefs. On average, people who register high in openness are intellectually curious, open to emotion, interested in art, and willing to try new things. A particular individual, however, may have a high overall openness score and be interested in learning and exploring new cultures but have no great interest in art or poetry. There is a strong connection between liberal ethics and openness to experience such as support for policies endorsing racial tolerance. Another characteristic of the open cognitive style is a facility for thinking in symbols and abstractions far removed from concrete experience. People with low scores on openness tend to have more conventional, traditional interests. They prefer the plain, straightforward, and obvious over the complex, ambiguous, and subtle. They may regard the arts and sciences with suspicion or view these endeavors as uninteresting. Closed people prefer familiarity over novelty; they are conservative and resistant to change.


Sample openness items
  • I have a rich vocabulary.
  • I have a vivid imagination.
  • I have excellent ideas.
  • I am quick to understand things.
  • I use difficult words.
  • I spend time reflecting on things.
  • I am full of ideas.

 2. Conscientiousness

Conscientiousness is a tendency to show self-discipline, act dutifully, and aim for achievement against measures or outside expectations. It is related to the way in which we control, regulate, and direct our impulses. High scores on conscientiousness indicate a preference for planned rather than spontaneous behavior. The average level of conscientiousness rises among young adults and then declines among older adults.


Sample conscientiousness items
  • I am always prepared.
  • I pay attention to details.
  • I get chores done right away.
  • I like order.
  • I follow a schedule.
  • I am exacting in my work.

3. Extraversion

Extraversion is characterized by breadth of activities (as opposed to depth), surgency from external activity/situations, and energy creation from external means. The trait is marked by pronounced engagement with the external world. Extraverts enjoy interacting with people, and are often perceived as full of energy. They tend to be enthusiastic, action-oriented individuals. They possess high group visibility, like to talk, and assert themselves.
Introverts have lower social engagement and energy levels than extraverts. They tend to seem quiet, low-key, deliberate, and less involved in the social world. Their lack of social involvement should not be interpreted as shyness or depression, they are simply more independent of their social world than extraverts. Introverts simply need less stimulation than extraverts and more time alone. This does not mean that they are unfriendly or antisocial; rather, they are reserved in social situations.


Sample extraversion items
  • I am the life of the party.
  • I don't mind being the center of attention.
  • I feel comfortable around people.
  • I start conversations.
  • I talk to a lot of different people at parties.

4. Agreeableness

Agreeableness is a tendency to be compassionate and cooperative rather than suspicious and antagonistic towards others. The trait reflects individual differences in general concern for social harmony. Agreeable individuals value getting along with others. They are generally considerate, friendly, generous, helpful, and willing to compromise their interests with others. Agreeable people also have an optimistic view of human nature.
Although agreeableness is positively correlated with good team-work skills, it is negatively correlated with leadership skills. Those who voice out their opinion in a team environment tend to move up the corporate rankings, whereas the ones that do not remain in the same position, usually labelled as the followers of the team.
Disagreeable individuals place self-interest above getting along with others. They are generally unconcerned with others’ well-being, and are less likely to extend themselves for other people. Sometimes their skepticism about others’ motives causes them to be suspicious, unfriendly, and uncooperative.


Sample agreeableness items
  • I am interested in people.
  • I sympathize with others' feelings.
  • I have a soft heart.
  • I take time out for others.
  • I feel others' emotions.
  • I make people feel at ease.

5. Neuroticism

Neuroticism is the tendency to experience negative emotions, such as anger, anxiety, or depression. It is sometimes called emotional instability, or is reversed and referred to as emotional stability. According to Eysenck’s (1967) theory of personality, neuroticism is interlinked with low tolerance for stress or aversive stimuli. Those who score high in neuroticism are emotionally reactive and vulnerable to stress. They are more likely to interpret ordinary situations as threatening, and minor frustrations as hopelessly difficult. Their negative emotional reactions tend to persist for unusually long periods of time, which means they are often in a bad mood. For instance, neuroticism is connected to a pessimistic approach toward work, confidence that work impedes with personal relationships, and apparent anxiety linked with work. Furthermore, those who score high on neuroticism may display more skin conductance reactivity than those who score low on neuroticism. These problems in emotional regulation can diminish the ability of a person scoring high on neuroticism to think clearly, make decisions, and cope effectively with stress. Lacking contentment in one's life achievements can correlate with high neuroticism scores and increase one's likelihood of falling into clinical depression.
At the other end of the scale, individuals who score low in neuroticism are less easily upset and are less emotionally reactive. They tend to be calm, emotionally stable, and free from persistent negative feelings. Freedom from negative feelings does not mean that low scorers experience a lot of positive feelings.
Research suggests extraversion and neuroticism are negatively correlated.
Neuroticism is similar but not identical to being neurotic in the Freudian sense. Some psychologists prefer to call neuroticism by the term emotional stability to differentiate it from the term neurotic in a career test.


Sample neuroticism items
  • I am easily disturbed.
  • I change my mood a lot.
  • I get irritated easily.
  • I get stressed out easily.
  • I get upset easily.
  • I have frequent mood swings.
  • I often feel blue.
  • I worry about things.
http://en.wikipedia.org/wiki/Big_Five_personality_traits