Vous êtes sur la page 1sur 16

Short questions

1. Draw a use case of library management system.


The use case diagram is a graphical representation of the system. It is an interaction between actors
and the system. It also depicts the system boundary________________ what is included in the
system, what is not included in the system, what is outside the system and interacts the system.it is
constructed from the use cases ,actor and the relationship between them.

2. Define the term inheritance with example.


Inheritance;
The process in which object of one class acquire the properties of objects of another class is
known as inheritance. This supports the hierarchical classification. This provides reuse-
ability. It makes it is possible to add additional features to an existing class without modifying
it. This helps avoids duplication. A class is also known as subclass or a child class can inherit
attributes and operations from another class known as super class or parent class.

Example;
1. A car is a vehicle. An auto rickshaw is a vehicle. A truck is vehicle. In which vehicle is supper class
and the car, auto rickshaw and the truck are sub classes.

2. A dog is an animal. A cat is an animal. A cow is an animal. A lion is an animal. In which animal is
supper class and the dog, cat and lion are subclasses.

3. Why we need for use case?


A use case is a methodology used in system analysis to identify, clarify, and organize system
requirements. The use case is made up of a set of possible sequences of interactions between systems and
users in a particular environment and related to a particular goal. It consists of a group of elements (for
example, classes and interfaces) that can be used together in a way that will have an effect larger than the
sum of the separate elements combined. The use case should contain all system activities that have
significance to the users. A use case can be thought of as a collection of possible scenarios related to a
particular goal, indeed, the use case and goal are sometimes considered to be synonymous. A use case (or
set of use cases) has these characteristics:

 Organizes functional requirements

 Models the goals of system/actor (user) interactions

 Records paths (called scenarios) from trigger events to goals

 Describes one main flow of events (also called a basic course of action), and possibly other ones,
called exceptional flows of events (also called alternate courses of action)

 Is multi-level, so that one use case can use the functionality of another one.
4. What is the difference between a scenario and a use
case? When do you use each construct?
A scenario is an actual sequence of interactions (i.e., an instance) describing one specific situation; a
use case is a general sequence of interactions (i.e., a class) describing all possible scenarios associated
with a situation. Scenarios are used as examples and for clarifying details with the client. Use cases
are used as complete descriptions to specify a user task or a set of related system features.

5. What is the purpose of modeling?


The purpose of modeling is to reduce complexity by building a simplified representation of reality
which ignores irrelevant details. What is relevant or not is defined by the questions the model will be
used to answer.

6. What is the difference between the fork and the


join?
Fork;
A fork may have one incoming transaction and two or more outgoing transactions.

1. Each transaction represents an independent flow of control


2. Conceptually, the activities of each of outgoing transition are concurrent.

Join:
A Join may have two or more incoming transactions and one outgoing transaction.

1. Above the join, the activity associated with each of these paths continues in parallel.
2. Conceptually, the activities of each of outgoing transactions are concurrent.
1. Either truly concurrent.
2. Or sequential yet interleaved.

Result;
A Fork have one incoming transaction and two more outgoing transactions whereas a join may have
two or more incoming transactions and one outgoing transaction.
7. Define UML.
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems.

UML was created by the Object Management Group (OMG) and UML 1.0 specification draft
was proposed to the OMG in January 1997.

 UML stands for Unified Modeling Language.

 UML is different from the other common programming languages such as C++, Java, COBOL, etc.

 UML is a pictorial language used to make software blueprints.

 UML can be described as a general purpose visual modeling language to visualize, specify, construct,
and document software system.

 Although UML is generally used to model software systems, it is not limited within this boundary. It
is also used to model non-software systems as well. For example, the process flow in a
manufacturing unit, etc.
 UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis
and design. After some standardization, UML has become an OMG standard.

8. Consider an ATM System , identify at least three


actors that interact with system.
An actor is any entity (user or system) that interacts with the system of interest. For an ATM, this
includes:

• Bank Customer

• ATM Maintainer

• Central Bank Computer

• Thief

The last actor is often referred to as a “misactor” in the literature, because it is an actor that interacts with
the system but shouldn’t.

Long questions:
1.What is UML? Discuss activity and
use case diagram with examples.
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems.

UML was created by the Object Management Group (OMG) and UML 1.0 specification draft
was proposed to the OMG in January 1997.

 UML stands for Unified Modeling Language.

 UML is different from the other common programming languages such as C++, Java, COBOL, etc.

 UML is a pictorial language used to make software blueprints.


 UML can be described as a general purpose visual modeling language to visualize, specify, construct,
and document software system.

 Although UML is generally used to model software systems, it is not limited within this boundary. It
is also used to model non-software systems as well. For example, the process flow in a
manufacturing unit, etc.

 UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis
and design. After some standardization, UML has become an OMG standard.

Activity diagram:
An activity diagram visually presents a series of actions or flow of control in a system similar to
a flowchart or a data flow diagram. Activity diagrams are often used in business process modeling. They
can also describe the steps in a use case diagram. Activities modeled can be sequential and concurrent. In
both cases an activity diagram will have a beginning (an initial state) and an end (a final state).

Basic Activity Diagram Notations and


Symbols
Initial State or Start Point
A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram. For activity diagram using swimlanes, make sure the start point is placed in
the top left corner of the first column.

Activity or Action State


An action state represents the non-interruptible action of objects. You can draw an action state in
SmartDraw using a rectangle with rounded corners.
Action Flow
Action flows, also called edges and paths, illustrate the transitions from one action state to
another. They are usually drawn with an arrowed line.

Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow arrow
from an action to an object means that the action creates or influences the object. An object flow
arrow from an object to an action indicates that the action state uses the object.

Decisions and Branching


A diamond represents a decision with alternate paths. When an activity requires a decision prior
to moving on to the next activity, add a diamond between the two activities. The outgoing
alternates should be labeled with a condition or guard expression. You can also label one of the
paths "else."

Guards
In UML, guards are a statement written next to a decision diamond that must be true before
moving next to the next activity. These are not essential, but are useful when a specific answer,
such as "Yes, three labels are printed," is needed before moving forward.
Synchronization
A fork node is used to split a single incoming flow into multiple concurrent flows. It is
represented as a straight, slightly thicker line in an activity diagram.
A join node joins multiple concurrent flows back into a single outgoing flow.
A fork and join mode used together are often referred to as synchronization.

Time Event
This refers to an event that stops the flow for a time; an hourglass depicts it.
Merge Event
A merge event brings together multiple flows that are not concurrent.

Sent and Received Signals


Signals represent how activities can be modified from outside the system. They usually appear in
pairs of sent and received signals, because the state can't change until a response is received,
much like synchronous messages in a sequence diagram. For example, an authorization of
payment is needed before an order can be completed.

Interrupting Edge
An event, such as a cancellation, that interrupts the flow denoted with a lightning bolt.

Swim lanes
Swim lanes group related activities into one column.
Final State or End Point
An arrow pointing to a filled circle nested inside another circle represents the final action state.
Activity Diagram Examples
The best way to understand activity diagrams is to look at some examples of activity diagrams.
Use-case diagram:
A use case is a list of actions or event steps typically defining the interactions between a
role of an actor and a system to achieve a goal. A use case is a useful technique for
identifying, clarifying, and organizing system requirements. A use case is made up of a
set of possible sequences of interactions between systems and users that defines the
features to be implemented and the resolution of any errors that may be encountered.

While a use case itself might drill into a lot of detail (such as, flow of events and
scenarios) about every possibility, a use-case diagram can help provide a higher-level
view of the system, providing the simplified and graphical representation of what the
system must actually do.

A use case (or set of use cases) has these characteristics:

 Organizes functional requirements


 Models the goals of system/actor (user) interactions
 Describes one main flow of events (main scenarios) and possibly other exceptional flows
(alternatives), also called paths or user scenarios

Use Case Diagram Notations

n components
Actor;
Actors are usually individuals involved with the system defined according to their roles. The actor can be
a human or other external system.

Use Case;
A use case describes how actors uses a system to accomplish a particular goal. Use cases are typically
initiated by a user to fulfill goals describing the activities and variants involved in attaining the goal.

Relationship;
The relationships between and among the actors and the use cases

System Boundary;
The system boundary defines the system of interest in relation to the world around it.

Benefits of Use Case Diagram;


 Use cases is a powerful technique for the elicitation and documentation of black-box functional
requirements.
 Because, use cases are easy to understand and provide an excellent way for communicating with customers
and users as they are written in natural language.
 Use cases can help manage the complexity of large projects by partitioning the problem into major user
features (i.e., use cases) and by specifying applications from the users' perspective.
 A use case scenario, often represented by a sequence diagram, involves the collaboration of multiple
objects and classes, use cases help identify the messages (operations and the information or data required -
parameters) that glue the objects and classes together.
 Use cases provide a good basis to link between the verification of the higher-level models (i.e. interaction
between actors and a set of collaborative objects), and subsequently, for the validation of the functional
requirements (i.e. blueprint of white-box test).
 Use case driven approach provides an traceable links for project tracking in which the key development
activities such as the use cases implemented, tested, and delivered fulfilling the goals and objectives from
the user point of views.

How to Draw a Use Case Diagram?


A Use Case model can be developed by following the steps below.
1. Identify the Actors (role of users) of the system.
2. For each category of users, identify all roles played by the users relevant to the system.
3. Identify what are the users required the system to be performed to achieve these goals.
4. Create use cases for every goal.
5. Structure the use cases.
6. Prioritize, review, estimate and validate the users.

Example:

Explain the different features of UML.


UML is a standard language for specifying, visualizing, constructing, and documenting the artifacts of
software systems.

UML was created by the Object Management Group (OMG) and UML 1.0 specification draft was
proposed to the OMG in January 1997.

 UML stands for Unified Modeling Language.


 UML is different from the other common programming languages such as C++, Java, COBOL,
etc.

 UML is a pictorial language used to make software blueprints.

 UML can be described as a general purpose visual modeling language to visualize, specify,
construct, and document software system.

 Although UML is generally used to model software systems, it is not limited within this
boundary. It is also used to model non-software systems as well. For example, the process flow
in a manufacturing unit, etc.

 UML is not a programming language but tools can be used to generate code in various languages
using UML diagrams. UML has a direct relation with object oriented analysis and design. After
some standardization, UML has become an OMG standard.

Standard;
UML is the current standard for programming in object-oriented programming languages. When creating
classes and other objects with relationships between each other, UML is what is used to visually describe
these relationships. Because it is used as a standard, it is widely understood and well known. This makes
it easy for a new programmer to step into a project and be productive from day one.

Planning Tool;
UML helps to plan a program before the programming takes place. In some tools used to model UML, the
tool will generate code based on the classes set up in the model. This can help reduce overhead during the
implementation stage of any program. Additionally, a UML model diagram is easy to change, whereas
reprogramming a section of code can be tedious and time-consuming.

Visual Representation;
A UML diagram is a visual representation of the relationships between classes and entities in a computer
program. A class is an object in programming that organizes similar variables and functions in one
location. To understand a program, it is essential to understand what each class object does, the
information it stores and how it relates to other classes in the program. By showing this information in a
diagram, it is easy to understand and visualize a program's relationships.

Readability and Re-usability;


A UML diagram is beneficial in that it is very readable. The diagram is meant to be understood by any
type of programmer and helps to explain relationships in a program in a straightforward manner.
Traditionally, to understand a program, a programmer would read the code directly. This could be
thousands or millions of lines of code in very large programs. Having a UML diagram helps to quickly
illustrate those relationships. Additionally, by using a diagram to show the code running in a program, a
programmer is able to see redundant code and reuse portions of code that already exist rather than rewrite
those functions.

Vous aimerez peut-être aussi