Software Engineering 2 Paper
Software Engineering 2 Paper
Read the following statement carefully. These statements are either true or false.
Clearly indicate the true/false and Justify your answer.
The statement is true. As the UML name indicates Unified Modeling Language in
which a model of software system is represented. The module captures the static
features of software, defines the interaction among the software components and also
signify the overall framework of software.
b) Extension should not cover all other interests of stakeholders except for happy
path. [True/False]
The statement is true because the extensions in project doesn’t necessitate mean that it
will meet all the expectations of stakeholders. But the combination of both happy path
and extension can meet the interests of stakeholders. The increment in time duration
for the extension in project will also delay the plans of stakeholders for that
significant time.
c) Use case diagrams and use case relationships are the secondary steps in use case
work. [True/False]
Yes, the statement is also true because there is need to identify and specify the actors
first then the use case diagrams will be drawn and use case relationships will be
modeled among the actors and use cases. This is the reason that the actor
identification is primary task.
d) We continue writing use cases in the construction phase.
[True/False]
The statement is false because the use cases are written in elaboration phase where
there is working about analysis of functional requirements.
e) Dealing with the performance of a system is the part of a supplementary
specification. [True/False]
Data flow testing techniques use to identify the anomalies in data variable definition and
use in white box testing techniques. For following two programs do Def-Use
Associations for all variables in program respectively and identify where data anomalies
exist
Data anomalies
if (0 ≤ x && x ≤ 5)
In the above statement there is comparison between zero and variable and zero is lying at left
side in place of variable, this is not right way for implementation in the programming
languages.
Data anomalies
p = 0 – y;
variable is saving the value here but this is not right way of assignment.
Question No 3 [Marks 5]
Below is a brief program listing. Create the control flow diagram, determine its
Cyclomatic Complexity, choose a set of basis paths, and determine the necessary values
for the conditions to sensitize each path.
if (c1)
{
while (c2)
{
if (c3) { s1; s2;
if (c5) s5;
else s6;
break; // Skip to end of while
else
if (c4) { }
else { s3; s4; break;}
} // End of while
} // End of if
s7;
if (c6) s8; s9;
s10;
Cyclomatic Complexity
We can calculate the cyclomatic complexity by knowing the number of regions.
V(g) = number of regions in graph
V(g) =6
Cyclomatic complexity=6
Set of basis paths
c1 -> c2 -> c3 -> s1--s2-- c5-> s6--s7 -> c6 -> s8--s9--s10 (c1, c2, c3, c6 must be true, and c5
must be false)
c1 -> c2 -> c3 -> s1--s2-- c5-> s5--s7 -> c6 -> s8--s9--s10 (c1, c2, c3, c5, c6 must be true)
c1 -> c2 -> c3 -> s1--s2-- c5-> s6--s7 -> c6 -> s9--s10 (c1, c2, c3 must be true and c5, c6
must be false)
Determining the necessary values for the conditions to sensitize each path
c1 -> c2 -> s7 -> c6 -> s8--s9--s10
c1 -> c2 -> s7 -> c6 -> s9--s10
c4 -> c2 -> c3 -> s1--s2-- c5-> s5--s7 -> c6 -> s8--s9--s10
c4 -> c2 -> c3 -> s1--s2-- c5-> s6--s7 -> c6 -> s8--s9--s10
c4 -> c2 -> c3 -> s1--s2-- c5-> s6--s7 -> c6 -> s9--s10
c4 -> c2 -> s7 -> c6 -> s8--s9--s10
c4 -> c2 -> s7 -> c6 -> s9--s10
c4 -> s3 -> s4 -> s7 -> c6 -> s8--s9--s10
c4 -> s3 -> s4 -> s7 -> c6 -> s9--s10
Question No 4 [Marks 3]
Consider the following set of requirements for a university information system that is
used to keep track of student’s transcripts. The first requirement RS1 concerns the data
to be kept in permanent storage, which is further broken down into five parts draw the
class diagram which support all stated requirements.
RS1a. The university keeps track of each student's name, student number, social security
number, current address and phone, permanent address and phone, birthdate, sex, class
(freshman, sophomore, ..., graduate), major department, minor department (if any), and
degree program (B.A., B.S., ..., Ph.D.). Some user applications need to refer to the city, state,
and zip of the student's permanent address, and to the students' last name. Both social security
number and student number have unique values for each student.
RS1b. Each department is described by a name, department code, office number, office
phone and college. Both name and code have unique values for each department.
RS1c. Each course has a course name, description, code number, number of semester hours,
level, and offering department. The value of code number is unique for each course.
RS1d. Each section has an instructor, semester, year, course, and section number. The section
number distinguishes different sections of the same course that are taught during the same
semester/year; its values are 1, 2, 3, ...; up to the number of sections taught during each
semester.
RS1e. A grade report has a student, section, and grade.
Question No 6 [Marks 4]
Create a Use Case Diagram (in UML) for the following description of an Internet auction
system:
1. Types of users:
Anyone (Anyone may use the search features of the system and may look at an auction's
information)
Members
4. After registering, the system will create an account for the member.
2. Auctions
2. The item must include a name, a closing time, and a minimum bid.
3. A bid must be at least the minimum bid, and higher than any bid so far.
4. Ending an auction.
2. If no bids are placed before the closing time, the auction is closed
unsuccessfully and the seller notified by e-mail.
3. If at least one legal bid has been placed before the closing time, the auction is
closed successfully. The winning bidder and the seller are both mailed each
other's contact information and the winning bid.
4. The seller may cancel the auction up to 24 hours before the closing time. All
bidders on this auction will be mailed a notice of the cancellation.
Part 1:
Read the following formal use case of Auction system and convert the Buy and sell
goods by auction into sequence diagram.
Part 2:
Draw Sequence diagram for the following casual use case.
Add Calendar Appointment
The scenario begins when the user chooses to add a new appointment in the UI.
The UI notices which part of the calendar is active and pops up an Add Appointment window
for that date and time.
The user enters the necessary information about the appointment's name, location, start and
end times. The UI will prevent the user from entering an appointment that has invalid
information, such as an empty name or negative duration. The calendar records the new
appointment in the user's list of appointments. Any reminder selected by the user is added to
the list of reminders.
If the user already has an appointment at that time, the user is shown a warning message and
asked to choose an available time or replace the previous appointment. If the user enters an
appointment with the same name and duration as an existing group meeting, the calendar asks
the user whether he/she intended to join that group meeting instead. If so, the user is added to
that group meeting's list of participants.