0% found this document useful (0 votes)
18 views19 pages

L-3 T-1, Cse, 2010-2011

The document is an examination paper for CSE 307 (Software Engineering and Information System Design) at Bangladesh University of Engineering and Technology, dated March 19, 2012. It includes various sections with questions related to use cases, UML diagrams, design patterns, software development models, and ethical responsibilities of software engineers. The exam covers practical applications of software engineering concepts and requires students to demonstrate their understanding through diagrams and explanations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views19 pages

L-3 T-1, Cse, 2010-2011

The document is an examination paper for CSE 307 (Software Engineering and Information System Design) at Bangladesh University of Engineering and Technology, dated March 19, 2012. It includes various sections with questions related to use cases, UML diagrams, design patterns, software development models, and ethical responsibilities of software engineers. The exam covers practical applications of software engineering concepts and requires students to demonstrate their understanding through diagrams and explanations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

~-: '

...

L-3/T-lICSE Date: 19/03/2012


BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY, DHAKA
L-3!T-1 B. Sc. Engineering Examinations 2010-2011

Sub: CSE 307 (Software Engineering and Information System Design)

Full Marks: 280 Time: 3 Hours


USE SEPARATE SCRIPTS FOR EACH SECTION
The figures in the margin indicate full marks.

SECTION-A
There are FOUR questions in this Section. Answer any THREE.

1. (a) Read the following Use Case Carefully. (247j)

Use Case: Check Out Books


Primary Actor: Worker
Stakeholders and Interests:
-Worker: wants fast, and easy check out of books.
-Patron: wants fast check out, and does not want to be charged for books they did not
check out.
-Library: wants fast check out of books, and wants to make sure that all books that leave
the library have been checked out. Wants to allocate books fairly.
-Government: wants to protect investment in books and keep costs down.
Wants to promote learning and citizen happiness.
Preconditions: The Worker has been authenticated.
Success Guarantee (Post conditions): The System remembers that the Patron has
checked out the books.
Main Success Scenario (or Basic Flow):
1. The Worker tells the System the identity of a patron who wishes to check out books.
2. The System confirms that the patron is allowed to check out books, and remembers the
patron's identity.
3. The Worker tells the system the identity of a book this patron is checking out.
4. The System confirms that the book can circulate, calculates the due date based on
whether the patron is a facuIty member or a student, and records that the patron has
checked out this book, which is due on the calculated due date, and makes that
information available from the library catalog.
5. The System tells the Worker the due date (which also confirms that the book has been
checked out).
The Worker repeats steps 3-5 until indicates done.
Extensions (or Alternative Flows):
2a. if the patron is not allowed to check out books because they have violated some
library policy (for example, if the patron has not paid their university bill or library fines):

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

milk should be performed. (10)


(d) Assume that A, B, C and Boolean variables, X, Y, Z are outcomes. Propose a decision

table for the following procedure: (4)


Contd P/3
.•.

=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

the collection database as well. (12 X )


Make sure to define events, conditions, actions for transitions in your diagram, where
appropriate.
(c) A book is written by an author, published by a publisher, sold by a book store, and
read by a reader. Moreover, for a reader to read a book, she must buy it from a book store

that is selling it. (8)


Draw a Use Case diagram for this scenario, showing relationships between different use
cases.
(d) (i) What is the present value of$ 1,000 one year from now, assuming a 10% discount

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

unit is destroyed. This is indicated on the test form. (12 X)

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.

(b) Define each of the following with suitable examples: (24)


(i) Detailed Report
(ii) Summary Report
(iii) Exception Report
(iv) Turnaround Document
(v) Two-Tier Architecture
(vi) Three-Tier Architecture
(vii) File-Server Architecture
(viii) Agile Method
(c) The ordinary way to extend a software system is to find a suitable superclass, and to
subclass it, You can also "inherit" behavior from more than one class by copying some of
the operations of the second class and delegating calls to an instance of that class. Both of
these extension techniques, however, require that you know at compile time what
behavior you want to add. Name these two techniques that we just described. Should one

of these techniques require a preferential treatment? (5)


Contd PIS

-'

=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 () {}

private static class SingletonHolder {


private static final Singleton instance = new Singleton () ;
}
public static Singleton getInstance () {
return SingletonHolder. instance;
}
}
(b) Write down the guideline for input design and output design of a system. (5+5)
(c) In principle a social network service focuses on building online communities of
people who share interests and/or activities, or who are interested in exploring the
interests and activities of others. Facebook support groups that people can join. Each
group has a title, administrative members, a group type (open! closed), and a list of
related groups. Otherwise, a group operates just like an ordinary page. If somebody
writes on the wall page of the group, the information is broadcasted to all the members
and it is visualized in the news feeds of the members.
Contd P/6

=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

members of the "BUETIANS" group. (12 %)


Which design pattern is most appropriate to accommodate this change? How the solution
proposed in the previous example shall be extended. Please give a short explanation why.
Show a complete class diagram(s) and enough code fragments to illustrate your use of the
pattern to solve the problem.

(e) Suppose Alice told you the following story (7)


"At the company for which I work we are facing this problem: We have a large amount
of application software written using a particular library. Let's call this library LibX. The
provider of this library was XIndustries AB. We wanted to extend the functionality of our
application and for this reason we tried to contact XIndustries AB to implement the
necessary library functionality. To our surprise we found out that XIndustries AB has
gone out of business. Fortunately we found out that there is another company called
YEnterprise AB is producing Lib Y that provides the same functionality as LibX but
many of the classes have different interfaces. We don't have access to the source code of
the old library LibX and neither to the source code of Lib Y. What should we do?"
Which design pattern is most appropriate to accommodate this change? In particular,
show an appropriate class diagram to solve the problem.

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

stages of a project lifecycle? (5+ 10+ 15)


(b) How Ishikawa diagram is used to identify, explore and depict problems, and the

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.

Identify the quality criteria for such a project. (4+8)


(c) What is the difference between verification and validation? What input! output faults

you may check while designing a banking transaction module. (2+5)


(d) Describe the communication practices a software engineer should adopt. (6%)

(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

and why? (15%)


(c) Describe the following software cost estimation techniques: (3+3)
(i) Parkinson's Law.
(ii) Pricing to win.
(d) Find the critical path of a project using PERT chart base on the following table

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

Sub: CSE 309 (Compilers)


Full Marks : 210 Time: 3 Hours
USE SEPARATE SCRIPTS FOR EACH SECTION
The figures in the margin indicate full marks.

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+

4. a*b printf( "I" );

(alb)*b printf( "2" );

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)

7. Eliminate left recursion from the grammar, (15)


A ---+B I a I CBD
B---+Clb
C---+Alc
D---+d
If you encounter a production like X ---+X at some point of elimination, you can drop it
since it does not affect the language.

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.

10. (a) Differentiate with example between- (4x6)


(i) Syntax-directed definition and syntax-directed translation.
(ii) Static and dynamic storage allocation in run-time environment.
(iii) Syntax tree and directed acyclic graph (DAG)
(iv) S-attributed definitions and L-attributed definitions.
Contd P/3
=3=

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

allocation is used. Target code must contain appropriate comments. (11)


/* code for m */
action 1
call p
action 2
halt
/* code for p */
action 3
return

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

binary numbers generated from the above grammar. (12)


(ii) The translation of string 110.101 should be the decimal number 6.625. Draw the

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

(b) The following C code computes Fibonacci numbers recursively.


int f( int n) {
int t, s;
if ( n < 2 ) return 1;
s = f (n - 1) ;
t = f (n - 2) ;

return s + t ;
}

(i) Show the complete activation tree for it. (8)


(ii) What does the control stack look like when the fourth call of f (l) is about to return.
Show only argument and return value in an activation record. (Assume that the initial

call is f(6)). (7)


(c) Write down the names and purposes of the fields that might appear in a general

activation record of a function. (10)

13. (a) Consider the following grammar for declaration statement.


D-Tid;
T-BC
B- int I float
C-PA
P-*PIE
A- [num] AI E

(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

Sub: CSE 303 (Database)


Full Marks : 210 Time : 3 Hours
The figures in the margin indicate full marks.
USE SEP ARA TE SCRIPTS FOR EACH SECTION

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

4. (a) Explain two phase locking protocol. (5)


(b) Describe the implementation of lock manager using a lock table data structure and
show the following locks: (10)
(i) Tl has granted locks for data items 10, 22, 35 and waiting for data item 44.
(ii) T2 has granted locks for data items 44 and 22 .
. (iii) T3 has been waiting for data item 22.
(iv) T4 has been granted locks for data items 8, 10,22 and waiting for data item 35.
Tl, T2, T3 and T4 are the transactions. Also explain how the lock manager process a lock
request using the structure.
(c) Explain the rules of performing read and write operations in time-stamp ordering
protocol. What are the advantages and disadvantages of this protocol? How is the
protocol improved in Thomas Write Rule? (10)
(d) Describe log-based recovery methodology. For the given transactions <Tl, T2, T3>,
write the log records. (10)
Tl: Read (A) T2: Read (B) T3: Read (A)
A=A-50 Read (A) DISPLAY (A)
Write (A) B =B+50
Write (B)
DISPLAY (A+B)

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)

6. Consider the following scenario of a hospital:


• Patients are treated in a single ward by the doctors assigned to them. Usually each
patient will be assigned a single doctor, but in rare cases he/she will be assigned two
doctors.
• Healthcare assistants also attend to the patients; a number of these are associated with
each ward.
• Initially the system will be concerned solely with drug treatment. Each patient is
required to take a variety of drugs a certain number of times per day and for varying
lengths of time.
• The system must record details concerning patient treatment and staff payment. Some
staffs are paid on a part time basis and doctors and care assistants work varying amounts
of overtime at varying rates. (subject to grade).
Contd P/3

.'-
)
\..

=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)

8. Consider the following schema:


Product (pid, name, price, category, year, maker-cid)
Purchase (buyer-ssn, seller-ssn, store, pid)
Company (cid, name, stock price, country)
Person (ssn, name, phone number, city)
Note:
• in Purchase: buyer-ssn, seller-ssn are foreign keys in Person, pid is foreign key in
Product;
• in Product maker-cid is a foreign key in Company

(a) Write SQL statements to answer the following queries: (20)


• Find names of people buying telephony products .
• Find products (and their manufacturers) that are more expensive than all products
made by the same manufacturer before 1972.
• Find names of people who bought Bangladeshi products and did not buy Indian
products .
• Find names of products (and their manufacturers) whose prices are less than the
average product price of that company.
(b) Express the following queries using relational algebra: (8)
• Find names of people who bought Indian products and live in Gulshan.
• Find people who bought stuff from Alam or bought products from a company
whose stock prices is more than BDT 2500.
(c) Define natural joins and outer joins. (7)

/

/ A-Id Type Branchname Location Balance


1 D B1 L1 2000
2 C B1 L1 2000
3 D B2 L1 2000
4 D B2 L2 5000
5 . D B2 L1 5000
/
6 C B3 L2 .3000 . '
7 L B3 L2 2000

Figure 1: Account relation for Question No.1

""----- .... ,
' •.•. _--_
( Age I
....

Figure 2: E-R diagram for Question No.2

Tl T2 T3
Read (A)
Write (A)
Read (A)
'Read (A)
Write (A)
Read (B)
Write (B)
Read (B)
Write (B)

Figure 3: Concurrent schedule for Question No.3


L-3/T-lICSE Date: 23/02/2012
BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY, DHAKA
L-3/T-1 B. Sc. Engineering Examinations 2010-2011

Sub: CSE 311 (Data Communication I)

Full Marks: 210 Time: 3 Hours


The figures in the margin indicate full marks.
USE SEPARATE SCRIPTS FOR EACH SECTION

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

Figure lea) Figure l(b)

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

multiplexed signal. (8)


(c) FSK transmission is used to transmit 1200-bit/s digital signals over a telephone
channel. The FSK signals are to fit into the range 500 to 2900 Hz. The carrier frequencies
are 1200 and 2200 Hz respectively. Find the baseband bandwidth required for the binary

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

modulating signal is B Hz. (5+10=15)

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

Transform of f(t). (15)


(b) There are two methods for generating SSB-SC signal: (i) Passing a DSB-SC signal
through a band-pass filter; (ii) Using a circuit according to the expression for fsSB(t)as
mentioned in Question 3(a). Now identify the practical difficulties involved in both the
methods. Give example of a signal which is suitable for SSB-SC modulation using the

first method. (8+5=13)


(c) Why Vestigial-sideband (VSB) signal is called so? Describe how VSB signal is

generated. (3+4=7)

4. (a) What is the maximum number of pulses that can be transmitted over a bandwidth ofB

Hz? Explain your answer. (15)


(b) The amplitude spectrum for a sinusoidal roll-off filter is given as follows: (6+6+8=20)
IH(L1ro)I = ~ (I-sin (nI2)(L1ro/rox)) I L1ro1< rox

=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

'quantization noise' and 'overload noise'? (14+6=20)

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

of a DPCM system. (5+12=17)

You might also like