PRACTICAL NO 1
DATE:
AIM: Study and implementation ofClass Diagram THEORY:
Diagram nameCLASS DIAGRAM Defination of Class Diagram In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.
Purpose of Class Diagram 1. 2. 3. 4.
Shows static structure of classifiers in a system Diagram provides basic notation for other structure diagrams prescribed by UML Helpful for developers and other team members too Business Analysts can use class diagrams to model systems from business perspective
Advantage of Class Diagram 1. Class diagrams give you a sense of orientation. 2. Class diagrams are simple and fast to read. 3. At the same time they offer a quick overview of the synergy happening among the different system elements as well as their properties and relationships.
Disadvantage of Class Diagram 1. creating diagrams on a computer is slow 2. This is not a fault of the diagrams, but a fault of the diagramming applications. I'm happy to draw diagrams, but I draw them on a whiteboard while discussing design decisions 3. If someone really wants to see a diagram, they can extract one from the code.
Symbols: Aggregation: A special type of association. It represents a "part of" relationship.
Many instances (denoted by the *) of Class2 can be associated with Class1 A solid line with a unfilled diamond at the association end connected to the class of composite Objects of Class1 and Class2 have separate lifetimes.
Relationship Names:
Names of relationships are written in the middle of the association line. Good relation names make sense when you read them out loud "Every spreadsheet contains some number of cells", "an expression evaluates to a value" "Every spreadsheet contains some number of cells", "an expression evaluates to a value" They often have a small arrowhead to show the direction in which direction to read the relationship, e.g., expressions evaluate to values, but values do not evaluate to expressions.
Generalization:
Represents an "is-a" relationship. An abstract class name is shown in italics. SubClass1 and SubClass2 are specializations of Super Class.
Dependency:
Exists between two classes if changes to the definition of one may cause changes to the other (but not the other way around). Class1 depends on Class2 A dashed line with an open arrow
Diagram: class diagram
Conclusion: Hence we have successfully study Class diagram
PRACTICAL NO 2
DATE:
AIM: Study and implementation of use case diagram THEORY: Diagram nameUSE CASE DIAGRAM Defination of Case Use Diagram A UML use case diagram is the primary form of system/software requirements for a new software program under developed. Use cases specify the expected behaviour (what), and not the exact method of making it happen
Purpose of Use Case Diagram Use case diagrams are typically develop in early stage of development and people often apply use case modeling for the following purposes: Specify the context of a system Capture the requirements of a system Validate a systems architecture Drive implementation and generate test cases Developed by analysts together with domain expert
Advantage of Use Case diagram The use cases are mainly composed of narrative text. Hence, unlike many other
modeling techniques, the non-technical stake holders (e.g. customers, end users, salesperson etc.) are also able understand the model for the software system . Another major advantage of use case modeling is that it requires the identification of exceptional scenarios for the use cases
Disadvantage of Use Case diagram
They do not capture the non-functional requirements easily. There might be a learning curve for the developer and/or specially, the client in using these use cases.
Symbols Actor Someone interacts with use case (system function). Named by noun. Actor plays a role in the business Actor has responsibility toward the system (inputs), and Actor have expectations from the system (outputs).
Use Case A use case represents a user goal that can be achieved by accessing the system or software application. In Visual Paradigm, you can make use of the sub-diagram feature to describe the interaction between user and system within a use case by creating a sub-sequence diagram under a use case.
Boundary of system
The system boundary is potentially the entire system as defined in the requirements document. For large and complex systems, each module may be the system boundary.
Extends
Indicates that an "Invalid Password" use case may include (subject to specified in the extension) the behavior specified by base use case "Login Account". The stereotype "<<extends>>" identifies as an extend relationship
Include
When a use case is depicted as using functionality of another functionality of another use case, this relationship between the use cases is named as an include or uses relationship. A use case includes the functionality described in another use case as a part of its business process flow The stereotype "<>" identifies the relationship as an include relationship
Generalization Relationship A generalization relationship means that a child use case inherits the behavior and meaning of the parent use case. The child may add or override the behavior of the parent. The figure below provides a use case example by showing two generalization connectors that connect between the three use cases.
Association Actor and use case can be associated to indicate that the actor participates in that use case. Therefore, an association correspond to a sequence of actions between the actor and use case in achieving the use case.
Realization A realization is a relationship between a specification and its implementation.
Diagram: use case diagram
Conclusion: Hence we have successfully study use case diagram
PRACTICAL NO 3 AIM: Study and implementation of ER-Diagram
DATE:
THEORY: Diagram nameER-DIAGRAM
Defination of ER-Diagram ER-modeling is a data modeling technique used in software engineering to produce a conceptual data model of a information system. Diagrams created using this ER-modeling technique are called Entity-Relationship Diagrams, or ER diagrams or ERDs. So you can say that Entity Relationship Diagrams illustrate the logical structure of databases.
Purpose of ER-Diagram
Database design Database troubleshooting
Business information systemsBusiness process re-engineering (BPR) Education Research
Advantage of ER-Diagram
Conceptually it is very simple: ER model is very simple because if we know relationship between entities and attributes, then we can easily draw an ER diagram.
Better visual representation: ER model is a diagrammatic representation of any logical structure of database. By seeing ER diagram, we can easily understand relationship among entities and relationship.
Effective communication tool: It is an effective communication tool for database designer.
Disadvantage of ER-Diagram
Loss of information content: Some information be lost or hidden in ER model
Limited relationship representation: ER model represents limited relationship as compared to another data models like relational model etc.
No representation of data manipulation: It is difficult to show data manipulation in ER model.
Symbols Entity :An ERD entity is a definable thing or concept within a system, such as a person/role When determining entities, think of them as nouns. In ER models, an entity is shown as a rounded rectangle, with its name on top and its attributes listed in the body of the entity shape. Z
Primary Key: Also known as PK, a primary key is a special kind of entity attribute that uniquely defines a record in a database table. In other words, there must not be two (or more) records that share the same value for the primary key attribute
Foreign Key :Also known as FK, a foreign key is a reference to a primary key in table. It is used to identify the relationships between entities. Note that foreign keys need not to be unique. Multiple records can share the same values. among which a foreign key is used in referencing another entity.
Relationship: A relationship between two entities signifies that the two entities are associated with each other somehow
Cardinality:Cardinality defines the possible number of occurrence in one entity which are associated to the number of occurrences in another.
Attribute Each entity has a set of properties. These properties of each entity are termed as attributes. For example, a car entity would be described by attributes such as price, registration number, model number, color etc. Attributes are indicated by ovals in an e-r diagram.
Diagram: ER diagram
Conclusion: Hence we have successfully study ER-diagram. PRACTICAL NO 4 AIM: Study and implementation of Sequence Diagram THEORY: DIAGRAM NAME :SEQUENCE DIAGRAM
Defination of Sequence Diagram
DATE:
A sequence diagram is an interaction diagram that emphasizes the time-ordering of messages. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. I
Purpose of Sequence Diagram A sequence diagram is a type of interaction diagram because it describes how—and in
what order—a group of objects works together. These diagrams are used by software developers and business professionals to understand requirements for a new system or to document an existing process.
Advantage of Sequence Diagram
Easier to read. UML specification is more sequence diagram centric Communication diagrams have more advantageswhen applying UML as sketch because they are more space efficient, simple to modify, allows vertical expansion rather than horizontal which is the case for sequence diagrams.
Disadvantage of Sequence Diagram
A sequence diagram can be used to refine a use case behavior or description.
This approach is useful during requirement analysis because it may help identify classes and associations that did not emerge at the beginning.
You can formalize the association between the use case and the sequence diagram by adding the diagram to the Related Diagrams tab of the property sheet of the use case.
Symbols Object :In the UML, an object in a sequence diagram is drawn as a rectangle containing the name of the object, underlined. An object can be named in one of three ways: the object name, the object name and its class, or just the class name The three ways of naming an object
Lifeline :Entities of participants in a collaboration (scenario) are written horizontally across the top of the diagram. A lifeline is represented by dashed vertical line drawn below each object. These indicate the existence of the object.
Message :Messages depict the invocation of operations are shown horizontally. They are drawn from the sender to the receiver. 1. A synchronous message (typically an operation call) is shown as a solid line with a filled arrowhead. It is a regular message call used for normal communication between sender and receiver. 2. A return message uses a dashed line with an open arrowhead.
3. A destructor message destroys its receiver. There are other ways to indicate that a target is destroyed during an interaction. Only when a target's destruction is set to 'after destructor' do you have to use a destructor.
Diagram: Sequence Diagram For login:
For event:
For manage:
For volenteer:
For Logout:
Conclusion: Hence we have successfully study Sequence diagram.
PRACTICAL NO 5
DATE:
AIM: Study and implementationof state transition diagram THEORY: Diagram nameSTATE TRANSITION DIAGRAM Defination of State transition Diagram The behavior of an entity is not only a direct consequence of its inputs, but it also depends on its preceding state. The past history of an entity can best be modeled by a finite state machine diagram or traditionally called automata. UM LState Machine Diagrams
Purpose of State transitionDiagram
State machine diagram typically are used to describe state-dependent behavior for an object. An object responds differently to the same event depending on what state it is in State machine diagrams are usually applied to objects but can be applied to any element that has behavior to other entities such as: actors, use cases, methods, subsystems systems and etc.
Advantage of State transitiondiagram To begin with, a major advantage of the state model is its capability to minimize conditional complexity It eliminates the need for if and switch statements on objects with different behavioral requirements, unique to different state transitions State transition diagram is also called state machine diagram
Disadvantage of State transitiondiagram A developer needs to write a large amount of code for the state schema . Depending on the number of different defined state transition methods and possible object states, you can write numerous methods.
Symbols State A state is a constraint or a situation in the life cycle of an object, in which a constraint holds, the object executes an activity or waits for an event. A state machine diagram is a graph consisting of: States (simple states or composite states) State transitions connecting the states There is two state in state diagram active and passive state Example:
initial and Final States
The initial state of a state machine diagram, known as an initial pseudo-state, is indicated with a solid circle. A transition from this state will show the first real state The final state of a state machine diagram is shown as concentric circles. An open loop state machine represents an object that may terminate before the system terminates, while a closed loop state machine diagram does not have a final state; if it is the case, then the object lives until the entire system terminates.
Example:
Transition Transitiontakes operation from one state to another and represents the response to a particular event. A single transition comes out of each state or activity, connecting it to the next state or activity.
Decision Decisions were introduced in UML to support conditionals in activities.
Diagram: State machine diagram
Conclusion: Hence we have successfully study state transition diagram
PRACTICAL NO 6
DATE:
AIM: Study and implementation of Data Flow Diagram THEORY: DIAGRAM NAME : Data Flow DIAGRAM
Defination of Data Flow Diagram A picture is worth a thousand words. A Data Flow Diagram (DFD) is traditional visual representation of the information flows within a system. A neat and clear DFD can depict a good amount of the system requirements graphically. It can be manual, automated, or combination of both
Purpose of Data Flow Diagram
Data flow diagrams are used to graphically represent the flow of data in a business information system. DFD describes the processes that are involved in a system to transfer data from the input to the file storage and reports generation.
Data flow diagrams can be divided into logical and physical. The logical data flow diagram describes flow of data through a system to perform certain functionality of a business. The physical data flow diagram describes the implementation of the logical data flow.
Advantage of Data Flow Diagram
It aids in describing the boundaries of the system. It is beneficial for communicating existing system knowledge to the users. A straightforward graphical technique which is easy to recognise. DFDs can provide a detailed representation of system components.
Disadvantage of Data Flow Diagram
It make the programmers little confusing concerning the system. The biggest drawback of the DFD is that it simply takes a long time to create, so long that the analyst may not receive support from management to complete it. Physical considerations are left out.
Symbols External Entity
: An external entity can represent a human, system or subsystem. It is where certain data comes from or goes to. It is external to the system we study, in terms of the business process. For this reason, people used to draw external entities on the edge of a diagram.
Process
: A process is a business activity or function where the manipulation and transformation of data takes place. A process can be decomposed to finer level of details, for representing how data is being processed within the process.
Data Store
:A data store represents the storage of persistent data required and/or produced by the process. Here are some examples of data stores: membership forms, database table, etc.
Data Flow
: A data flow represents the flow of information, with its direction represented by an arrow head that shows at the end(s) of flow connector.
Diagram: DATA FLOW DIAGRAM Level 0:
Level one :
LEVEL 2:
Conclusion: Hence we have successfully study Data Flow diagram.
PRACTICAL NO 7
DATE:
AIM: Study and implementation of collaborationdiagram THEORY: Diagram nameCOLLABORATIONDIAGRAM Defination of collaborationDiagram Collaboration diagrams known as Communication Diagram are used to show how objects interact to perform the behavior of a particular use case, or a part of a use case. Along with sequence diagrams, collaboration are used by designers to define and clarify the roles of the objects that perform a particular flow of events of a use case. They are the primary source of information used to determining class responsibilities and interfaces.
Purpose of collaborationDiagram
Model collaborations between objects or roles that deliver the functionalities of use cases and operations Model mechanisms within the architectural design of the system Capture interactions that show the messages passing between objects and roles within the collaboration Support the identification of objects (hence classes) that participate in use cases
Advantage of collaborationdiagram
Collaboration between businesses can happen between corporations, or between nonprofit organizations and corporations To survive in a competitive business world, a company needs as much help as it can get. While the potential for positive collaboration results exists between organizations, there are still disadvantages to be aware of before you agree to a partnership with another organization.
Disadvantage of collaborationdiagram
One of the advantages of a collaborative effort between companies is the complementary ways in which personnel can enhance the relationship.
Symbols Objects Object are model elements that represent instances of a class or of classes.
Association role Association role is optional and suppressible.
Link to self Link to self is used to link the objects that fulfill more than one role.
Diagram: collaboration diagram For login
For event:
For volunteer:
For login
Conclusion: Hence we have successfully study collaboration diagram
PRACTICAL NO 8
DATE:
AIM: Study and implementation of Activity Diagram THEORY: DIAGRAM NAME : ACTIVITY DIAGRAM
Defination of Activity Diagram I Activity diagram is another important behavioral diagram in UML diagram to describe dynamic aspects of the system. Activity diagram is essentially an advanced version of flow chart that modeling the flow from one activity to another activity.
Purpose of Activity Diagram Activity Diagrams describe how activities are coordinated to provide a service which can be at different levels of abstraction.
Typically, an event needs to be achieved by some operations, particularly where the operation is intended to achieve a number of different things that require coordination, or how the events in a single use case relate to one another, in particular, use cases where activities may overlap and require coordination.
It is also suitable for modeling how a collection of use cases coordinate to represent business workflows
Advantage of Activity Diagram
UML modeling language included that these diagrams are normally easily comprehensible for both analysts and stakeholders. In UML for the IT Business Analyst, “The activity diagram is the one most useful to the IT BA for depicting work flow [because] it is simple to understand-both for BAs and endusers.” Since they are among the most user-friendly diagrams available, they are generally regarded as an essential tool in an analyst’s repertoire.
Disadvantage of Activity Diagram
UML modeling language include that these diagrams have the potential to become overly complex because their user-friendly nature may lend itself to an all-inclusive description.
In other words, since it is so simple to display the information related to the project Instead, an analyst should try to present a new diagram for each work flow, or if more applicable, to use swimlanes to present different actors within the same work flow.
Symbols
Swimlane and Partition : A way to group activities performed by the same actor on an activity diagram or to group activities in a single thread
Action A task to be performed
Control Flow Shows the sequence of execution
Object Flow Show the flow of an object from one activity (or action) to another activity (or action).
Initial Node Portrays the beginning of a set of actions or activities
Activity Final Node Stop all control flows and object flows in an activity (or action)
Joint symbol Combines two concurrent activities and re-introduces them to a flow where only one activity occurs at a time. Represented with a thick vertical or horizontal line
Fork symbol Splits a single activity flow into two concurrent activities. Symbolized with multiple arrowed lines from a join.
Diagram: Activity diagram
Conclusion: Hence we have successfully study Activity diagram.
PRACTICAL NO 9
DATE:
AIM: Study and implementation of component diagram THEORY: Diagram nameCOMPONENT DIAGRAM Defination of component Diagram Component diagrams are used in modeling the physical aspects of object-oriented systems that are used for visualizing, specifying, and documenting component-based systems and also for constructing executable systems through forward and reverse engineering.
Purpose of component Diagram
Static implementation represents the organization of the components at a particular moment. A single component diagram cannot represent the entire system but a collection of diagrams is used to represent the whole. he purpose is also different from all other diagrams discussed so far. It does not describe the functionality of the system but it describes the components used to make those functionalities.
Advantage of component diagram
Imagine the system’s physical structure. Pay attention to the system’s components and how they relate. Emphasize the service behavior as it relates to the interface.
Disadvantage of component diagram
The strongest argument against UML is that you don’t really need a UML diagram to communicate your designs. you can have the same impact and effect with informal, box-and-line diagrams created in PowerPoint, Visio, or a whiteboard. As coding is a formal language by itself, a lot of developers don’t prefer the complexity and the formality
Symbols Component symbol An entity required to execute a stereotype function. A component provides and consumes behavior through interfaces, as well as through other components
Port symbol Specifies a separate interaction point between the component and the environment. Ports are symbolized with a small square
Dependency A dependency is a relationship that signifies that a single or a set of model elements requires other model elements for their specification or implementation.
Links A generalization is a taxonomic relationship between a more general classifier and a more specific classifier.
Diagram: component diagram
Conclusion: Hence we have successfully study componentdiagram
PRACTICAL NO 10
DATE:
AIM: Study and implementation of Deployment Diagram THEORY: DIAGRAM NAME : DEPLOYMENT DIAGRAM
Defination of Deployment Diagram A deployment diagram is a diagram that shows the configuration of run time processing nodes and the components (hardware, software & middleware on hardware) that live on them that is used to model the static deployment view of a system (topology of the hardware).
Purpose of Deployment Diagram
They show the structure of the run-time system They capture the hardware that will be used to implement the system and the links between different items of hardware. They model physical hardware elements and the communication paths between them They can be used to plan the architecture of a system.
Advantage of Deployment Diagram
The term Deployment itself describes the purpose of the diagram. Deploymentdiagrams are used for describing the hardware components where softwarecomponents are deployed. ... Most of the UML diagrams are used to handle logical components but deployment diagrams are made to focus on the hardware topology of a system.
Disadvantage of Deployment Diagram
Deployment diagrams are used for describing the hardware components, where software components are deployed Component diagrams are used to describe the components and deployment diagrams shows how they are deployed in hardware. UML is mainly designed to focus on the software artifacts of a system.
Symbols Nodes
A node usually represents a piece of hardware in the system. A connection depicts the communication path used by the hardware to communicate usually indicates the method 3-D box represents a node, either software or hardware Connections between nodes are represented with a line, with optional
Dependency:
Exists between two classes if changes to the definition of one may cause changes to the other (but not the other way around). A dashed line with an open arrow
Diagram: Deployment diagram
Conclusion:Hence we have successfully study Deployment diagram.