IT2020 - Software Engineering
IT2020 - Software Engineering
IT2020 - Software Engineering
..~1I ..':,"":
- -1'1.S3 ••
••••••'; ~,
N
~
!-.:,. J, ~ •
••••••
;,1II •••• r:
Final Examination
Year 2, Semester 2 (2019)
Duration: 3 Hours
October 2019
Instructions to Candidates:
Question 1 20 Marks
a. Draw a sequence diagram for the following use case scenario "Add Items to Shopping Cart".
(20 marks)
Hint: You may use two boundary, two control and three entity classes in your a swer.
Question 2 20 Marks
Given below is a detailed description of an online student registration. ystem for an academic
institute. Model a physical diagram according to the given description. (20 marks)
The system consists of Web server, Application server, Registration server and Student server.
The Web server and Application server are deployed in two Oracle x 6 server devices while
Registration server and Student server arc deployed in two Oracle SPA ~C servers. All servers
installed Oracle Solaris 10 operation system.
Page 2 of7
00074
Two Oracle x86 servers communicate with two Oracle SPARC servers over local area network.
Web server and Application server communicates with each other over TC P/IP protocol.
Question 3 20 Marks
a. How many rrurnrnum number of test cases are needed for full statement coverage of
following code segment? Calculate percentages for each test case. (8 Marks)
import java.util.Scanner;
}
}
Page 3 of7
00074
l. Draw a control flow graph for the partial code segment given bel JW. (4 marks)
ii. Calculate the minimum number of test cases required for a full branch coverage (Show the
branch coverage as a percentage for each test case). (8 marks)
class Number {
public static void main(String[] args) {
Page 4 of7
00074
Question 4 20 Marks
a. Consider the below given scenario of registering a new member i 1 a web site.
Hint: Assume that this entire registration process requires Member jsc rvices, New_member.
Payment and Email classes.
b. Consider the below given scenario of"Cozze Cakes" cake ordering system and answer the
questions.
"Cozze Cakes" is popular for wide variety of cakes for any occasion. Ci stomers can order cakes
in different flavors such as vanilla, chocolate, Ribbon, Red velvet an Marble. Also they have
many cake filling flavors such as Chocolate cream, Butter cream, lemon, Caramel, Cream
Cheese and Strawberry. Each cake flavor and filling flavor has its own price. Customers can
order cakes with different combinations of filling flavors as they wis .
Page 5 q{7
00074
c. Consider the partial code segment given below and answer the su osequent questions.
import java.util.Map;
interface StockBroker {
void update(Map<String J Double> stockList);
}
import java.util.lterator;
import java.util.Map;
}
}
public class StockViewer implements StockBroker {
public void update(Map<String Double> stocks) {
J
}
}
public abstract class AbstractStockMarket {
}
public class StockMarket extends AbstractStockMarket {
}
public void update(String stockSymbol Double price) {
J
stockList.put(stockSymbol price);
J
notifyStockBroker(st~~ist);
}
}
public class Application {
public static void main(String[] args) {
AbstractStockMarket market = new StockMarket();
StockBroker buyer = new StockBuyer();
StockBroker viewer = new StockViewer();
market.addStockBroker(buyer);
}
}
Page 6 of7
00074
Question 5 20 Marks
a. Draw a state machine diagram for the following scenario which de. cribes the operation of a
Virus Guard. (16 marks)
A Virus Guard is automatically loaded when the computer starts up and is initially in the checking
state where it will do a self-scan and check if the virus definitions files re up to date. If there is
an error in the self-scan, the virus guard changes its state to the critical ·tate. In the critical state,
the virus guard repair the virus definition files. Once finished, the vi 'us guard move back to
checking state. If the virus definitions are up to date the Virus Guard changes its state to the active
state. If the virus definitions is over one month old it changes its state to the major updating state.
If the virus definitions are less than one month old, it changes its state to the minor updating state.
In both cases it downloads the updates from the virus guard website. In t te major updating state it
disallows installation of new software and restricts the access to the inte -net and networks. In the
minor updating state software installations from the web are disallowed. Once the updates are
carried out successfully, the virus guard changes its state to the active state. If a virus is found and
is a non-critical virus, then the Virus Guard changes to the Virus Alert State. Here it will clean the
viruses from the source. If a virus which is of high risk or if an unknown lirus is detected the virus
guard moves into the critical virus alert state. In this state the network connections and all pen
drives are disabled. The details of the virus are sent to the virus guard vebsite through a secure
tunnel. Once the virus is removed the system it would move to the active state.
b. Explain the difference between distributed version control and certralized version control.
(2 marks)
Page 70/7