KEMBAR78
Software Final | PDF | Use Case | Software Testing
0% found this document useful (0 votes)
4 views17 pages

Software Final

Uploaded by

Dark Crystal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views17 pages

Software Final

Uploaded by

Dark Crystal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

PART II: For all the following questions, choose the most correct answer.

Question 1
Description contents include:
 a) Use case name and Use case ID
 b) Stakeholder, precondition, and postcondition
 c) Actors
 d) All the mentioned

Question 2
"Consider a system where a heat sensor detects an intrusion and alerts
the security company." What kind of requirement is this text describing?
 a) Functional
 b) Non-functional
 c) Domain Requirement
 d) None of the above

Question 3
What is true in the context of use case extensions?
 a) The alternatives are called extensions as they extend the main flow in a
different direction from the extension point
 b) An extension use case is always executed
 c) All the mentioned
 d) None of the mentioned
Question 4
Which one of the following is not an activity of requirement engineering?
 a) Elicitation
 b) Class modelling
 c) Analysis
 d) Documentation

Question 5
Choose the incorrect statement that does not describe Non-Functional
Requirements (NFRs):
 a) NFRs focus on system (or software) quality
 b) NFRs focus on how the design process can be achieved
 c) NFRs find functional features of the system
 d) NFRs ensure the quality of services provided by the system

Question 6
Which one of the following requirements is mainly associated with a user-
friendly graphical user interface?
 a) Maintainability
 b) Portability
 c) Usability
 d) None of the above

Question 7
The followings are sub-types of non-functional requirements? Choose the
most suitable answer.
 a) Reliability
 b) Portability
 c) Usability
 d) All of the mentioned
Question 8
The following are major problems of functional requirements:
 a) Language, incompleteness, and traceability
 b) Imprecision, incompleteness, and inconsistency
 c) Incompleteness, maturity, and difficulty
 d) Inconsistency, expensiveness, granularity

Question 9
The following are valid relationships in Class Diagrams? Choose the most
correct answer:
 a) Generalizations
 b) Associations
 c) Includes
 d) a, b, and c
 e) a and b

Question 10
An operation can be described as? Choose the most correct answer:
 a) Object behaviour
 b) Class behaviour
 c) Object & Class behaviour
 d) Relationships

Question 11
Which of the following statements is true in a class state diagram?
 a) A transition is a change from one state to another
 b) Transitions may be dependent on user inputs
 c) Happens after an event that occurs at a particular time; an event has no
duration
 d) All of the above
Question 12
White box testing Tester can do the following
 a) Examine the design documents
 b) Observe at run time the steps taken by algorithms
 c) View the code
 d) View the internal data
 e) All of the mentioned

Question 13
CFG stands for
 a) Control For Graphs
 b) Control Flow Graph
 c) Call free Graph
 d) Control Fault graph
Question 14
Which model in system modeling depicts the dynamic nature of the
system?
 a) Structural Model
 b) Static Model
 c) Context Model
 d) Behavioral Model
Question 15
______ allows us to infer that different classes members have some
common characteristics.
 a) Realization
 b) Aggregation
 c) Generalization
 d) Dependency
Question 16
What is multiplicity for an association between a class A and a class B?
 a) The multiplicity at class B side of an association is the number of
instances of B that can be associated with a single instance of the
class A.
 b) The multiplicity at class B side of an association is the number of
instances of B that can be associated with the number of instances
of the class A specified at the side of A.
 c) All of the mentioned
 d) None of the mentioned

Question 17
Which among these rules is to be considered for Class diagrams?
 a) Class symbols must have at least a name compartment.
 b) Compartment can be in a random order.
 c) Attributes and operations can be listed at any suitable place.
 d) None of the mentioned

Question 18
Integration testing should be:
 a) Done by component developers
 b) Done by an independent testing team
 c) Done before component testing
 d) All of the above
Question 19
A Class can be defined as follows:
 a) A template or a blueprint of a group of objects.
 b) A set of the objects.
 c) A set of objects changing same attributes and operations.
 d) All of the mentioned

Question 20
Which of the following is one of the most important stakeholders from the
following?
 a) Module level specifications
 b) Interface level specifications
 c) Managers
 d) Users of the software

Question 21
Characterization in use case diagrams can be between:
 a) An Actor and a use-case
 b) Actors
 c) Use-cases
 d) a and c
 e) b and c
Question 22
What is an object?
 a) An object is an instance of a class
 b) An object includes only data
 c) An object is an instance of another object
 d) All of the mentioned
Question 23
Regression testing is performed mainly:
 a) To make sure that the system is progressing
 b) To test the old capabilities of the system
 c) To test the new capabilities of the system
 d) None of the mentioned

Question 24
______ is a white-box testing technique.
 a) Equivalence Partitioning
 b) Path based Testing
 c) Boundary Value Analysis
 d) None of the above

Question 25
In Black-box testing, the tester cannot see:
 a) The code
 b) The internal data
 c) The design documents
 d) All of the above

Question 26
Equivalence Partitioning comes under which type of testing?
 a) White box Testing
 b) Black box Testing
 c) Grey box Testing
 d) All of the above
Question 27
______ of UML represents interaction modeling.
 a) Sequence diagrams
 b) State diagrams
 c) Object diagrams
 d) All of the above diagrams

Question 28
Consider the following statement: "The database will contain a small
number of records." What characteristic of NFR is being depicted here?
 a) Non-verifiable
 b) Ambiguous
 c) Correct
 d) Inconsistent

Question 29
Select what is true about Sequence diagrams.
 a) Shows the structure of the system
 b) Describes a class state
 c) Shows message exchange
 d) All of the mentioned
Question 30
What is not true for a sequence diagram?
 a) A dynamic diagram
 b) Describes class attributes
 c) Describes interaction between objects
 d) Describes how an operation is carried out

Question 31
White-box testing is also known as:
 a) Structural Testing
 b) Behavioral Testing
 c) Functional Testing
 d) None of the mentioned
Question 32
A class does not include the following compartment:
 a) Name Compartment
 b) Attribute Compartment
 c) Relation Compartment
 d) None of the mentioned

Question 33
A Class state diagram:
 a) Is a static diagram
 b) Is a state-transition diagram
 c) Should be done for every class
 d) Should have at least 3 states and 3 transitions

Question 34
What is not true for a class diagram?
 a) Class diagram describes the relationships among classes
 b) It represents a static view of the design
 c) Class diagram depicts the dynamics of all the classes and
relations of the system
 d) It describes all the classes

Question 35
White-box testing is based on modeling the program to test as a:
 a) Class diagram
 b) Graph
 c) Formula
 d) None of the above
Question 36
The frequency of failures measures the ______:
 a) Reliability
 b) Error rate
 c) Correctness
 d) Stability

Question 37
What among the following statements is more correct about associations?
 a) Associations may also correspond to the relation between
instances of classes
 b) Association lines may be unlabeled or they may show association
name
 c) a & b
 d) None of the mentioned
Question 1: Develop a class diagram that captures the following
A company consists of departments and employees. A department has
responsibility for zero, one or more projects. A company has name, address, and
telephone. A department has a name, and a location. An employee has a name, an
address, a social security number (SSN) and is participating in at least one project
during his career in the company. A project has a name, starting date, ending date,
and at least 3 employees working on it. When being created, a project can have no
employees from a short period of time.
Draw the class diagram Let the class diagram show: classes with attributes,
relationships (with role-names) between the classes, and multiplicity for the
relationships.
Question 2: Modified class diagram: [5.5 pts]
The class diagram derived from the description in Question 1 is used to
implement a system that manages projects in a company. Each project has
a manager. A manager is a senior employee with a Number of Working
(NWYear) greater than 5 and he has participated in similar projects to the
project he manages. An employee can have many participations of
different durations in different Projects. A main function/operation of this
system is to know all the employees participating in a given project as
well as their participations. (getListEmp()). Modify the class diagram in
order to consider these new details, in particular add (getListEmp()) to the
appropriate and any other needed Class in the new class diagram.
Question 3: [3 pts]:
Draw the sequence diagram for the operation getListEmp(). This operation will
retrieve and print the details of each employee involved in a given project. It
retrieves for each employee information about his last participation in a project.
(Hint: getListEmp() will call other operations from different objects.)

Part II: Testing Questions


Question 1 [5 pts]
Draw the CFG for the following program.
public int factorial (int n){
int result = 1;
if (n<0)
result=0;
else
for (i=0; i<=n; i++) {
if (i>2) {
result = result * i;
}
}
return result;
}
Question 3: [13 pts]
Using the black-box testing and in particular the equivalence partitioning method,
we want to derive test cases for a program P that verifies the validity of a birthday
of a CIT student (day, month, year) given as input.

The output of this program shall be one of the two following messages: "VALID" or
"NOT VALID".
A date is valid if the day, the month, and the year are valid.
 A valid day would be >=1 and <=30, and sometimes 31.
 A valid month would be >=1 and <=12.
 A valid year would be >=2000 and <=2024.
a) What are the equivalence classes of each input of the program P? [5 pts]

----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------

b) How many test cases do we need to test this program with both strong
equivalence-partitioning test? And with weak equivalence partitioning? [2 pts]

For Weak: ........................................................................

For Strong: .......................................................................


c) Fill in the following table by deriving the test cases for the weak equivalence
partitioning? [4 pts]. If needed, add or remove rows.

Day Month Year Valid/Not


valid

d) Now, if we consider that February (month=2) can be only 28 days, how many
test cases do we need to test this program, For the Strong and for the weak
equivalence partitioning [2pts].

For Weak: ........................................................................

For Strong: ........................................................................

You might also like