0

In many interviews I've been asked this question. What is a Package Diagram? and What is a Sequence Diagram? and difference between Package Diagram and Sequence Diagram.

Thanks in Advance.

Edit

Sorry, google give me lot of answer, but i want to practical answer with example.

2
7

A package diagram is a UML diagram that describes the hierarchical relationships (groupings) between packages and other packages or objects. A package represents a namespace.

Package Diagram Example

enter image description here

A sequence diagram is a UML diagram that describes how objects collaborate together in a specific scenario.

Sequence Diagram Example

enter image description here

0
4

Well, some googling would have brought up the answers in a few seconds.

Package Diagram

Package diagrams can use packages containing use cases to illustrate the functionality of a software system. Package diagrams can use packages that represent the different layers of a software system to illustrate the layered architecture of a software system. The dependencies between these packages can be adorned with labels / stereotypes to indicate the communication mechanism between the layers.

People find package diagrams extremely useful on larger-scale systems to get a picture of the dependencies between major elements of a System . These diagrams correspond well to common programming structures . Plotting diagrams of packages and dependencies helps you keep an application's dependencies under control.

Sequence Diagram

A sequence diagram shows object interactions arranged in time sequence. 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. Sequence diagrams are typically associated with use case realizations in the Logical View of the system under development

Since you have a C++ background, the concept of packages is probably not known to you. You can roughly compare it to the concept of namespaces in C++. Its main purposes are encapsulation and dependency minimation as well as simplifying division of labor and structuring your system at design time.

1
  • Thanks for replay, but i want to answer with example. Please give me any example. – SAMIR RATHOD Jun 4 '13 at 10:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.