Software Engineering Question Answers
Software Engineering Question Answers
Software Engineering Question Answers
1.Compute the Fog index of this question. What does the Fog index
signify? How is the Fog index useful in producing good software
documentation?
The fog index refers to a readability test that aims to determine the level of text difficulty, or how
easy a text is to read. The index provides a reader with the number of years of education that he or
she hypothetically needs to understand and digest a particular text on the first reading.
To calculate a fog index score, we need to know the three following components:
To calculate the average sentence length, we need to divide the number of words by the
number of sentences in a text sample.
To find the percentage of long words, we divide the number of long words by the total
number of words and multiply the result by 100. A long word is defined as a word with at
least three syllables.
Finally, the sum between the average sentence length and the percentage of long words is
computed to arrive at the fog index.
There are a few exceptions to what is defined as a long word. Here is a list of the exceptions
for long words:
The fog index refers to a readability test that aims to determine the level of text difficulty, or how
easy a text is to read. The index provides a reader with the number of years of education that he or
she hypothetically needs to understand and digest a particular text on the first reading.
In equivalence partitioning, equivalence classes are evaluated for given input conditions. Whenever
any input is given, then type of input condition is checked, then for this input conditions,
Equivalence class represents or describes set of valid or invalid states.
Test cases for Date Picker box
1. Check the calendar component is active when the date boxes are clicked.
2. Check if the calendar component loads properly after click on any date box.
3. Check if the calendar control is by default shows the date, month, year as per the
system date.
4. Check if the calendar control is as per dd/mm/yy or mm/dd/yy format.
5. Check if the calendar component allows 10 years forward and backward to select the
dates.
6. Check if the calendar component allows to scroll month field forward and backward.
7. Check if the today’s date is highlighted or not for default selection of the date box.
8. Check if the prev and next links are navigable in the date picker control.
9. Click on the date field select the date and verify if the correct date is shown in the
box.
10. Click on the date field select the date and verify if the date shown is in mm/dd/yy
format.
11. Click on the date field and check if the right month and year for date picker is shown.
You can see the screenshot below to see how the editable date field box works.
1. Check if the form accepts the valid month, date, year in mm/dd/yy format.
2. Check if the form accepts the month, year, date in dd/mm/yy format.
3. Check if the wrong month, year and date format is accepted. in yy/dd/mm
4. Check if the field accepts the input in more than 2 digits.
5. Check if the field accepts the input as blank.
6. Check if the field accepts any other symbol than backward or forward slash.
7. Check if the field accepts special character instead of the dates.
8. Check if the field accepts invalid order of the date.
9. Check if the field accepts hypen instead of backward or forward slash.
10. Check if the field accepts more than 4 digits for the year.
11. Check if the field accepts zero in all fields of the box.
12. Check if the field accepts blank field for one of the part of the date format.
13. Check the format of the date accepted and verify if it is according to the specification.
14. Check if the field accepts alphabets in the date format.
15. Check if the date as 32 is accepted or not.
16. Check if the month field accepts 13 or higher number or flags errors.
17. Check if the year is accepted in 3 digits or 2 digits.
18. Check if the year field accepts year entered 10 years backward or forward.
19. Check if the February 30 or 31 is accepted in the date format.
20. Check if the decimal point is accepted instead of hyphen or slashes (- or /).
21. Check if the blank spaces are accepted in the date format fields.
22. Check the blank space in the random sequence in the correct date format and see if the
input is accepted.
Example-1:
Let us consider an example of any college admission process. There is a college that gives
admissions to students based upon their percentage.
Consider percentage field that will accept percentage only between 50 to 90 %, more and
even less than not be accepted, and application will redirect user to an error page. If
percentage entered by user is less than 50 %or more than 90 %, that equivalence partitioning
method will show an invalid percentage. If percentage entered is between 50 to 90 %, then
equivalence partitioning method will show valid percentage.
Example 2:
Let us consider an example of an online shopping site. In this site, each of products has a
specific product ID and product name. We can search for product either by using name of
product or by product ID. Here, we consider search field that accepts only valid product ID or
product name.
Let us consider a set of products with product IDs and users wants to search for Mobiles.
Below is a table of some products with their product Id.
Product Product ID
Mobiles 45
Laptops 54
Pen Drives 67
Keyboard 76
Headphones 34
If the product ID entered by user is invalid then application will redirect customer or user to
error page. If product ID entered by user is valid i.e. 45 for mobile, then equivalence
partitioning method will show a valid product ID.
Example-3 :
Let us consider an example of software application. There is function of software application
that accepts only particular number of digits, not even greater or less than that particular
number.
Consider an OTP number that contains only 6 digit number, greater and even less than six
digits will not be accepted, and the application will redirect customer or user to error page. If
password entered by user is less or more than six characters, that equivalence partitioning
method will show an invalid OTP. If password entered is exactly six characters, then
equivalence partitioning method will show valid OTP.
4. What do you mean by testing terminologies- Error,
Bug, Test case, Test suit. Give examples.
Error: Error is a situation that happens when the Development team or the developer fails to
understand a requirement definition and hence that misunderstanding gets translated to buggy
code. This situation is referred to as an Error and is mainly a term coined by the developers.
Bug: A bug refers to defects which means that the software product or the application is not working
as per the adhered requirements set. When we have any type of logical error, it causes our code to
break, which results in a bug. It is now that the Automation/ Manual Test Engineers describe this
situation as a bug. A bug once detected can be reproduced with the help of standard bug reporting
templates.
Test case: A Test Case is a set of actions executed to verify a particular feature or functionality of
your software application. A Test Case contains test steps, test data, precondition, postcondition
developed for specific test scenario to verify any requirement. The test case includes specific
variables or conditions, using which a testing engineer can compare expected and actual results to
determine whether a software product is functioning as per the requirements of the customer.
Test Suite:Test suite is a container that has a set of tests which helps testers in executing and
reporting the test execution status. It can take any of the three states namely Active,
InProgress and completed.
A Test case can be added to multiple test suites and test plans. After creating a test plan, test
suites are created which in turn can have any number of tests.Test suites are created based on
the cycle or based on the scope. It can contain any type of tests, viz - functional or Non-
Functional.
• Defect: A defect refers to the situation when the application is not working as per the
requirement and the actual and expected result of the application or software are not in sync
with each other.
• Fault: Sometimes due to certain factors such as Lack of resources or not following proper
steps Fault occurs in software which means that the logic was not incorporated to handle the
errors in the application. This is an undesirable situation, but it mainly happens due to invalid
documented steps or a lack of data definitions.
• Failure: Failure is the accumulation of several defects that ultimately lead to Software
failure and results in the loss of information in critical modules thereby making the system
unresponsive. Generally, such situations happen very rarely because before releasing a
product all possible scenarios and test cases for the code are simulated. Failure is detected by
end-users once they face a particular issue in the software.
It is cheaper to make changes when design is on the paper rather than at time of conversion.
Walkthrough is a static method of quality assurance. Walkthrough are informal meetings but
with purpose.
2. Inspection :
An inspection is defined as formal, rigorous, in depth group review designed to identify
problems as close to their point of origin as possible. Inspections improve reliability,
availability, and maintainability of software product.
Anything readable that is produced during the software development can be inspected.
Inspections can be combined with structured, systematic testing to provide a powerful tool for
creating defect-free programs.
Inspection activity follows a specified process and participants play well-defined roles.
An inspection team consists of three to eight members who plays roles of moderator, author,
reader, recorder and inspector.
For example, designer can acts as inspector during code inspections while a quality
assurance representative can act as standard enforcer.
Defect in a software product represents the inability and inefficiency of the software to meet
the specified requirements and criteria and subsequently prevent the software application to
perform the expected and desired working.
Types of Defects:
Following are some of the basic types of defects in the software development:
1. Arithmetic Defects:
It include the defects made by the developer in some arithmetic expression or mistake in
finding solution of such arithmetic expression. This type of defects are basically made by
the programmer due to access work or less knowledge. Code congestion may also lead to
the arithmetic defects as programmer is unable to properly watch the written code.
2. Logical Defects:
Logical defects are mistakes done regarding the implementation of the code. When the
programmer doesn’t understand the problem clearly or thinks in a wrong way then such
types of defects happen. Also while implementing the code if the programmer doesn’t
take care of the corner cases then logical defects happen. It is basically related to the core
of the software.
3. Syntax Defects:
Syntax defects means mistake in the writing style of the code. It also focuses on the small
mistake made by developer while writing the code. Often the developers do the syntax
defects as there might be some small symbols escaped. For example, while writing a code
in C++ there is possibility that a semicolon(;) is escaped.
4. Multithreading Defects:
Multithreading means running or executing the multiple tasks at the same time. Hence in
multithreading process there is possibility of the complex debugging. In multithreading
processes sometimes there is condition of the deadlock and the starvation is created that
may lead to system’s failure.
5. Interface Defects:
Interface defects means the defects in the interaction of the software and the users. The
system may suffer different kinds of the interface testing in the forms of the complicated
interface, unclear interface or the platform based interface.
6. Performance Defects:
Performance defects are the defects when the system or the software application is unable
to meet the desired and the expected results. When the system or the software application
doesn’t fulfill the users’s requirements then that is the performance defects. It also
includes the response of the system with the varying load on the system.
Derive DFD and Data dictionary for the following problem:
A software system called RMS calculating software would read
three integral numbers from
the user in the range of –1000 and +1000 and would determine
the root mean square (RMS) of the three input numbers and
display it.
LVL 2 DFD
Difference between Function Oriented Design and Object-Oriented
Design
1. Function Oriented Design :
Function oriented design is the result of focusing attention to the function of the program.
This is based on the stepwise refinement. Stepwise refinement is based on the iterative
procedural decomposition. Stepwise refinement is a top-down strategy where a program is
refined as a hierarchy of increasing levels of details.
We start with a high level description of what the program does. Then, in each step, we take
one part of our high level description and refine it. Refinement is actually a process of
elaboration. The process should proceed from a highly conceptual model to lower level
details. The refinement of each module is done until we reach the statement level of our
programming language.
Objects are independent entities that may readily be changed because all state and
representation information is held within the object itself. Object may be distributed and may
execute sequentially or in parallel. Object oriented technology contains following three
keywords –
1. Objects –
Software package are designed and developed to correspond with real world entities
that contain all the data and services to function as their associated entities messages.
2. Communication –
Communication mechanisms are established that provide the means by which object
work together.
3. Methods –
Methods are services that objects perform to satisfy the functional requirements of the
problem domain. Objects request services of the other objects through messages.
The basic definition of student entity and attribute: student user (student number, name,
gender, class, list of borrowed books, number of borrowed books, contact number, password).
The basic definition of book entity and attribute: books (book number, book name, author,
unit price, the number of user’s borrowed books, the borrower’s number, the total number,
whether to lend).
Reasons Following are The below The reasons for The reasons Following
behind reasons which reason leads having an error behind the fault are some of
may cause the to the are as follows: are as follows: the most
bugs: defects: Errors in the A Fault may important
Missing coding Giving code. occur by an reasons
Wrong coding incorrect and The Mistake of improper step in behind the
Extra coding wrong inputs. some values. the initial stage, failure:
Dilemmas If a developer is process, or data Environmen
and errors in unable to definition. tal
the outside compile or run Inconsistency or condition
behavior and a program issue in the System
inside successfully. program. usage
structure and Confusions and An irregularity or Users
design. issues in loophole in the Human
An error in programming. software that error
coding or Invalid login, leads the
logic affects loop, and software to
the software syntax. perform
and causes it Inconsistency improperly.
to between actual
breakdown and expected
or the failure. outcomes.
Blunders in
design or
requirement
actions.
Misperception
in
understanding
the
requirements
of the
application.
Way to Following are With the help Below are ways
prevent the way to stop of the to prevent the
the the bugs: following, we Errors:
reasons Test-driven can prevent Enhance the
development. the Defects: software
Offer Implementin quality with
programming g several system review
language innovative and
support. programming programming.
Adjusting, methods. Detect the
advanced, and Use of issues and
operative primary and prepare a
development correct suitable
procedures. software mitigation plan.
Evaluating the development Validate the
code techniques. fixes and verify
systematically. Peer review their quality
It is executing and precision.
consistent
code reviews
to evaluate
its quality
and
correctness.
1. Integration Testing
The objective is to take unit-tested components and build a program structure that has been
dictated by design. Integration testing is testing in which a group of components is combined
to produce output.
Integration testing is of four types: (i) Top-down (ii) Bottom-up (iii) Sandwich (iv) Big-Bang
Example:
2. System Testing
This software is tested such that it works fine for the different operating systems. It is covered
under the black box testing technique. In this, we just focus on the required input and output
without focusing on internal working.
In this, we have security testing, recovery testing, stress testing, and performance testing
Example:
This testing is a combination of various testing techniques that help to verify and validate
object-oriented software. This testing is done in the following manner:
• Testing of Requirements,
• Design and Analysis of Testing,
• Testing of Code,
• Integration testing,
• System testing,
• User Testing.
• It is inherently unreliable.
10. Device a Top down Integration plan for a large scale
application of Payroll System.
It highlights the error handling and robustness under a heavy load instead of correct
behavior under regular conditions.
In other words, we can say that Stress testing is used to verify the constancy and
dependability of the system and also make sure that the system would not crash under
disaster circumstances.
To analyses how the system works under extreme conditions, we perform stress testing
outside the normal load.
Stress testing is typically only used to test business-critical systems and applications in
order to find ways to improve their endurance or create failsafes, rather than to
establish any sort of performance baseline or find specific defects.
What - Regression testing is a black box testing technique, used to authenticate a code
change in the software, does not impact the existing functionality of the product. Regression
testing is making sure that the product works fine with new functionality, bug fixes, or any
change in the existing feature.
When - Regression testing is performed to find out whether the updates or changes had
caused new defects in the existing functions. This step would ensure the unification of the
software.
Why - Regression testing is also crucial in providing additional test executions to ensure
the viability of changes made to program codes.
How - Best Practices in Identifying Test Cases for Regression Suite according to
priority:
• a selected test-case suit will execute rather than an entire test-case suit.
• The selected test case suits divided in two cases
• Reusable Test cases. - can use in succeeding regression cycle.
• Obsolete Test cases. - can't use in succeeding regression cycle.
Prioritize the test case depending on business impact, critical and frequently functionality
used. Selection of test cases will reduce the regression test suite.
15. Design the black-box test suite for a function named quadraticsolver.
The quadratic-solver function accepts three floating point numbers (a, b, c)
representing a quadratic equation of the form ax2 + bx + c = 0. It computes
and displays the solution
16. Suppose as the president of a company, you have the choice to either go
for ISO 9000 based quality model or SEI CMM based model, which one
would you prefer? Give the reasoning behind your choice.
• Process Performance
• People performance.
Prof. Shoji Shiba speaks of companies travelling through three stages in Quality journey.
Initiation alignment and Self navigation.
If I find that my product quality is not comparable to my competitors (in select segments)
and the in house rejections are more than 200 PPM in case you are in manufacturing (
cost of poor quality around 20%) , then I would go for ISO 9001.
If I find I am a benchmark company with relatively excellent quality but have problems
with sustaining the process performance indicators, I will go for SEI CMM or better still a
beautiful standard called ISO 9004.
The ISO-9000 quality standard and total quality management (TQM) are both necessary for any
organization to become world class. ISO-9000 is total quality management. It requires management
of every process in an organization that impacts quality. While ISO-9000 is a clearly defined system,
TQM is a philosophy.
ISO-9000 addresses each of these areas to ensure that management has a plan in place to
prevent quality problems.
TQM is aimed at identifying the causes of quality problems and eliminating them. The theory
is that by involving everyone in solving quality problems, eventually all problems will be
eliminated and the company's quality will continue to get better and better.
18. What do you understand by key process area (KPA), in the context of SEI
CMM? Would there be any problem if an organisation tries to implement
higher level SEI CMM KPAs before achieving lower level KPAs? Justify your
answer using suitable examples
Ans Key Process Areas form the basis for management control of the software project and
establish a context in which technical methods are applied, work products like models,
documents, data, reports, etc. are produced, milestones are established, quality is ensured and
change is properly managed.
SEICMM:
SEI (Software Engineering Institute), Capability Maturity Model (CMM) specifies an
increasing series of levels of a software development organization.
(a). Initial
(b). Repeatable
(c). Defined
(d). Managed
(e). Optimized
7 End if
8 End If
Write down the test case for which the statement 6 will be executed.