L-3 T-1, Cse, 2010-2011
L-3 T-1, Cse, 2010-2011
...
SECTION-A
There are FOUR questions in this Section. Answer any THREE.
Contd P/2
I~
..;.
"
=2=
. CSE 307
Contd ... Q. No. l(a)
1. The System tells the Worker that the patron is not allowed to check out books and the
reason for this prohibition.
2. The use case ends.
4a. If the book that is being checked out is non-circulating;
1. The System tells the Worker why the book is non-circulating.
2. The use case continues from step 3 in the main success scenario.
Special Requirements
-There are different due dates depending on the kind of patron one is dealing with. For
example, faculty can take out books for the whole academic year, whereas students can
only take them out for a limited time.
-The System must respond to the Worker, at least giving some progress indication, within
3 seconds, 95% of the time.
-Workers are experts, because they use the system continuously, so the interface should
have minimal interaction and should minimize the physical effort involved; for example,
workers should not have to be prompted.
-Displays for the worker should be visible from one meter away.
-The system should be quiet.
Technology and Data Variations List:
3a. Barcode scanners are normally used to identify books.
3b. Books without barcodes have to be entered manually.
Frequency of Occurrence: nearly continuous.
Open Issues: How to deal with failures and recovery?
How to deal with overnight check out of reserve items.
How to deal with library books that are unknown to the circulation system.
Now draw a Collaboration and Class diagram, which should be relatively complete for
the use case given. It should include associations also.
(b) List all behavioral UML diagrams and describe the purpose of each of them. (8)
(c) Draw an Activity diagram that represents the making of a cup of tea. The initial three
activities are Fill kettle with water, Find cup and Find tea bag and they may be performed
in parallel. When the Find cup and Find tea bag are completed the activity Place tea bag
in cup can start. The kettle must have boiled and the tea bag must have been placed in the
cup before the activity Add water to cup can begin. If milk is required then activity Add
=3=
CSE 307
Contd ... Q. No. l(d)
If A then if B then X
else if C then Y else Z endIf endIf
else if C then X else Z endIf
endIf
Make sure your final table is in simplified form, i.e., does not have redundant rows or
columns.
2. (a) To buy a book electronically from chapters. com, a customer needs to select the book
from a list provided by Chapter's eCommerce system, provide credit card information to
the system, then the system gets authorization from the bank for the payment, and --if
positive -- confirms the sale. The order is then sent to the orders department and when the
book becomes available, it is shipped to the customer. Also, the order department charges
the customer's credit card by informing the bank of the amount.
Draw a Sequence diagram that models this process. Make sure to model all relevant
actors and the interactions between them. Do show explicitly the time intervals when
different actors actively participate in the process you are modeling. (12)
(b) Give a State Chart diagram that describes the lifetime of a video tape in a video
store. You can assume that a video tape is purchased, packaged properly (plastic case
with identification information on the outside), put in the video store database, and is then
put up for rental. Customer who choose to rent it, check it out and return it in 3 days. If a
customer fails to return it, the store calls him/her the next day. The call is repeated a
second time after 2 more days, and if the tape is not returned within 2 more days, the
store delegates the matter to a collection agency and removes the video tape from its
collection. If the tape is damaged on return, it is removed from the collection database
also. Finally, if the tape is missing during the annual store inventory, it is removed from
rate? (4+10)
(ii) Explain the difference between return on investment and payback period. Why
might you need to know both in order to decide which of two different development
alternatives represents a better investment for a particular organization?
Contd P/4
•
=4=
CSE 307
3. (a) The Blood Bank Testing Unit. This is one unit within the College Street Red Cross
Blood Donor Centre. On the day following a blood donation, the Blood Bank unit tests
all blood for blood type and potential viral agents. They send the results of these tests to
the Processing Office (another unit of the Centre). For each tested blood unit, they fill out
a form which lists the blood unit number, the blood type, the date and the results of the
test. If the tests indicate that the blood may be contaminated with a viral agent, the blood
Blood units have a limited shelf life. The Blood Bank receives a list every day of those
units which have exceeded their shelf life. These are discarded and the list sent back to
the Processing Office with a signed indication of the disposal of the units.
The Blood Bank also distributes blood to various hospitals requesting blood. Requests
usually come in for specific blood types. The Blood Bank prepares refrigerated
containers of these units and distributes them to the hospital vans when they arrive to
pick up their supply. The Blood Bank receives a listing for each hospital and the specific
units of blood to supply to the hospital from the Processing Office. The order is printed in
triplicate. When the order is filled, the lab technician signs the order and returns a copy to
the Processing Office. A copy of it travels with the blood to the requesting hospital. The
final copy is kept in the Blood Bank records but discarded after one year.
Draw a data flow diagram for the Blood Bank Testing Unit System.
-'
•
=5=
CSE 307
Contd ... Q. NO.3
(d) Does the following code fragment implement the Factory design pattern? Explain in
brief (5)
public class XMLReaderFactory {
/ / This method returns an instance of a class
/ / that implements the XMLReader interface.
/ / the specific class it creates and returns is
/ / based on a system property.
public static XMLReader createXMLReader ( ) ;
}
public interface XMLReader {
public void setContentHandler (ContentHandler handler) :
public void parse (InputStream is) ;
}
4. (a) Which of the following (i) and (ii) is a valid implementation of Singleton Pattern?
Give specific reason for each of the following implementation. (5)
(i)
public class Singleton {
private static Singleton s_singleton = new Singleton () ;
private Singleton () {}
private static Singleton getInstance() {
return s_singleton;
}
}
(ii)
public class Singleton {
private Singleton () {}
=6=
CSE 307
Contd ... Q. No. 4.(c)
Which design pattern is the most appropriate to handle this basic functionality of such a
Faceb09k group? Users should be able to join a group as well as leave a group if they get
bored. Once a user has joined a group it will automatically receive any updates that are
published on the wall. Give a short explanation. In particular, show a complete class
diagram(s) and enough code fragments to illustrate your use of the pattern to solve the
problem. (12)
(d) Now let's suppose that you would like to extend the functionality of Facebook group
that you have created in Question. 4(c) by adding the possibility that besides normal
users a group page can also be a member of another group. As an example it should be
possible that the group page of the "CSE BUET 08" joins the "BUETIANS" group. As a
consequence all the members of the "CSE BUET 08" group become automatically
SECTION-B
There are FOUR questions in this Section. Answer any THREE.
5. (a) What do you know about COCOMO model? Describe the basic CO COMO model
with its limitations. How CO COMO II model for cost estimation can be used at various
causes and the effects of those problems? Describe with an appropriate example. (16 %)
Contd P17
=7=
CSE 307
6. (a) Discuss about waterfall model and iterative model of software development. (3+3)
(b) What are the challenges that arise in quality management of a software development
process? Suppose your team is developing customized hospital management software.
(e) Suppose you are writing a 'Queue' class. Design some test cases to verify your code. (15)
7. (a) Discuss about professional and ethical responsibilities of a software engineer. (6%)
(b) As a part of ensuring eGovernance goal, the Government is going to computerize its
land management process that keeps records about land ownership and transfers of
ownerships. It is your responsibility to do the requirement analysis for such a project.
What fact finding techniques you may use and how? (25)
(c) Your company has previously made the very successful game BUET Premier League
2011 (BPL 2011). But new 3D technology has arrived and the introduction of Kinect
sensor requires you to upgrade the game to a newer version. Now, the overall market
condition is not good due to economic recession, and this game may be a key to success
for your company over the other game developing firms in the market. Identify the
associated risks in this project and describe how you plan to cope up with these. (15)
8. (a) What is the difference between software engineering and system engineering? (5)
(b) Suppose you are the project manager of a newly founded software firm and you are
estimating the cost of a customized VOIP software to quote in a tender process. The
market is very competitive, but you have the advantage of having some skilled persons in
your firm. What pricing factors you should consider while making that cost estimation
describing task dependencies and the expected duration of each task. (20)
Task Prerequisite Duration
A - 2
B - 3
Contd P/8
'.
."
=8=
CSE 307
Contd ... Q. No. Sed)
C A 3
D B,C 5
E C 1
F D 4
G E,F 3
H G 2
I G 3
J H,I 5
K J 6
.{
- -/(
L-3/T-lICSE Date: 08/03/2012
,
BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY, DHAKA
L-3/T-I B. Sc. Engineering Examinations 2010-2011
SECTION -A
There are NINE questions in this Section. Answer any SEVEN.
1. (a) Define and explain the terms compiler, assembler and linker. For C/C++ programs,
elaborate the relationship of these with (i) header files, (ii) libraries. (15)
2. Two main types of errors that can occur in the lexical analyzer are (a) no regular
expression matches the current input; and (b) a start comment character inside a
comment. Explain these errors with necessary examples. How do you want to deal with
these errors in a lexical analyzer? (15)
3. Expla!n clearly the difference among the following regular expressions in the context of
Lex lexical analyzer generator. (15)
(i) {mytoken}
(ii) (mytoken]
(iii) mytoken
(iv) (mytoken) +
(v) mytoken+
c* printf( "3" );
We have the above snippet, with patterns and their associated actions, from a Lex code.
Show the output, with detailed explanations, that is produced when this scanner is run
over the following strings: (15)
(a) aaabccabbb
(b) cbbbbabc
(c) cbabc
Contd P/2
•...
=2=
CSE 309
5. (a) Left-factor this grammar, (15)
S ---+ T; S IE
T ---+ UR
R---+*TIE
U ---+ x I y I [S]
Hence find FIRST and FOLLOW sets for each non-terminal in the grammar obtained.
6. (a) For the left-factored grammar in Question 5, construct an LL parsing table. Now show
in detail what will happen if the string [x;y]*[; is parsed. (15)
8. Identify whether each of the following grammar is LL(l) or not. State the reason(s) in
each case. (15)
(a) A ---+C IE, C ---+C E, C ---+E, E ---+E
(b) S ---+A I B, A ---+aaA I aa, B ---+aaB I a
(c) S ---+AaAb I BbBa, A ---+E, B ---+E
(d) A ---+abc I B, B ---+acb
(e) A ---+bcd IB, B ---+E, C ---+DAbd, B ---+b, C ---+c, D ---+d
9. (a) Write a Yacc plus Lex program which calculates the value of an arithmetic expression
which involves single line inputs only. The arithmetic expression comprises of numbers
with decimal points, addition, subtraction, multiplication and division operators.
Parentheses can be used in the expression. The expressions may also contain the sin, cos
and tan trigonometric functions. (15)
SECTION -B
There are FOUR questions in this Section. Answer any THREE.
CSE 309
Contd ... Q. No. 10
(b) We have the following three address code sequence where we have two procedures
m, and p. Our target machine is byte addressable with 8 bytes to a word. Codes for the
procedures start at addresses 100, and 400 respectively and stack starts at address 1000.
Activation record sizes are 128, and 256 bytes respectively. Each action requires 80
bytes. Find out the target code for the given three address code sequence when stack
11. (a) The following grammar generates binary numbers with a decimal point.
A~L.L
11
(i) Design an SDT (Syntax-directed translation scheme) that computes the value of
annotated parse tree for this translation and clearly show the dependency graph. (7+6)
(b) Construct DAG for the following assignment statement (10)
b[i] = a + (a + a + (a + a + a +( a + a + a+ a)))
12. (a) For the following assignment statement write down an equivalent three address code
sequence. (10)
y[i][j] = a[k] * b + c (3, d, 2.5)
Here, y is an array of type array (10, array (15, float)), a is an array of type array (10,
integer) and c is a function of type integer x float x float ~ float. Assume that width of
an integer is 4 and that of a float is 8.
Contd P/4
=4=
CSE 309
Contd ... Q. No. 12
return s + t ;
}
(i) Construct parse trees for the following declaration statements according to the above
grammar. (4+5+6)
(l)intx;
(2) float * y;
(3) int * [10] z;
(ii) Design and SDD for the above grammar that computes the type and width of a
declared identifier. Assume, the width of an integer is 4 and that of a float is 8. (13)
(b) Draw the code structure layout for the following control - flow construct. (7)
S- for (S 1 ; B ; S2) S3
L-3/T-1ICSE Date: 01103/2012
BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY, DHAKA
L-3/T-I B. Sc. Engineering Examinations 2010-2011
SECTION-A
There are FOUR questions in this section. Answer any THREE.
1. (a) Explain the factors by which an indexing technique can be evaluated. ,(5)
(b) Construct a B+ tree for the set of key values {2, 4, 6, 8,12, 18,20,24,30, 32} with
n = 4. Assume that the tree is initially empty and values are added as per given order. (10)
(c) Describe static hash file organization with an example. How can bucket overflows be
handled? (10)
(d) The relation account is given in Figure 1. Construct bitmap indices on type, branchname
and location attribute. Explain how can you find balance for branchname = 'B2' and
location = 'Ll' and type = 'D'. (10)
2. (a) Explain block level stripping with an example of storing 1,2, n logical blocks
into a disk subsystem consisting of 8 disks. " (5)
(b) Explain the data dictionary schema for DBMS. List the advantages and disadvantages
for storing a relational database as follows: (10)
(i) Store each relation in one file.
(ii) Store multiple relations in one file.
(c) Consider the E-R diagram in Figure 2 which contains composite, multivalued and
derive attributes. (10)
(i) Give an SQL: 2003 schema definition corresponding to the E-R diagram.
(ii) Give constructors for each of the structured types defined above.
(d) Describe with an example, the object identity and reference types in SQL. How can
you process queries using reference type? (10)
3. (a) Explain the transaction states with the state diagram. (5)
(b) A concurrent schedule of three transactions TI, T2 and T3 is given in Figure 3. Show
the steps to transform the above schedule into an equivalent conflict serial schedule. (10)
(c) Explain with examples, the testing of serializability by using precedence graph. Show
the cases of both conflict and non-conflict schedules. (10)
(d) Given relations Rl (A, B, C, D) and R2 (C, D, E) stored in sites Sl and S2. Describe
the join operation ofRl and R2 using semi-join strategy. Give an example of parallel join. (10)
\
\
Contd P/2
'.
=2=
CSE 303
SECTION-B
There are FOUR questions in this section. Answer any THREE.
5. (a) Describe the key properties that give a DBMS edge over a file system. (14)
(b) Show the block diagram of database management system components. (14)
(c) Discuss 'Schema versus Data' and 'DDL versus DML'. (7)
.'-
)
\..
•
=3=
CSE 303
Contd ... Q. NO.6
• The system will also need to track what treatments' are required for which patients and
when and it should be capable of calculating the cost of treatment per week for each
patient (though it is currently unclear to what use this information will be put).
(a) Define entities and their attributes for the hospital management system described above. (10)
(b) Draw ER diagrams to show the relationships among entities of the above system. (25)
7. (a) Define BCNF, 3NF, and 4NF. Describe relationships among these normal forms. (9+8)
(b) Describe the BCNF decomposition algorithm. (10)
(c) Consider a relation with schema R(A, B, C, D) and FD's AB~C, C~D, and D~A.
What are the non-trivial FD's that follow from the given FD's? (8)
/
•
""----- .... ,
' •.•. _--_
( Age I
....
Tl T2 T3
Read (A)
Write (A)
Read (A)
'Read (A)
Write (A)
Read (B)
Write (B)
Read (B)
Write (B)
SECTION-A
There are FOUR questions in this Section. Answer any THREE.
1. (a) Consider the four signals in Figure 1(a), 1(b), l(c) and l(d) that are generated by
encoding the bit-stream '0011100011' using four different digital line coding techniques.
For each of these four line coding techniques identify and write the bit encoding rules
(i.e., how 0 and 1 are represented). Compare the four techniques with respect to the
following characteristics. (4+16 20)
(i) Bandwidth requirement (ii) Synchronization capability
(iii) DC value suppression (iv) Error detection capability
----------_._-----------------------_.~
I0 0 1 1 1 1 I 1 I 0 1 0 I 0 11 111 I 0 I 0 I 1 I 1 I 1 I 0 I, 0 I 0 I 1 I 1 I 'I
I :
5\1 5.'./ i
\ :
!
t
!
01/
.f
,I
I,,
i
;
!i
l
I , I !
-5'1 i \ i I
I 0 101 1 111 1 I 0 I 0 I. 0 I 1 I 1 I 1 1 0 1 01 0 11 I 1 1
5\l !~ sv
,
ov I 0'1
I
I
I 'I
I.
-5V
I II! ,_
[ , :~
-------------- ~ __ F_ig_ur_e_l
__
(c~ ,. ~_~ ' _Fi_gu_r_e
_l(_d)~~
(b) Three signals, each covering the range 10-15 KHz are to be transmitted
simultaneously using Frequency Division Multiplexing (FDM). The resultant signal
should cover the range 80-95 KHz. Describe how to generate the desired frequency
signals. Assuming sinusoidal roll-off shaping, what roll-off factor is required? (7)
2. (a) Explain with an example the difference between bit rate and pulse rate and thus show
the advantage of using multisymbol signaling. Describe how multi-symbol signal can be
generated using QPSK. Also draw the block diagram of a QPSK signal generator. (8+8+4=20)
Contd P/2
=-2 =
CSE 311
Contd ... Q. NO.2
(b) How do Frequency Modulation (FM) and phase modulation (PM) differ? Show that
the bandwidth of narrowband FM signal is 2B Hz when baseband bandwidth of the
3. (a) Show that for a real time signal f(t), the signal fsSB(t) = f(t)cosOJct + fh(t)sinOJct
represents a lower sideband SSB-SC signal where fi,(t) represents the Hilbert
generated. (3+4=7)
4. (a) What is the maximum number of pulses that can be transmitted over a bandwidth ofB
=0 I L1roI> rox
=;1 -roc < L1ro< -rox
Sketch the amplitude spectrum. Does this filter satisfy the Nyquist Criterion of odd
symmetry for generating wave-shape with zero intersymbol interference (ISI)? Explain
your answer. Show that for the given sinusoidal roll-off filter B = (l + r)/2T, where the
symbols carry their usual meanings in the given context.
SECTION-B
There are FOUR questions in this Section. Answer any THREE.
5. (a) How is the bandwidth of a real time signal calculated? Let/(t) be the derivative of a
real time signalf(t). Which off(t) and/(t) has higher bandwidth? Explain your answer. (6+8=14)
(b) The Fourier Transform of the triangular pulse f(t) in Figure 5(a) is given as- (15+6=21)
F(OJ) = 1/OJ2 (eiOJ_jox/0J-1)
Using this information, and the time-shifting and time-scaling properties, find the Fourier
Transforms of the signal g(t) shown in Figure 5(b). Does the inverse-time bandwidth
relation hold for this signal?
Contd P/3
=3=
CSE 311
Contd ... Q. No. 5(b)
/ j(t)
/
,/
/
- .- . - . - - .- .- . -
.
-1 o to? o 1 to?
Figure~b) -~
'" Figure5(a)
~
6. (a) Find out and sketch the impulse response of an ideal low-pass filter with linear phase
characteristic. Using the result explain why such an ideal filter in physically unrealizable.
(10+5=15)
(b) Let the signal g(t) as shown in Figure 5(b) be input to a linear time invariant system
with transfer function, H(OJ) = jOJ. Find out and sketch the output (in time domain) of the
system. (8)
(c) Letj(t) be a real time signal band-limited to B Hz. Let.fs(t) be the signal obtained by
periodically samplingj(t) at a rate of 2B samples per second. Show that if.fs(t) is passed
through an ideal low pass filter of bandwidth B Hz, then the output will be proportional
tof(t). (12)
7. (a) How does a Quantizer with uniform spacing of levels work in a PCM system? When
does quantization with non-uniform spacing result in better signal -to-quantization noise
ratio than quantization with uniform spacing? Explain with an example. (5+10=15)
(b) Explain how step size k' affects 'quantization noise' and 'overload noise' in a Delta
Modulation (DM) system. How does adaptive delta modulation adjust k'to reduce both
8. (a) What is Time Division Multiplexing (TDM)? What is the advantage of using TDM
hierarchy? Explain why the output data rate of a multiplexer at any level in a TDM
hierarchy is usually kept higher than the total of data rates of all its incoming channels. (6+6+6=18)
(b) What is the advantage of using Differential Pulse Code Modulation (DPCM) system
over Pulse Code Modulation (PCM) System? Discuss briefly on designing the predictor