Design phases

Illustrate forward and reverse engineering of class diagram?

Sr. No.Forward EngineeringReverse Engineering
1.It is the process of transforming a model into code through a mapping to an implementation language.It is the process of transforming code into a model through a mapping from a specific implementation language.
2.Forward engineering results in a loss of information, because models written in the UML are semantically richer than any current object oriented programming language.Reverse engineering results in a flood of information, some of which is at a lower level of detail than you will need to build useful models.
3.It identifies the rules for mapping to your implementation language or languages of choice.It identifies the rules for mapping from your implementation language or languages of choice.
4It is a traditional process of moving high-level abstracts and logical, implementation-independent designs to the physical implementation of a system.It is a process of analyzing an existing system to identify its components and their interrelationships.
5.It would be a logical forward-moving design.It would be a form of creative deconstruction.
6.It is easy, because the design includes all dependencies, indexes and relationships between the components of the data model.It is hard, because not every database engine has the means to store the interdependencies between objects in a logical model.


A. Forward Engineering

forward engineering

B. Reverse Engineering

reverse engineering

23. Draw a class diagram for a information system of school making suitable assumption about the scope and functioning.

Class diagram for a information system of school:

class diagram information school

Explain the following terms in relation with communication diagram.
I) frame
II) lifeline
III) message

Communication Diagram
  • It is similar to sequence diagrams.
  • It is used to model the dynamic behavior of the use case.
  • When comparing to sequence diagram, the communication diagram is more focused on showing the collaboration of objects rather than the time sequence.
  • It uses the free-form arrangement of objects and links as used in object diagrams.
I) Frame
  • Communication diagram could be shown within a rectangular frame with the name in a compartment in the upper left corner.
  • There is no specific long form name for communication diagrams heading types.
  • There is also no specific short form name for communication diagrams. The Short form name is 'SD', which is used for interaction diagrams.
  • This 'SD' is a bit confusing as it looks like an abbreviation of a sequence diagram.
interaction diagram phase

II) Lifeline
  • It is a specialization of named element which represents an individual participant in the interaction.
  • It represents only one interacting entity.
  • A lifeline is shown as a rectangle.
  • In sequence diagram, lifeline does have 'tail' representing the line of life, whereas 'lifeline' in the communication diagram has no line just 'head'.
object

III) message
  • A message in communication diagram is shown as a line with sequence diagram and arrow above the line.
  • The arrow indicates that the direction of the communication.
message
  • An instance of class 'A' will send a message to the instance of 'C'.
  • The sequence expression is a dot (.) separated list of sequence terms followed by a colon (:). Message name follows the sequence expression.

Describe the purpose of Sequence Diagram.

Sequence Diagram
  • It is an interaction diagram that shows how processes operate with one another and in what order.
  • It is a construct of a Message Sequence Chart.
  • It shows object interactions arranged in time sequence.
  • Sequence diagram depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects.
  • It shows parallel vertical lines that mean lifelines, different processes or objects that live simultaneously and as horizontal arrows, the messages exchanged between them, in the order in which they occur.
  • Sequence diagram allows the specification of simple runtime scenario in a graphical manner.
Purpose of Sequence Diagram
  • It is used to show the interaction between objects in the sequential order that those interactions occur.
  • In an organization, business staff can find sequence diagrams useful to communicate how the business currently works by showing how various business objects interact.
  • A business level sequence diagram can be used as a requirements document to communicate requirements for a future system implementation.
  • An organization's technical staff can find sequence diagrams useful in documenting how a future system should behave.
  • The main purpose of a sequence diagram is to define event sequences that result in some desired outcome.
  • During the design phase, architects and developers can use the diagram to force out the system's object interactions.

What are the common uses of Deployment Diagram?

Deployment Diagram
  • It is used to visualize the topology of the physical components of a system where the software components are deployed.
  • These diagrams are used to describe the static deployment view of a system.
  • It consists of nodes and their relationships.
  • It used for describing the hardware components where software components are deployed.
  • It helps to model the physical aspect of an object-oriented software system.
  • It models the run-time configuration in a static view and visualizes the distribution of components in an application.
deployment diagram

Common uses of Deployment Diagram
  • It is used to describe the physical components, their distribution and association.
  • It is used to model the hardware topology of a system.
  • It is used to model embedded system.
  • It is used to model hardware details for a client/server system.
  • It is used to model hardware details for a distributed application.
  • It is used for forward and reverse engineering.

Explain the object diagram with example.

  • It is derived from class diagram, so the object diagrams are dependent upon class diagrams.
  • It represents an instance of a class diagram.
  • It is used to render a set of objects and their relationships as an instance.
  • It shows a snapshot of the detailed state of a system at a point in time.
object diagram

Purpose of Object Diagram
  • It is used to capture the static view of a system at a particular moment.
  • The main purpose is to implement object diagram practically.
  • It represents an instance at a particular moment which is concrete in nature.
  • It is used in forward and reverse engineering.
  • It defines object relationships of a system.
  • It defines a static view of an interaction.
  • It understands object behavior and their relationship from a practical perspective.
object diagram of employee management system

Write note on timing diagram.

Timing Diagram
  • It is a specific type of interaction diagram, where the focus is on timing constraints.
  • It is used to explore the behaviors of objects throughput a given period of time.
  • It is a special form of a sequence diagram.
  • The only difference between timing diagram and sequence diagram are the axes are reversed so that the time is increased from left to right and the lifelines are shown in separate compartments arranged vertically.
  • It shows the behavior of the objects in a given period of time.
  • It focuses on condition changing within and among lifelines along a linear time axis.
  • It is used to show interactions when a primary purpose of the diagram is to reason about time.
Notations

1. Constraint
  • It represents a condition or restriction expressed in natural language text or in a machine readable language for the purpose of declaring some of the semantics of an element.
Properties
NameThe name of a constraint. It is optional and is commonly omitted.
ExpressionThe condition that must be true when evaluated in order for the constraint to be satisfied.
DocumentationDescription of constraint.

2. Note
  • It gives the ability to attach various remarks to the elements.
  • It carries no semantic force, but may contain information that is useful to a modeler.
Properties

NameThe name of a note.
DocumentationIt specifies a string that is the comment.

3. Timing Frame
  • An interaction is a unit of behavior that focuses on the observable exchange of information between ConnectableElements.
Properties
NameThe name of a frame.
DocumentationDescription of timing frame.

Draw state machine diagram for automatic washing machine.

state machine diagram washing machine min

Explain component diagram with suitable example.

Component Diagram
  • It depicts how components are wired together to form larger components and software systems.
  • It is used to illustrate the structure of arbitrarily complex systems.
  • It has a higher level of abstraction than a Class diagram.
  • It shows components, provided and required interfaces, ports and relationships between them.
  • This type of diagrams is used in Component-Based Development (CBD) to describe systems with Service-Oriented Architecture (SOA).
component diagram

Usage of Component Diagram
  • It is used to visualize the physical components in a system.
  • It constructs executable by using forward and reverse engineering.
  • It describes the organization and relationships of the components.
  • It is used to describe the artifacts of a system.
  • These diagrams are used during the implementation phase of an application.
  • It is used to model the database schema and system's source code.
  • It is used to model executables of an application.

Draw deployment diagram for web application-online ordering of book. Write your assumptions clearly.

Online ordering book deployment diagram

Explain fork and Join with example.

Fork
  • A task that uses the fork and join principle can fork that means split itself into smaller subtasks which can be executed concurrently.
  • It allows a new ForkJoinTask to be launched from an existing one.
  • It schedules a new task within a ForkJoinPool, but no child Java Virtual Machine is ever created.
  • It can be shown in a below diagram,

  • fork

  • By splitting itself into subtasks, each subtask can be executed in parallel by different CPUs or different threads on the same CPU.
Join
  • When a task has split itself up into subtasks, the task waits until the subtasks have finished executing.
  • Once the subtasks have finished executing, the task may join that means merging all the results into one result.
  • It can be shown in the diagram below:

  • join

  • It allows a ForkJoinTask to wait for the completion of another one.
  • ForkJoin framework is an implementation of the ExecutorService interface that helps to take advantage of multiple processors.

Explain the design view in 4+1 view architecture in brief.

What is 4+1 view architecture?
  • It is a view model, used for describing the architecture of software intensive systems.
  • It is based on the use of multiple concurrent views.
  • These views are used to describe the system from the viewpoint of different stakeholders, such as end-users, developers and project managers.
There are four views of the model

1. Logical View
2. Process View
3. Development View
4. Physical View

Why is it called 4 + 1 instead of just 5?
  • Use cases are used to illustrate the architecture serving as the + 1 view. Hence, the model contains 4 + 1 views.
  • When all the views are finished, use cases are effectively redundant.
  • It gives the details of high level requirements of the system.
four plus one view architecture
1. Logical View
  • It contains the information about the various parts of the system.
  • It is concerned with the functionality that the system provides to end-users.
  • UML diagrams are used to represent logical view, including class diagram, communication diagram, sequence diagram.
2. Development View
  • It is also known as the implementation view.
  • It illustrates a system from a system from a programmer's perspective.
  • It is concerned with the software management.
  • It focuses on software modules and subsystems.
  • UML diagrams are used to represent development view, including package diagram, component diagram.
3. Process View
  • It deals with the dynamic aspects of the system.
  • It explains the system process, how they communicate and focus on the runtime behavior of the system.
  • It describes the concurrent process within the system.
  • UML diagrams are used to represent process view, include the activity diagram.
4. Physical View
  • It is also known as the deployment view.
  • It describes the physical deployment of the system.
  • It depicts the system from a system engineer's point of view.
  • UML diagrams are used to represent physical view, included in the deployment diagram.
5. Use Case View
  • It describes the functionality of the system from the perspective of the outside world.
  • It contains the diagram describing what the system is supposed to do from a black-box perspective.
  • It contains use case diagrams.
  • All other views use this view to guide them.

Explain the design view in 4+1 view architecture in brief.

What is 4+1 view architecture?
  • It is a view model, used for describing the architecture of software intensive systems.
  • It is based on the use of multiple concurrent views.
  • These views are used to describe the system from the viewpoint of different stakeholders, such as end-users, developers and project managers.
There are four views of the model

1. Logical View
2. Process View
3. Development View
4. Physical View

Why is it called 4 + 1 instead of just 5?
  • Use cases are used to illustrate the architecture serving as the + 1 view. Hence, the model contains 4 + 1 views.
  • When all the views are finished, use cases are effectively redundant.
  • It gives the details of high level requirements of the system.
four plus one view architecture
1. Logical View
  • It contains the information about the various parts of the system.
  • It is concerned with the functionality that the system provides to end-users.
  • UML diagrams are used to represent logical view, including class diagram, communication diagram, sequence diagram.
2. Development View
  • It is also known as the implementation view.
  • It illustrates a system from a system from a programmer's perspective.
  • It is concerned with the software management.
  • It focuses on software modules and subsystems.
  • UML diagrams are used to represent development view, including package diagram, component diagram.
3. Process View
  • It deals with the dynamic aspects of the system.
  • It explains the system process, how they communicate and focus on the runtime behavior of the system.
  • It describes the concurrent process within the system.
  • UML diagrams are used to represent process view, include the activity diagram.
4. Physical View
  • It is also known as the deployment view.
  • It describes the physical deployment of the system.
  • It depicts the system from a system engineer's point of view.
  • UML diagrams are used to represent physical view, included in the deployment diagram.
5. Use Case View
  • It describes the functionality of the system from the perspective of the outside world.
  • It contains the diagram describing what the system is supposed to do from a black-box perspective.
  • It contains use case diagrams.
  • All other views use this view to guide them.