Software Engineering - Sample Paper

Q-1) Answer the following questions:
(a) What are the different activities in the design framework of any software system
development process?
(b) Differentiate process metrics and product metrics and give one example for each
metric in real software development environment?
(c) Discuss methods of Cyclomatic complexity of code-segment?
(d) How do you describe Use Case in object oriented analysis of software system?
Specify the standard template format of it?
(e) List out all Key Process Area in CMM Level 2?
(f) What is the structure of change request form during change control process?
(g) How much source code of software can be delivered in 3 years 6 months in an
industry whose technology factor is 3200 if a total of 25PY is permitted for
development effort?
Q-2) Describe software paradigm which incorporates the analysis of risk during
development process with complete and neat diagram?
Q-3) Explain in detail any three requirements elicitation techniques?
Q-4) Discuss in brief about Object Oriented Analysis and Design?
Q-5) Discuss in brief about Risk Management in a software development process?
Q-6) What do you understand by token count? Consider a program having
- Number of distinct operator: 12
- Number of operands: 5
- Total number of operator occurrences: 20
- Total number of operand occurrences: 15
Calculate different Halstead software metrics for above programs.
Q 7) Discuss in detail the various methods to compute Cyclomatic complexity?
Solution
Ans. 1-a) The System Development Life Cycle framework provides a sequence of activities
for system designers and developers to follow. It consists a set of steps or phases in
which each phase of the SDLC uses the results of the previous one.
These activities are:
System analysis, requirements definition: defines project goals into defined
functions and operation of the intended application.
Systems design: describes desired features and operations in detail, including screen
layouts, business rules, process diagrams, pseudo-code and other documentation.
Development: The real code is written here.
Integration and Testing: brings all the pieces together into a special testing
environment, then check for errors, bugs and interoperability.
Acceptance, installation, deployment: The final stage of initial development, where
the software is put into production and runs actual business.
Maintenance: What happens during the rest of the software’s life, i.e., changes,
correction, additions, moves to a different computing platform and more. This is often
the longest of the stages.
Ans. 1-b) In software project management we are primarily concerned with productivity and
software quality metrics.
PROCESS METRICS: are used to provide indicators that lead to long term process
improvement.
i)
Private process metrics are only known to by individual or team concerned.
ii)
Public process metrics enable organization to make strategic changes to
improve the software process.
iii)
Metrics should not be used to evaluate the performance of the individual.
iv)
Statistical software process improvement helps the organization to discover
where they are strong and where they are weak.
PROJECT METRICS enable project manager to
i)
Access status of ongoing project.
ii)
Track the potential risks.
iii)
Uncover problem before they go critical.
iv)
Adjust work flow of tasks.
v)
Evaluate the project’s team ability to control quality of software work
products.
Ans. 1-c) Cyclomatic complexity is software metric. It is used to indicate the complexity of
a program. It is a quantitative measure of logical strength of the program. It directly
measures the number of linearly independent paths through a program's source
code. Cyclomatic complexity is computed using the control flow graph of the
program: the nodes of the graph correspond to indivisible groups of commands of a
program, and a directed edge connects two nodes if the second command might be
executed immediately after the first command. Cyclomatic complexity may also be
applied to individual functions, modules, methods or classes within a program.
Ans. 1-d) A use-case is a functionality that user needs from the system. Use case diagrams
are considered for high level requirement analysis of a system. So when the
requirements of a system are analyzed the functionalities are captured in use cases.
A use case diagram contains four components.
The boundary, which defines the system of interest in relation to the world around it.
The actors, usually individuals involved with the system defined according to their
roles.
The use cases, which the specific roles are played by the actors within and around the
system.
The relationships between and among the actors and the use cases.
Templates for USE CASE
Ans. 1-e) Maturity Level 2 - Managed
CM - Configuration Management
MA - Measurement and Analysis
PMC - Project Monitoring and Control
PP - Project planning
PPQA - Process and Product Quality Assurance
REQM - Requirements Management
SAM - Supplier Agreement Management
Ans. 1-f) Structure of change request form during change control process is as follows:
CHANGE REQUEST FORM
Project ID:
Change Requester with date:
Requested change with date:
Change analyzer:
Components affected:
Associated components:
Estimated change costs:
Change priority:
Change assessment:
Change implementation:
Date submitted to CCA:
Date of CCA decision:
CCA decision:
Change implementer:
Date submitted to QA:
Date of implementation:
Date submitted to CM:
QA decision:
Ans. 1-g) td = 3.5 years
kd = 25 PY
K = 25 * 6 = 150 PY
C = 3200
S = CK1/3 td 4/3
= 3200 * 5.313 * (3.5)
4/3
LOC
Ans 2) Each loop of the spiral from x-axis clockwise through 360 degree represents one
phase.one phase is split roughly into four sectors of major activities.
Planning: Determination of objectives, alternatives and constraints.
Risk analysis: Analyze alternatives and attempts to identify and resolve the risks
involved.
Development: Product development and testing product.
Assessment: Customer evaluation.
During the first phase, planning is performed, risks are analyzed, prototypes are built,
and customer evaluate the prototype. During the second phase, a more refined
prototype is built, requirements are documented and validated and customer are
involved in accessing the new prototypes. By the time third phase begins, risk are
known, and a somewhat more traditional development approach is taken.
Advantages over traditional iterative process models:
The risk analysis and validation steps eliminate errors in the early phases of
development.
The model makes use of techniques like reuse, prototyping and component based
design.
This model is not suitable for small projects as cost of risk analysis, may exceed
actual cost of project.
It becomes equivalent to another life cycle model in appropriate situations.
Fig. SPIRAL MODEL
Ans 3) Brainstorming Sessions: It is a technique used to generate new ideas and find the
solutions to a specific issue. This is conducted as a conference with six to ten
members. The members are from different departments and domain experts are also
included. This conference is headed by the organizer who states the issue to be
discussed .This conference is generally held in a round table fashion. Every member
person is allotted with certain time interval to explain their ideas. Notepads are
provided are provided to all members to write their ideas and suggestions. The team
of brainstorming will then decide the best idea by voting from the group and that idea
is selected as the solution to the issue discussed in the conference.
Facilitated Application Specification Technique: The objective is to close the gap
between what the developers intend and what users expect.
Meetings are conducted at a neutral site attended by both developers and users.
The group establishes rules for preparation and participation.
An agenda is suggested that with enough formality to cover all important points
but informal enough to encourage the free flow of ideas.
A facilitator controls the meeting.
A definition mechanism is used.
The main goal is to identify the problem, propose solutions, negotiate different
approaches, and specify a preliminary set of software requirements in an atmosphere
that is conductive to accomplish the goal.
Quality Function Deployment is a structured approach to defining customer needs or
requirements and translating them into specific plans to produce products to meet
those needs. The "voice of the customer" is the term to describe these stated and
unstated customer needs or requirements. The voice of the customer is captured in a
variety of ways: direct discussion or interviews, surveys, focus groups, customer
specifications, observation, warranty data, field, reports, etc. This understanding of
the customer needs is then summarized in a product planning matrix or "house of
quality". These matrices are used to translate higher level "what's" or needs into lower
level "how's" - product requirements or technical characteristics to satisfy these needs.
Ans. 4) Object Oriented Design- It begins with an examination of the real world things that
are part of the problem. These things (which will call objects) are characterized
individually in terms of their attributes and behavior. Each object maintains its own
state, offers a set of services to other objects.
Object-oriented System Design Process:
Partition the analysis model into subsystems.
Subsystems should have well defined communication interfaces.
With few exceptions classes should collaborate within their subsystem.
Keep number of subsystems small.
Partition subsystem internally to reduce complexity.
Identify concurrency detailed by the problem.
Allocate subsystems to processors and tasks.
Allocate each subsystem to an independent processor.
Allocate subsystems to same processor and provide concurrency support through
operating system features.
Develop user interface design.
Choose basic strategy for implementing data management.
Management of data critical to the application itself.
Creation of infrastructure for storage and retrieval of objects.
Identify global resources and control mechanisms to access them.
Design control mechanism for system (including task management).
Consider how subsystem boundary conditions should be handled.
List each request (contracts that can be made by subsystem collaborators).
For each contract note the operations required to implement the responsibilities
implied by the contract.
For each contract create a table with these entries: type, collaborators, classes,
operation and message format.
If subsystem interaction modes are complex create a subsystem collaboration
diagram.
Review and consider trade-offs.
Ans 5) Importance Of Risk Management: A risk is any anticipated unfavorable event or
circumstance that can occur while project is underway. If a risk becomes true, the
anticipated problem becomes a reality and is no more a risk. If a risk becomes real, it
can adversely affect the project and hamper the successful and timely completion of
the project. Therefore, it is necessary for the project manager to anticipate and
identify different risks that a project is susceptible to, so that contingency plans can be
prepared to contain each risk. In this content, Risk Management aims at reducing the
impact of all kinds of risks that might affect a project.
There are three main categories of risks which can affect a software project as
follows:
Project Risk
Technical Risk
Business Risk
In order to be able to successfully identify different risks that might affect a
software project, it is a good idea to have a company disaster list. This list would
contain all the bad events that have happened to software to projects of the company
over the years including events that can be laid at the customer's doors.
Ans 6) Operands and operators of any computer language are called tokens. All software
science measures are function of the counts of these tokens.
Number of distinct operator: 12
Number of district operands: 5
Total number of operator occurrences: 20
Total number of operand occurrences: 15
Program length (N)
N = N1 + N2 = 20 + 15
N = 35
Program vocabulary
Ƞ =ƞ1+ƞ2
Ƞ = 12 + 05
Ƞ = 17
Volume of Program
V = N*log2 ƞ
V = 25*log 17 = 25*4.08 = 102
Potential volume of Program (V*)
V* = (2 + ƞ 2*) log2(2 + ƞ 2*)
= (2 + 12) log(2 + 12)
= 14 log 14 = 14 x 3.80 = 53.2
Program Level (L)
L = V*/V = 53.2/102 = 0.54
Ans 7) There are three different ways to compute the Cyclomatic complexity.
Method 1:
Given a control flow graph G of a program, the Cyclomatic complexity V(G) can be
computed as:
V(G) = E – N + 2
where N is the number of nodes of the control flow graph and E is the number of
edges in the control flow graph. For the CFG of example shown in fig. 10.4, E=7 and
N=6. Therefore, the Cyclomatic complexity = 7-6+2 = 3.
Method 2:
An alternative way of computing the Cyclomatic complexity of a program from an
inspection of its control flow graph is as follows:
V(G) = Total number of bounded areas + 1
In the program’s control flow graph G, any region enclosed by nodes and edges can
be called as a bounded area. This is an easy way to determine the McCabe’s
Cyclomatic complexity. But, what if the graph G is not planar, i.e. however you draw
the graph, two or more edges intersect? Actually, it can be shown that structured
programs always yield planar graphs. But, presence of GOTO’s can easily add
intersecting edges. Therefore, for non-structured programs, this way of computing the
McCabe’s Cyclomatic complexity cannot be used. The number of bounded areas
increases with the number of decision paths and loops. Therefore, the McCabe’s
metric provides a quantitative measure of testing difficulty and the ultimate reliability.
This method provides a very easy way of computing the Cyclomatic complexity of
CFGs, just from a visual examination of the CFG. On the other hand, the other
method of computing CFGs is more amenable to automation, i.e. it can be easily
coded into a program which can be used to determine the Cyclomatic complexities of
arbitrary CFGs.
Method 3:
The Cyclomatic complexity of a program can also be easily computed by computing
the number of decision statements of the program. If N is the number of decision
statement of a program, then the McCabe’s metric is equal to N+1.