0% found this document useful (0 votes)
253 views46 pages

It 2018

The document is an exam paper for an Introduction to Computing course from the University of the Punjab. It contains 5 questions - two short answer questions, two subjective questions, and one objective question. The questions cover topics like computer memory, the differences between words and viruses, data compression, firewalls, computer terminals, branches of artificial intelligence, software reliability, advantages of DBMS over file systems, computer topologies, and what a kernel is.

Uploaded by

Rehan Tariq
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)
253 views46 pages

It 2018

The document is an exam paper for an Introduction to Computing course from the University of the Punjab. It contains 5 questions - two short answer questions, two subjective questions, and one objective question. The questions cover topics like computer memory, the differences between words and viruses, data compression, firewalls, computer terminals, branches of artificial intelligence, software reliability, advantages of DBMS over file systems, computer topologies, and what a kernel is.

Uploaded by

Rehan Tariq
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/ 46

UNIVERSITY OF TIIE PUNJAB

.oaa aorra a aaaaaaaaaaaaaa aaa


First Semester 2018-aa a
Exsmination: B.S. 4 Years Prosramme !
oo
RoIt No. ..................... :
r oo t o a a a a a aaoa aaaaa aa aa'

PAPER: Introduction to Computing TIME ALLOWED:2 hrs. & 30 mins.


Counse Code: IT-101 MAX. MARKS: 50
Attempt this Paper on Separate Answer Sheet provided
l'AR'f - II (Short Qucstions)
OUDS'I'ION # 2
[20 marksj
Write short answers to alt of the following qucstions:

l' Aconrputerhas5MBoInrcntory.[[ownranywordscanhcs(orccl initatatinrc'/Whcrrc


cach word consists ol l6-bits.
2. ilow a worrrr and a virus arc diltbrcnt liorn each o[her?
3, What is data compression? Why and where it is uscd?
4. What is a firewall?
5. What is a computer terminal? Explain.
6, List various branches of AI (Artihcial Intelligence).
7. Wrat is software reliability in e-commerce?
8. f)esoribe some of the advantages of DBMS over file system.
9. what is a computer topology? Discuss some commonly used LAN topologies.
10. What is kernel? Why it is important?

PART - tII (Sub.iective)

OUESTION # 3 [0 nrarksl

a) [Iow an optical disk is diffbrent from magnetic disk? Briefly cliscuss the physical
organization ofboth the storage devices.
t5l

b) Discuss the concept oI parallel processing and pipetining? FIow it hclps improving the
overall perlbrnrance ol a computer? tsl
OUESTION # 4 It0 marksl
a) Describe the following methods that computer criminals use to gain illegal access to
computer systems: t5]
i. Denial of service attacks

(P.r.o.)
ii. Trojan florse
iii. Zapping
iv. Piggybacking
v. Data diddling

b) What is a modem? l)iscuss ditferent types of modems. t5]


QUESTION#S [t0marksl
a) Writc codc to prin( thc count olcligits in an array named A of type char of size 20. you
mily tcst wcatllcr a cltrtr c is cligit or not by using conclitional expression c >= 'l ' &&. c
<-,'()'. t5l

b) Write HTML code to produce the following form:


t5l
Here, the text "Sign Up page" should be a first Ievel heading and..Go Back,, should
be a
hypcrlink to honrc pagc nanre<I home.html

Sign [:p Fage


Frrst N.rrue

Lasr \artre :

Gerrder o \Iale Fenrale

Courttrl r Pakislan v

Slgn UP

(.-ll P,nqli
UNIYERSITY OF THE PUNJAB.... Roll No.
First Semester 2018

PAPER: Introduction to Computing TIME ALLOWED: 30 mins)'.. ...


Course Code: IT-101 MAX. MARKS: 10
Atlempt this Paper on this Question Sheet only.
PAI{'I' - t (Otrjcctivc)

OUES'I'ION # 1 [0 marks]

Sclcct the bcst option for each of thc following NICQs. Ovcrwriting will result ZERO in
crcdi t.

t. consists of a serics of instrr.rctions that tells the computcr lvhat


actions to perfbrrn and how to pertbrm them.
a) Output dcvice b) Input device
c) So ftware d) Monitor

A device driver is
a) l'he person who delivers hardware devices to a computer store
b) 'fhe connector that allows you to attach the device to a computer
c) computer program that allows the operating system to communicate with the devioe
d) The power supply for the device

3. Atl of tlrc lollowing are examples of application software except


a) Adobe Photoshop b) VLC media player
c) L,inux d) Microsolt oftice
4. Which one the tbltowing can be used as an input device as well as an output dcvicc?
a) Keyboard b) Printer
c) Scanncr d) Touch screen
5. are very powcr[ul computers used for real time complex applications whose
clficiency is measured in Ft.OPs.
a) Super computers b) Mainframe computcrs
c) Personal computers d) Workstations

6. Which of the tbtlowing is not a basic function of computer?


a) Input b) Processing
c) Learning d) Controlling
7. Assume cell A1:2, B1:3, C 1=4; then which of the loltowing will result 3 in Excel?
a) :Min(A1:C1) b) =Max(Al:Cl)
c) :Average(A1:Cl) d) {1+(Al-Al/A1)
8. is used to copy tlte fbrmatting of the selected text.
a) Format Painter b) Quick Access Toolbar
c) Mini toolbar d) None of these
9. Which olthc tbllowirrg vuriatrlc name is valid:
a) #Oflitudents a) nunr I
b) I l22Roscuc c) Al[ ol'the above

10. Whioh ol'tlrc liillorving is a cot'rcct way to insort au ituagc in a wcbpagc.


a) <img source=image > </img>
b) <img style="text-align:center" > "image.jp(' </img>
c) <img alt=image.jpg>
d) <img src="image.ipg" alt="This is an image">
I]MVERSITY OF TIIE PT]NJAB
aaa aaa aa aaaa aa aa aaa aota
Second Semester - 2018 aa.a
aa
ao
Examinetlon: B.S. 4 Years !lrr RouNo......................
r roo ro r ror...........,
:
PAPER: Progremming Fundamentals TIME ALLOWED: 2 Erc. & 45 Min.
Cource Code: IT-102, IT-12395 Part - II MAK.MARKS:50

down the ut of the fo

*include<iostream>
using namespace s tld; using namespace s td;
j" nt main
int main o o
(
t
int a=2 ; irl i - 4:
for (int a:2'a<-10;a++) int r- = i '
a:a+2 ; for(r=0;j>i;l--)
cout<<a<<endl i {
return 0; ccut<< j-l<<" ";
)
return 0;

ii) A car holds 12 gallons of gasoline and oan travel 350 miles before refueling. Write
a program that calculates the numbet of rniles per gallon the car gets Display the
result on the screen.
/Use the following formula to calculate miles per gallon
(MPG)I

MPG : Miles Driven / Gallons of Gas Used

iiD Write a function nar


ne isPositive, *ni"fl t"kes an integer as an argument and
-, --_,.:-^ r^-L.,-.
false otherwise.[only write
retums true if the argument is a positive number, or
the definition for this functionl'
bool isPositive ( int num ) ;
iv)DrawFlowchartinwhichyouSetrestaurantbillasinputandthenitwillcomputesthetax
tip should
and tip on a restaurant bili. The tax should be
6.75 percent of the meal cost. The
be15percentofthetotalafteraddingthetax'Displaythemealcost'taxamount'tip

Question # 3:
3xl0=30
program for the following Input a positive
Wr-te--a integer from the user (lets say a) and display the
sum of the first n terms of the following series:
l'+2'+3'+4'+5'+6' +A
Three sample runs of your algorithm might look tike (Input is underlined in sample
run, only to
distinguish from display messages):
Entet th. nunber of terms: 3
SuE of first 3 terBs of the series ia: 14

f'.rter tte number of terns: 0


sum of firat 0 terms of the series i-s:
Enter the nunber of berus: 5
Sum of first 5 terms of the series is: 55

auesln# +'
iunction specialSearch which takes a one-dimensional arrayof integers, its size,
1*plemJni a
, ond un integer key asarguments. This function will determine the number of elements less than'
prototype of your
*rmber of*elemints greater than and equal to key in the given array. The
function should be:
int
void sPecialsearch (int arr[], int n, int key, int& numless, int& numGreater,
& numEqual)
in unsorted otder,
In the aboie function prototype: arr is an array which contains n integers
;;1;;h; valuo based upon *hi"h the searching wi1 be performed, numless , numGreater
the counts of the number
oui nrnrpquul are r.efeience parameters which will 'se6
be to return
of elements less ,greater and equal to the key'
[Nole: only write the tlefinition o.f functionJ

Question # 5:

Write a program that take three district integers from user and display the second smallest of them?
UNTYERSITY OF TI{E PUNJAB
Second Semester - 2018 )..Roll No. ..................
Expmin?tion: B.S. 4 Years
\\
PAPER: Programming F undamentals TIME ALLOWED: 15 Min. '.
Course Code: IT-102,rc-12395 Part - I (Compulsory) MA)L MARKS: 10

AtteBnt this Paner on this Ouestion Sheet onlv.


Please encircle the gorrect option. Each MCO carries I Mark This Paper will be collected
back efter exoirv of timp limit mentioned above.

Q.1.a) MCQs (5x1=5)

i. The conditional operator is:


a) Unary b) Binary
c) Temary d) None

ii. The searches for special lines in a C++ program that begin with the #
symbol.
a) Lirker b) Compiler
c) Preprocessor d) Object code

iii. An escape sequence starts with the character, and is followed by one or
more control characters.
a) /(Slash) b) \ (backslash)
c) # (hash) d) ; (semicolon)

lV. How many bytes are required to store string "Hellow World".
a)5 b)6
c) ll d) t2

In a flowchart, the_ symbol is used to indicate an input or an output step.


a) Oval b) Rectangle
c) Parallelogram d) Diamond

Q.l. b)Choose between True and False. (5x1=5)

t. Computer can do many different jobs because they can be programmed. True / False
lt. Machine language is the only language computers really process. True / False
iii. A variable must be defined before it can be used? True / False
iv. A left brace in a C++ program should always be followed by a
right brace later in the program? True / False
The = operator and the : operator perforrr different operation? True / False
TJNIVERSITY OF THE PUNJAB
Second Semester - 2018 ..RollNo.
Examinatiop: B.S. 4 Years
\\
PAPER: Digital Logic Design \
Course Code: IT-104 lII-l2397 part
TIMEALLOWED:15Min. '.
- I (Compulsory) MAX. MARKS: 10

uestion Sheet onlv.

Q.1. (10x1=10)

i. (1011000110101 1.11I 10010)2 in hexadecimal is:


a) 2C5B.F2 b) 2c6B.F2
c) 3D5B.F2 d) 3D6B.F2

ii. NOT gate is also known as:


a) Converter b) Inverter
c) Complementor d) Both b and c

iii. Which one of the following is not a valid rule of Boolean algebra?
a) A+l=l b) A=A
c) A.A:A d) A+0=A

iv. ls}rrrel SR flip flop is designed and it is reset initially. The state of the flip flop when
S=l and R=l will become:
a)l b)0
c)a d) Q'

Y. Decoder is a:
a) Combinational circuit b) Sequential circuit
c) Complex circuit d) Gate

vi. To desigrr a firll adder circuit using ROM, the size of the ROM will be _.
a) 32x4 b) 8x2
c) 8xl d) 32x.3

vii. The simplified expression of half adder carry is:


a) c=xy+x b) c:y+x
c) c-xy+y d) c=xy
viii. Memory that is called a read write memory is:
a) ROM b) EPROM
c) RAM d) Registers

ix. The output of AND gates in SOP is connected to:


a) NOT gates b) OR gates
c) AND gates d) XOR gates

x. TypesofRAMare:
a)2 b)3
c)4 d)s
I]NTVERSITY OF THE PUNJAB
aaaaaaaaaaaaaaaaa a aaaaaaaa
Second Semester - 2018 aa
aa
Examination: B.S. 4 Years
!la raRot1No......................
l oo aaaaaaaaa looa
:
a' a
a aa

PAPER: Digital Logic Design TIME ALLOWED: 2 Hrs. & 45 Min.


Course Code: IT-104 ltr-12397 Part - II MAX. MARKS: 50

Q,uestions: (20 marks)


Question #.2, Shcrt

a) Convert 4245.4O from Decimal to Hexadecimal number system. (3)


b) Slmplify the function in SOP using Boolean AIgebra. (4)
F(A,B,C) = A'B'C+A'BC+A' 8C'+ABC

c) We have to design a circuit that takes 4-bit binary number as input and generates its square as
output. How many output variables/ functions are required to design this circuit?
(3)
d) To design a combinational circuit using ROM that converts a decimal digit from 2421 code to BCD,
what is the size of ROM? (3)

e) write the equation for A>B for a 3-bit magnitude comparator AzArAoand BzBrBo. (3)
f) Fill up the Excitation table of lK flip flop. (4)

q(t) Q(t+1) J K

0 0

0 1

1 0

1 7

Question fl 3, Long Questions (10x3=30)

a) lmplement the following function using multiplexer. Keep three variables A, B and D as select
lines to the m ultiplexer. (10)
F(A,B,c,D) = L 10,7,2,4,8,e,rs\

b) Design a 8x 1 MUX byusing appropriate numberof 2 x 1 MUX. (10)

c) Design a 2-bit synchronous counter using D flip flops, whose counting sequence is controlled by
a control input x in the following way: (10)

Control Input x Counting Sequence

0->1 ->2 ->3 ->Repeat

2->1->3->0-> Repeat

show the transition table, derive the input equations and draw the circuit diagram ofthe counter to 8et
f ull cred it.
UNTYERSITY OF THE PTJNJAB
Third Semester 2018 : :
Examination: B.S. 4 Years Programme i.*,j.ol:: ;:.;: ;: ;: ;:...:.;: ;
PAPER: Object Oriented Programming TIME ALLOWED:2 hrs. & 30 mins.
Course Code: IT-201 121400 MAX MARKS: 50
Atlempt this Paper on Separate Answer Sheet provided
SUBJECTIYE
Question # 02:-
[axs=201
Give precise and short answers of the following:

1. Private and protected access identifiers.


2- lnheritance and Aggregation.
3- Shallow and Deep copy constructor.
4. Virtualtable.

Question S 03;-
I3OI
Provide the implementation of a class named Rational having
two data members (a and b) of type float with private access.
1' Data member of this class should contain negative data or -1 (default
value) for a particular object. Write all the set
functions for each data member to set their varues.
Io2+oz+o2l
2' lmplement default (sets all data members to .1), parameterized and
copy constructor. + 02 + 02]
[02

3' lmplement getData member function for taking the inputs for a particurar
ob.iect's data. to2]
4' overload arithmetic assignment operator (/=) to divide and assign the data of one object to another. to3l
5' overload stream insertioo operator to dispray the data of object on the consore t03l'
6' overload arithmetic product (*) operator to return the result of two objects
after multiplication, to3]
7' over oad unary minus (:l operator, returns true if an object contains data less
than zero, false otherwise. to2l
8' lmplement getEqualobiects rnember function which accepts an
array of Rational objects and return the index of an
object which is equal to the left hand side object.
t05l
UNIVERSITY OF TIIE PUNJAB.,..
Roll No.
Third Semester 2018
Examination: B.S. 4 Years Prosramme

PAPER: Object Oriented Programming TIME ALLOWED: 30 mini.'..


Course Code: IT-201121400 MAX. MARKS: 10
Attempl this Poper on this Question Sheet only.
OBJECTIVE

Question fr 01:- Write the seiected option (A or B) on your answer sheet against each of the following . [1 x 10:101
1. The analysis, design and implementation of inforrnation systems using obiect oriented programming languages, technologies
and techniques is called object-oriented development? A. True B. False

2. The pointer, automatically supplied when you call a non-static class member function is this? A. True B. False
3. when you call a public static function from outside its class, you can use an object? A. True B. False
4. A member function can always access the data in the private part of its class? A. True B. False
5. Gamefl; is a legal constructor for the Game class? A. True B, False

5' The primary advantaBe to overloading functions is use one function name for many types of items? A. True B. False
7. error?
lf you do not overload an = operator for a class the compiler will not give an A. True B. False
8. The number of associations possible between classes of ob;ects is called multiplicity? A. True B. False
9. An advantage of inheritance includes facilitating abstract classes? A. True 8. False
10. A virtual fr:nction is a function that causes its class to be abstract? A. True B. False
UNTVERSITY OF THE PUNJAB

PAPER: Computer Organization and Assembly Language TIME ALLOWED: 2 hrs. & 30 mins.
Course Code: fTA0En1402 MAX. MARKS: 50
Attempt this Paper on Seporole Answq Sheet provided
SUBJECTIW

Part - ll
Question # 2: I2OI
a) Describe the purpose of the different flag bits in the flags register.
b) What are the different addressing modes used in intel architecture?
c) The CPU is connected to the rest of the computer using what three buses?
d) Write an assembly language instruction that sets all the bits of AL register.

Part - lll
Question # 3: [10]
Write a procedure that copies a (text) paragraph from a file, changes it into uppercase and then
writes the modified text into the other file.
Question # 4: tlOI
Write a program that inputs 10 digits, stores them into an array and finds the maximum digit.
Input Validation: you should input only digits and make sure that no other character can be
input.

Question # 5: tlOI
write a program that inputs two strings and checks them whether they are same or not.
T]NTVERSITY OF TI{E PIIIIJAB... '.. RoIl No.
Third Semester 2018
Examination: B.S. { Years Proeramme \\
\\
PAPER: Computer Organization and Assembly Language TIME ALLOWED: 30 mins'.'...\
MA)L MARKS: 10
Course Code: IT-203121402 ".
Attempt this Paper on lhis Question Sheet only.
OB.IECTIW

Part - I
Question # 1: Il OI
Answer all parts in this question on answer sheet. Wrlte on the answer sheet the part number
and your answer against it. No
1'. Cross Assemblers are used to make the source code compatible for different family of
processors.
A. True B. False
It is not necessary that program written for 80386 runs on g0g6.
A. True B. False
The segment registers can only be used when the program is running in the real mode.
A. True B. False
Assembly language is a machine independent language and has one to one correspondence
with rnachine language.
A. True B. False
instruction performs POPF, POP lP.
IRET
A. True B. False
PROCedures a!'e rnore time efficient than MACROs.
A. True B. False
Local descriptor table is defined by a segment descriptor.
A. True B. False
MOV AX, [SP] is an invalid instruction.
A. True B. False
DOS lnterrupt handlers are faster than those provided by BIOS.
A. True B. False
CLI instruction affects FLAGS register.
A. True B. False
T]NTVERSITY OF THE PT'NJAB
Fourth Semester - 2018 . RoIlNo.
Examination: B.S. 4 Years
\\
PAPER: Web Engineering TIME ALLOWED: 15 Min]..
Course Code: IT-205 lfr-22405 Part- I (Com MA)L MARKS: l0

uestion Sheet onlv.

Sue$le!_f 1.
[Marks:1x10=10]
Evaluate the statement and write down the correct option number,
1. ln CSS, we can apply different styles to a group of elements.
a. True
b. Fa lse

2. JSP stands for _-.


a. Java Su per Pages
b. Java Super Program
c. Java Server Pages
d. Java Server Program

3. lf we uses post method technique, then the data will be sent through
a. body of request
b. url
c. botha&b
d, none of these

4. HTivlL sta nds for _.


a. High Thread Markup Language
b. High Text Markup Language
c. Hyper Text Markup Language
d. Hyper Thread Markup Language

5. lNlT function is executed only times in a life cycle of servlet.


a. 0
b. 1
c. More than l times
d. lt will be executed randomly

(P.T.o.)
6. ln N-Tier architecture, which layer is present
in middle?
a. Presentation / View Layer
b. Eusiness Logic Layer
c, Data Access Layer
d. None of these

7. MVC sta nds for __.


a. Model View Color
b. Model Visual Controller
c. ModelViewController
d. None of these

8. Cookies a re stored on side/s.


a. Client
b. Server
c. Botha&b
d. None of th ese

9. ln a JSP page, service method code is written in tag.


a. iSP Declaration
b. JSP Srciptlet
c. JSP Expression
d. None of these
10. For HTTPSe rvlet Request, which implicit object is available inJSp?
a. req
b. request
c. Either a or b
d. None of these
T'NTVERSITY OF THE PUNJAB
aa aa aa
Fourth Semester - 2018 aaaa
aa
a aaaaaaa aaaaa a aa

aa
Examination: B.S. 4 Years
ItaaoRouNo......................
t ooot t oao
:
aaa aa'
aaaoooa

PAPER: Web Engineering TIME ALLOWED: 2 IIrs. & 45 Min.


Course Code: IT-205 I lTa2405 Part - fI MAX. MARXS:50
Attempt this Paper on Separate Answer Sheet provided.

Question f 2. [2 x 10 = 20 Marksl
Precisely write down the answers of the following questions.

1. Describe the two attributes i.e. action and method of 'tabae'tag in html?
2. Write down a life cycle of JSP page.
3. What is meant by Server-side scripting language?
4. What is meant by a mark-up language?
5. What is the purpose of JSP directives?
5. What is meant by AIAX?
7. Def ine Java Beans.
8. What are the differences between sessions and cookies?
9. What are the components of a HTTP Response?
10. What is the benefit of N-Tier Architectu re?

Questio!_f 3. [3 x 10 = 30 Marks]
Briefly write down the answers of the lollowing questions.

1.
a. What are the differences between a servlet andJSP? tsl
b What do yoi-l mean by request dispatcher and send redirection? ts1

2. Write servlet class which will dynamically create an ordered list of all items stored in database.
a
Table conlarns two columns (ltem Name, Nurnber of items).
DB Nome: Dotobose
To ble no me : ltem ( item_No me (vo rCh o r(50) ), no_Of_ltems(int) )

3. Write a JSP page, which will dynamically create a table with politician's information stored in the
database. Table contains two columns (Politician Name, Politician Current Party Name).
DB Nome: Dotobose
To ble n o me : Politicion( pol_No me(vo rCho r(5O) ), pol-Porty(vo rcho 450) ) )
I]NIVERSITY OF THE PUNJAB
Fourth Semester - 20I8 . RollNo.

\
PAPER: Softryare Engineering TIME ALLOWEI): 15 Mints. '...
Course Code: IT-206 llT42406 Part - I (Compulsory) MAX. MARKS: 10

Attemot this Paner on this

back after exnirv of time limit mentioned above

Question #: 1
(1x10=10)
l. Linear Sequential Model is suitable when?
A. Requirements are clear C. l ime is less
B. Frequcnt changes arc there D. ResoLr rces are short
2. Sequence/arrangel-nent ofsteps to achieve a particular goal is known as:
A. Software Process C. Software Engineering
B. Process D. Both,A,and,B'
3. A software rnusl have:
A. lnstructions to do the task
B. Data structu rcs
C. Documentations
D. All of thc above

4. "l-inc of Codc" based estirnaiion is heavenly depel)dcnt on


A. Historical Data (1. lVlanascrlent Skills
B. 'I'echnology D. \one o[ above
5. The rnain objective oi-"Critical path Method (Ct,M) analysis,, is
A. 'l'o make project schedule
B. To identifo slack (float) time of project acrivities
C. To identify critical path
D. To allocate resources

6. Which one ol'the follou,ing is not part ol.,,Structured Analysis tvlode l,'?
A. Functional Model C. Data Design
R. Data N,lodel D. Ilehavioral Model
7. Which of the lbllorving is not true about conr ponent- leve I design
A. It enablcs transformation oldesign ntodel into opcralional softrvare
B. [t occurs when data, arch itectr.r ral, and interlace designs have been
established
C. It has the high dcgree of software design abstraction.
D. It establishes the algorithmic dctailrequired to nranipulate data structures

8. Which one of thc lbllorving shows the identiflcarion of data strucrLrres in


structured design?
A. Data Design C. User Interface Design
B. Architectural Design D. Component Design

9. Which one of the following is not a "golden rule of user interface design"?
A. "Place the user in control"
B. "Reduce the user's metuory Ioad"
C. "Make the interface consistent"
D. None of the above

10. Testing can show rhe abscnce and as wellas the presence olerrors'
A. Trtre
ll I:a lsr:
TTNTVERSITY OF THE PUNJAB
F'ourth Semester - 2018 aaa aa aaa a a aaaaaa aaaa a a a aaa
aa
Examination: B.S. 4 Years Prosramme
3
laoRotl No. .....................
:
r oo oeo aaaaaaa aoo t o o o a to

PAPER: Software Engineering TIME ALLO\trED: 2 Hrs. & 45 Mints.


Course Code: IT-206 I [T.22406 part fI MAX. MARKS:50
-
Attempt this Paper on Separate Answer Sheet provided.

Question #: 2 luestions (4x5=20)

Each question is of 4 marks

1:
Define'sofiware, and,,Software Engineering,,./

),
Name the 4 ps of project Management?

-3:
Explain the unit of ,Effort,i)

4:
Define "transactional flow', with respect to ,,architectr.rral
design,,?
\-
D i lfcrentiate,,B lack Box .1-csting,, and,, White l3ox .l-esting,.?

Question #: 3 Subiective Ouestions (Ift3=30)


Each question is of l0 marks
1:
Why "Data Flow Diagrarn,,is used for,,Functional
Modeling,,? Explain the
procedure to draw the diagranr?

1.
Define 'Risk,? How,,Risk Analysis is conducted,,?

3:
lrxplair thc concepts or'coupJing' and 'cohesion'
by taking rcrcvanl exanrples,/
T]NIYERSITY OF THE PUNJAB
Fourth Semester - 2018 ..Roll No.
Examination: B.S. 4 Years Programme
i

PAPER: Date Structure and Algorithm TIME ALLOIYED: 15 Mints. '...


Course Cpde : II-207 I lT-22408 Part - I (Computsory) MAX MARKS: 10 '.
t

Please encircle the correct ootion. Each MCO carries I Mark. This Paner wiII be collected
brck after exnirry of time limit mentioned ebove.

Question#i. Multiple Choice Questions. (1xl0=10)

i. Stack is used for:


a. CPU Resource Allocation b. Breadth First Traversal
c. Recursion d. None ofthe above

ii. How many swaps are required to sort the given anay using bubble sort - {2, 5, 1,
3,4):
a.4 b.5
c.6 d.7
iii, A binary tree whose every node has either zero or two children is called:
a. Complete binary tree b. Binary search tree
c. Extended binary tree d. None ofthe above

iv. \A/hat is the worst case time complexity of linear search algorithm?
a. O(1) b. o(n)
c. O(log n) d. O(n')

v. ln the deletion operation of max heap, the root is replaced by:


a. Next available value in the left sub-tree
b. Next available value in the right sub-tree
c. Any random value from the heap
d. Last element of the last level

vi. Which of the below is not divide and conquer approach?


a. Selection sort b. Bubble Set
c. Counting sort d. Merge Sort

vii. ln which notation operator is comes after operand?


a. lnfix b. Prefix
c. Postfix d. None

viii. Two main measures for the efficiency of an algorithm are:


a. Processor and memory b. Complexity and capacity
c. Time and space d. Data and space

ix. The memory address of the first element of an array is called:


a. Floor address b. Foundation address
c. First address d. Base address

x. Linear order linked list is provided through:


a. Variables b. Arrays
c. Pointer d. Strings
T]NTYERSITY OF TIIE PTINJAB
aaar ao aaa a aa a aaaaaa aa aa
Fourth Semester - 2018 oaa
aa
.a
Examination: B.S. 4 Years Prosramme 3 noltNo...................... :
oloooaaa aaaa aa oooooo oa aaao

PAPER: Data Structure and Algorithm TIME ALLO\ilED: 2 Hrs. & 45 Mints.
Course Code: lT-207 I fr-22408 Part - II MAXMARKS:50
Attempt this Paper on Separate Answer Sheet provided.

Ouestion # 2. Short Questions: _i4x5=20marks)


a) Write down the code for the lnsertion Sort.
void lnsertionSort ( int A[ ] , int size)', ltyou have to define this function only
b) Write down the code of the following function of Link List Class.
void remove(int key) // remove the node having value equal to key

c) The following given function runs in time O(n), you have to write an equivalent function
that runs in time O(1).

int fun( int size, int a[ ] )


{
s=0;
for(i=1ton)
s=s+a[ i ]- a[ i-1 ]
return s;
I
d) How many limes "Hello" will be displayed on screen by running this code, also draw
recursion tree for calculating your answer.

#include < iostream>


using namespace std.;
void f(int n)
{
if (n == r ll n == o)
retunn;
efse
{
cout << "He1lo" << endI;
f(n - 1); // recurrslve call
f(n - 2); // recurrsive call
cout << "He11o" << endl.;
)
)
int main ( )
{
f(s);
return Oj
)
Question # 3. Lonq Questions - (3x 10=30 marks)

a) Write a program to check whether a given string is of the form anbnwhere n = 0, 1' 2' 3. .

using appropriate data struture.


Examples:
aaabbb - is of the form anbn
bbbaaa - is not a form of anbn
ababab - is not a form of anbn

b) For the following given data below draw the following:


i BST(Binary Search Tree)
ii. Min Heap

Data is:

15,3, 6, 18, 5, 9, 11,20,17,7,2,3,14

c) What is a circular queue? Write a program to implements a circular queue'


.....
UNIVERSITY OF THE PUNJAB Roll No.
Fifth Semester 2018

PAPER: Theory of Automata (IT) TIME ALLOWED: 30 minsl',.


Course Code: IT-301 MAX. MARKS: 10 "
Attempt this Paper on this Question Shbet only.
OBJECTIVE TYPE
Question # 01: Choose the correct option. F*101
1) Which one is not true?
a. n a=n an
b. {}={n}
c. A=AAA
d. None of above
2) Minimum number of states in a FA are:
a.0
b. 1
c.2
d.3
3) There is one and only one FA for a languagd:
a. True
b. False
4) Which one is true?
a. iA)*={}*
b. {Ar={^}*
c. Botha&b
d. None ofthe above

s) Regular expression for all strings starting with "ab" and ending with .,bba,, is:
a. aba*b*bba
b. ab (ab )*bba
c. ab (a + b)*bba
d. All ofthe above

6) For I = { a, b } and L: all strings containing "aba" as Substring. Difference of transactions made in
constructing DFA & an equivalent NFA?
a.2
b.3
c.4
d. Can't be determined
7) Valid strings for a language are:
a.Which are over given f
b. Follow the rules of that specifi,c language.
c. Botha&b
d. None of above.
8) For a string "aaaaaa" What is the smallestvalid length? lf t={a, aa, aaa}
a.6
b.2
d.0
9) lf S = { ab, bb } then S* will not contain
a. abbbab
b. bbba
c. bbbbab
d. ababbb
iOl Wtrlctr one is true?
a. All FA's are also NFA
b. All NFA's are also FA
c, Both are true
d. None ofthem
UNIVERSITY OF THE PUNJAB
aaaaaaal,aaaaaaaaaaa

Fifth Semester 2018 : :


Examination: B.S. 4 Years Proeramme ;-....oo.
RolI No. ................"." :
......,

PAPER: Theory of Automata (IT) TIME ALLOWED: 2 hrs. & 30 mins.


Course Code: IT-301 MAX. MARKS: 50

Attempt this Poper on Separate Answer Sheet provided.


SUBJECTIVE TYPE

Question f 02
ls*4]
a) Give Recursive definition of Regular Expressions.

b) Give the definition of CNF and also describe its advantages.

c) Define ambiguity, give an ambiguous gramrnar and also prove it.

d) Give comparison among the power of FA,


ryFA,
pDA NpDA, and Turing Machine.
e) Discuss the difference between the input tdpes of Turing Machine
and post Machine.

Question # 03
[s*6]
a) construct a Turing Machine which will double every,b, ln all inputted string
over { c, d }.
b) Construct a pDA for the language PALINDROME over c, d
{ }.
c) construct MooRE machine (an FA with outPut) which can subtract any two inputted binary
strings.

d) Give the Regular Expression and FA forthe ianguage EVEN EVEN.


e) Write the CFG for the Language EqUAL.
f) Write the Context Sensitive Grammar for larlguage an bn cn; n > 0.
UNIVERSITY OF THE PUNJAB ''... Roll No,
Fifth Semester 2018
Examination: B.S. 4 Years Programme

PAPER: Principles of Management (SS) TIME ALLOWED: 30 mins)...


Course Code: IT-302 MAX. MARKS: 10
Attempt this Paper on this Question Sheet only,
OBJECTIVE TYPE
Q1. Choose the correct Answer. (10x1=10)

1) A --------- uses its own employees to do some work activities and networks of outside suppliers to provide other
needed product components or work processes,
A: Network organization B: Learning organization
C: Virtual organization D: Bound ary-less orga n ization

2)A person needs for internal factors such as self-respect, autonomy, and achievement, and externalfactors such as
status, recognition, and attention are called ------------?
A: Hygiene factors B: Referents
C: Safety needs D: Esteem needs

3) ------------ are any constituencies in the organization's environment that are affected by an organization's
decisions and actions.
spirituality
A: Workplace B: Strong cultures
C: Socialization D: Stakeholders

4) ------------ means that the two merging companies became history and a new firm is established.
A: Acquisition B: Merger
C: Joint Venture D: Both A and B

5) ----------- means the degree to which a job provides substantial freedom, independence, and discretion to the
individual in scheduling work and determining the procedures to be used in carrying it out.
A: Job scope B: Autonomy
C: Task significance D: Both A and B

6) ----------- says that authority comes from the willingness of subordinates to accept it.
A: Employee empowerment B: Decentra lization
C: Acceptance theory of authority D: Both A and C

7) Which element of structure refers to the continuous line of authority that extends from the highest
organizational levels to the lowest and clarifies who reports to whom?
A: Work specialization B: Span of control
C: Centralization D: Unity of command

8) For a manager to control or direct the work of an employee, the manager must have
A: Line authority B: Responsibility
C: Referent power D: Staff authority

3) Which one of the following is not an example


of a lowest level of management?
A: Shift manager B: Supervisor
C: Regional manager
D: Office manager

10) Sofa Makers recently bought an


upholstery firm, Fabulous Fabrics, in an effort to control its inputs by
bc,:qry116t its own supplier. This is an
example of
A: Concentration
B: Vertical integration
C: Horizontal integration
D: Diversification
UNIVERSITY OF THE PUNJAB
aaa a aaa a aaaa aa aaaaaaa a aaa
aa
Fifth Semester 2018
Examination: B.S. 4 Years Prosramme ! RollNo...................... :

PAPER: Principles of Management (SS) TIME ALLOWED:2 hrs. & 30 mins.


urse . I t- MAX. MARKS: 50

Attempt this Paper on Separate Answer Sheet provided

Q2. Give Short Answers. (10x2=20)

1. Explain Management by Objectives with a focus on lT industry?


2. What type of technical skills are required for the managers, explain?
3. Explain Advantages, Limitations of democratic type of leadership with examples?
4. What are the major sources of potentialjob candidates, briefly explain?
5. Describe Henri Fayol's four functions of management?
6. Define SWOT Analysis in detail?
7. Differentiate between organizational goal and strategy with examples?
8. How efficiency and effectiveness vary from each other, explain with examples?
9. Differentiate between:
a. Specific plans and Directional plans

b. Job Description and Job Specification

10. Explain the concept of bounded rationality in the decision making process?

Q3. Give Answers of the following Questions, (3x10=30)

1. Differentiate between planning and controlling process. Mention four advantages and four
limitations of planning?

2. What is meant by environmental scanning? Explain why is it important for managers to


understand the external environmental components?

3. Define motivation? Explain how do goal-setting and reinforcement theories explain employee

m ot ivation ?
UNMRSITY OF THE PUNJAB '''-... RorNo. t..

Fifth Semester 2018 ".. \


Examination: B.S. 4 Years Programme t.'
t..

PAPER: Formal Logic TIME ALLOWED: 30 minsl'..


Course Code: IT-303 NA MAX. MARKS: 10

Attempt this Paper on this Question Shbet only.


OBJECTIVE TYPE
Any overwriting and cutting witl be considered as mistake'

1. Encircle the right one. 10 marks


1. Which of the following sentence can be a proposition?
a. It is raining.
b. Get out from the class.
2. Strong / Weakness is a attribute of
a. Proposition
b. Argument
3. If E is frue then I is
a. True
b. False
c. Undetermined
4. What is the Obversion of "Some S is not-P"?
L, Some S is not non-P.
b. Some S is non-P.
c. Some S is non not - P.
5. The Symbol v means
Disjunction
^.
b. Conditional
6. If I is tue then A is
a. True
b. False
c. Undetermined
7. If A is hte then l is
a. True
b. tr'alse
c. Undetermined
8. Minor term means
a. Subject ofthe conclusion
b. hedicate of the conclusion
9. Cogency is an attribute of
a. Deduction
b. Induction
c. Syllogism
10. What is Contaposition of All S is P?
a. Some non-P is not non- S.
b. All non-P is non-S.
UNIVERSITY OF THE PTNJAB
Fifth Semester 2018
Examination: B.S. 4 Years Prosramme

PAPER: Formal Logic TIME ALLOWED:2 hrs. & 30 mins.


Course Code: IT-303 NA IvtAX. MARKS:50

Attempt this Paper on Separate Answer Sheet provided.


SUBJECTIVE TYPE
2. Answer the following: 20 marla

a. Define Rule of Inference.


b. Draw Traditional Square of Opposition.
c. Define Contradiction, Contrary, and Sub-alternation.
. d. Define Conversion.
e. Enumerate rule of distribution
f. Why imperatives, exclamation is not proposition.
g. Define minor term.
h. Draw four figures of the Categorical Syllogism.
i. Explain Argument
j. Define Soundness of the Argument.

3. Use Yenn diagram to determine the validity of the following syllogism. And also apply fallacy
if commit. 10 marks

a. EIO-2
b. AAA-3
c. AOO-l
d. EAE.2
e. OOO-4

4. Symbolize the following statements: 10 marks

a. New Zealand does not have nuclear weapons.


b. Either Poland or Ireland outlaws abortion.
c. Scotland declares independence only ifEngland reduces Imports.
d. Greenland's protecting its fishing rights, implies that Iceland will not repays its debt.
e. Hungary adopts political reforms if, either Romania fleezes wages or Bulgaria broadens
services.
L Neither Sweden nor Norway reduces deficit spending.
g. If Canada's creating jobs then, if the United States raises taxes, then Mexico stabilizes its
currency
h. Either Guatemala does not end its civil war or, if Honduras does not reduces poverty then
so does Nicaragua.
i. If either the House and the Senate vote against it or the president vetoes it, the bill will
fail.
j. Abortion is exactly not the sarne as murder.

5. Deline deductive argument? Discuss kinds of argument with example. 10 marla


UNMRSITY OF TIrE PUNJAB "--. Ror No.
Fifth Semester 2018
Examination: B.S. 4 Years Programme

PAPER: Database Systems (CMP) TIME ALLOWED: 30 mins)'.


Course Code: lT-304 MAX. MARKS: 10
Attempt this Paper on this Question Sheet only.
QI: Choose the corrcct option. OBJECTM TYPE
1. Which of the following may contain null values
a. Super Key
b. Alternate Key
c. Candidate Key
d. Foreign Key
e. All of above

2. lf every times we get 'Lahore' as a city name against caty code '042'then Database is
a. Consistent
b. Neither Consistent nor lntegral
c. Consistent but not lntegral
d. Not Consistent But lntegral
e. lntegral

3. Which of the followang is result of Redundancy


a. lncrease Size
b. lnefficient Database
c. Fast Update but Slow Retrieval
d. Consistency
e. All of above

4. The main user of Metadata is


a. Programmer
b. Application Software
c. DBMS
d. Operating System
e. None of above
5. Updates that violate are disallowed.
a) lntegrity constraints
b) Transaction control
c) Authorization
d) DDL constraints
6. A relation is in if an attribute of a composite key is dependent on an attribute
of other composite key.
a) 2NF
b) 3NF
c) BCNF
d) 1NF
7. The functional dependenry ca n be tested easily on the materia lized view, using the
constraints _.
a) Primary key
b) Null
c) Unique
d) Both Null and Unique
8. Aggregate functions can be used in the select list or the clause of a select statement
or subquery. They cannot be used in a cla use.
a) Where, having
b) Having, where
c) Group by, having
d) Group by, where
9. Su bqueries can not:
a) Use group by or group functions
b) Retrieve data from a table different from the one in the outer query
c) loin tables
d) Appear in select, update, delete, insert statements.
10. operator is used for appending two strings.
a) &
bl%
c) I I

d) _
UNIVERSITY OF THE PUNJAB
aaaaaaa
aa
Fifth Semester 2018 a.

Examination: B.S. 4 Years Programme ! RorNo...................... f:


.........,.

PAPER: Database Systems (CMP) TIME ALLOWED:2 hrs. & 30 mins.


Course Code: IT-304 MAX. MARI(S:50

Attempt thk Paper on Separate Answer Sheet provided.


SUBJECTIVE TYPE

Q2: Answer the following short questions. (03 * 5: 15)

L What is the purpose of Backup and Recovery?


2. Define Candidate Key?
3. Explain SelfJoin?
4. What is Security in database?
5. Differentiate between consistency and integrity.

Q3:Normalize the following table up to 3rd Normal form but step by step show each
intermediate resultant table with its data. (05 Marks)

Branch Staff

BID Address Tel stD Sname Salary ctD CName Tel

B1 PU OId 042- S1 Furqan 45,000 C1 PUCIT 1 1 1-923-


Campus 5763456 923
S2 Madiha 20,000 c2 PUCAD
042-
s3 Tehseen 38.000 cl PUCIT 9258796

1 't
1-923-
923

82 PU New 042- S4 Maria 46,000 c1 Math o42-


Campus 6345678 Dept. 9254361
S5 Muzahir 50,000 c2
Phv 042-
S6 F aiza 34.000 c3 Dept 9200921

Eng. 111-921-
Dept 921

I BID: Branch ldentification Code QStaff ldentifi cation Code

SName: Staff name CID: Client ldentification Code

CName: Client name


P.T.O.
(Long Questions)

Q4: Draw E-R Diagram for following scenario' (10 Marks)

Student can appear in the exam. Question Paper only contains MCQs but having
variation ofoptions and also there is a variation ofcorrect number ofoptions in one
question. Different Questions may contain different marks and some of them may
have negative marking. System Calculates the student Results and student can
review there incorrect questions with their correct answers. System can also
maintain the history of Personal information for our students.

Q5: Write SQL Queries for thc given statements: (20 Marks)

a) Show Emp name salary of those employees working in LHR and working in finance
and having salary less than the average salary of all employees.
b) Find ename and salary of those employees getting salary less than the average salary
of any department.
c) Find the total numbers of employees department wise.
d) Show emp-name of those employees whose getting salary more than smith and less
than lara.
e) Show ename salary of employees working in Jordan department but getting salary
more than lordsan

Emp ID Emp Name Dept ID Salary Deptno


0l John 0t 20000 l0
02 Smith 0l 20000 10
03 Lee 02 12000 l0
04 Sam 03 12000 10
05 Jordan 03 70000 20
06 Lara 04 50000 20
07 Adam 02 60000 30
08 Michel 0l 80000 30
09 Andrew 03 s0000 30

Deptno Deptname Location


10 tr'inance LHR
20 Accounts ISL
30 IT KHI
....
UNIVERSITY OF THE PUNJAB Roll No.
Fifth Semester 2018

PAPER: Operating Systems (CMP) TIME ALLOWED: 30 minsl'.


Course Code: IT-306 MAX. MARKS: 10
Attempt this Paper on this Qucstion Sheet only
OBJECTIVE TYPE
Part-l

Select the best option for the following multiple choice questions. t10l

1. What is operating system?


a) collection of programs that manages hardware resources
b) system service provider to the application programs
c) link to interface the hardware and application programs
d) all of the mentioned

2. To access the services of operating system, the interface is provided by the


a ) system calls
b)APr
c) library
d) assembly instructions

3. Which one of the following is not true?


a) kernel is the program that constitutes the central core of the operating system
b) kernel is the first part of operating system to load into memory during booting
c) kernel is made of various modules which cannot be loaded in running operating system
d) kernel remains in the memory during the entire computer session

4. ln operatinB system, each process has its own


a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned

5. A process stack does not contain


a) function parameters
b) local va ria bles
c) return addresses
d) PID of child process

6. Which module gives control of the CPU to the process selected by the short-term scheduler?
a) dispatcher
b) interrupt
c) scheduler
d) none of the mentioned
P.T.O.
7. Spinlocks are :

a) CPU cycles wasting locks over critical sections of programs


b) locks that avoid time wastage in context switches
c) locks that work better on multiprocessor systems
d) All of these

8. The number of resources requested by a process :

a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system

9. Deadlock prevention is a set of methods :

a) to ensure that at least one of the necessary conditions cannot hold


b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock

10. lf one thread opens a file with read privileges then


a) other threads in the another process can also read from that file
b) other threads in the same process can also read from that file
c) any other thread cannot read from that file
d) all of the mentioned
UNIVERSITY OF TIIE PUNJAB
aaaaaataaa!a

Fifth Semester 2018


Examination: B.S. 4 Years Proeramme ita tRoIINo......................
aa aaa ooo oao oa a'
o a
:
loa a aa

PAPER: Operating Systems (CMP) TIME ALLOWED: 2 hrs. & 30 mins.


Course Code: IT- MAX.IVIARI(S:50

Attempt this Paper on Separate Answer Sheet provided.

Part-ll

A very short answer is required for each of the following questions. [10x2=20]
1. Which system call is used to create a process in UNIX?
2. How hardware devices use the functionality of an operating system?
3. What is meant by CPu-protection?
4. What is meant by dual-mode operation?
5. What is the function of ready queue?
5. What is the difference between Long Term Scheduler and Short Term Scheduler?
7. ln which memory management technique process can be divided into equal parts?
8. ln which memory management technique, system suffers from External Fragmentation?
9. What is meant by critical section?
10. What is meant by race condition?

part -Il
Answer the following questions briefly.
[6xs=30]
1. Explain five states process model.
2. What are the different multithreading models?
3. Name the different techniques used for process synch ronization.
4. What are the necessary conditions for the deadlock to exist?
5. Determine the system state for the following resource allocation state by using Banker's
algorithm.
Allocation Max Available
A 8CD ABCD ABCD
PO 2707 5163 3181
P1 25LL 4832
P2 0101 0207
P3 0227 0225
P4 3110 9180
P5 oL22 ot77

6. Consider a computer system with a 24-bit logical address space and with 2 KB page size.
Suppose that the maximum physical memory size is 54 MB, and the system is byte-addressa ble.
Let paging be implemented for the system. Give answer to following five questions:
a. How many bits for p and d are there in the logical address?
b. How many.pages are there in the process?
c. How many frames are there in the memory?
d. What is the size of the page table if one entry in the page table is of 4 bytes?
e. How many levels of paging will be required for the above scenario?
....
UNIVERSITY OF THE PUNJAB Roll No.
Fifth Semester 2018
Examination: B.S. 4 Years Prosramme \\
PAPER: Object Oriented Analysis and Design TIME ALLOWED: 30 mins)'.
Course Code: IT-307 MAX. MARKS: 10
Attempt this Paper on this Question Sh'eet only.
OBJECTIVE TYPE
Q1: Choose the correct Answer. (10*1 = 10)

1) Abstraction is classified into types


A)4 B)3
c)2 D)1

2) A Class diagram shows relationship between/among


A) Classes B) lnterfaces
C) Organizatio n D) None of them

3) What is the programming style of the object oriented conceptual model?


. A) lnvariant relationship B) Algorithms

C) Classes and objects D) Goals, often expressed in a predicate calculus

4) 9) .._-is the property that distinguishes an active object from one that is not active.
a) Persistence b) Typing
c) Aggregation d) Concurrency

5) Single inheritance, multiple inheritance, and Aggregation comes under


a) Modularity b) Typing
c) Hierarchy d) None of the mentioned

6) what is that concept in type theory in which a single name may denote objects of many
different classes that are related by some common super class referred to
a) Homomorphism b) Type Checking
c) Polymorphism d) Generalization

7) Superclass represenls abstractions


a)Generalizedabstractions b)Specializationabstractions
c) Both d) None of the mentioned
8) ln which of the following mechanisms, types of all variables and expressions are not known
until runtime
a) Strong typing b) Weak Typing
c) Static Binding/ early binding d) Dynamic Binding/ late binding
9) The method of design encompassing the process of object oriented decomposition and a
notation for depicting both logical and physical and as well as static and dynamic models of the
system under design is known as:
a) Object- Oriented Programming b) Object- Oriented Design
c) Object- Oriented Analysis d) None of the mentioned
10) During analysis an architect is concerned about

a) Technology b) deployment

c) lmplementation d) behaviora I
UNIVERSITY OF' THE PUNJAB
a aaaa a aa aataaa ata
aoaaaoaaa
aa
Fifth Semester 2018
Examination: B.S. 4 Years Prosramme !o.....o
Rotl No. .....................
.....,
:

PAPER: Object Oriented Analysis and Design TIME ALLOWED:2 hrs. & 30 mins.
Course Code: IT-307 MAX. MARKS: 50
Attempt this Paper on Separate Answer Sheet provided.
SUBJECTIVE TYPE

Q2: Give short answers (5*4=20)

1) Define aggregation and composition with examples.


2) Differentiate between linear and iterative process modeling approaches with examples.
3) Differentiate between Software verification & software validation.
4) What is waterfall SDLC?
5) Define prototype. Give the types of prototype.

Q3: Give answers to the following questions. (3*10=30)

1) Write a detailed note on Encapsulation, inheritance, polymorphism and abstraction


2) Define use-case, class diagram and object diagram. Make their diagrams with respect to
School management system which should handle attendance, time-in, time-out, student &
teachers list, results and yearly report.
3) What is inheritance? Write a detailed note on types of inheritance, give two examples foe
each type.
T]NTYERSITY OF THE PUNJAB aaaaaaaa.aa
a aaa aaaaaaaaaa
Sixth Semester - 2018 aa
.a
!ta aaa
RouNo......................
aa
aa aa aaa
aa aa. ao o'
aa
:
o

PAPER: Internet Programming (IT) TIME ALLOIYED: 2 Hrs. & 45 Mints.


Course Code: IT-308 Part-II MAX.MARKS:50
Attempt this Paper on Separate Answer Sheet provided.

Question # 2, [2 x 10 = 20 Marks]
Precisely write down the answers of the following questions.

1. What is the purpose of threading?


2, What is difference between static and constant variable in java?
3. Why does java allow multiple inheritance between interfaces but not between classes?
4. ln event handling, what is the purpose of KeyListener interface?
5, Write down a life cycle of java servlets.
6. What is the purpose of packages?
7. What is the purpose of Statement object in JDBC?
8. ln CSS, how can we apply style to the components?
9. What does JDBC, HTML, CSS and JSP stands for?
1O. How can we achieve polymorphism in java?

Question # 3. [3 x 10 = 30 Marks]
Briefly write down the answers of the following questions.

1. A client wants to send a request to server for reversing a string. So, you have to make a server-
client application, in which client sends a string to the server and server resends it after
reversing the string. (Do your task with serialization method in which either you can use built-in
class String or make your own string class).

2. Write a JSP page, which will dynamically create a drop down list with all smartphones along with
their company saved in data base.
DB Name: Dotobose
Table name: Smortphone(model (vorChor(15)), compony(varChar(15)))

3. Write a program in which a thread will be created. This thread will take a positive nurnber as
input from main thread and display all number from 0 to that number.
UNIVERSITY OF THE PUNJAB
Sixth Semester - 2018 '...Roll No.
Examination: B.S. 4 years proqramme

PAPER: Internet Programming (IT) TIME ALLO\MED: 15 Mints.


Course Code: IT-308 part- I (Com ulso MA)L MARKS: l0

back after exoi of time limit mentioned above.

Question fi 1.
Evaluate the statement and write down [Marks: 1x 10 = 1Ol
the correct option number.

1. Every program has at least


number of thread/s.
a. 1
b.2 --
c. tt is not compulsory that every program has at least any
number of thread/s
d. None of these
2. Which of the following is a valid declaration
of an object of class Box?
a. new Box obj;
b. obj = new Box0.
c. Box obj = new Box0;
d. Box obj = new Box;

3. On pressing OK button, prompt box


returns value.
a. messate written in text box
b. null
c. prompt box is not a type of pop up box
d. none of above
4. Which ofthese cannot be declared static?
a. Class
b. Object
c. Variabie
d. Method
5. Init frunction of a servlet will be called
only
a. 1 -- times in a life cycle of servlet.

b.2
c. Multiple
d. None of the above
6. Finalize method is in java.
a. a destructor --
b. a garbage collector
c. called before destroying the objects
d. called after destroying the objects
7. There a this reference in static methods-
a. exists--
b. does not exist

8. lf we uses get method technique, then


the data wjll be sent through
a. body of request
b. url
c. botha&b
d. none of these
9. Which keyword is used by method
to refer to the object that invoked it?
a. import
b. catch
c. abstract
d. this
10. What will be the output of the program?
public class Foo{
public static void main(string
U argsX
tryi
return;
]
Finalty{
System.out.println(,,Finally,,);
]
)
]
a, Fina lly
b. Compilation fails
c. The code runs with no output
d. An exception is thrown at runtinte
TINIVERSITY OF THE PT]NJAB
aaa a a a aaaaaa aa
Sixth Semester - 2018 aaaaaaaaaaaa
ao
aa
Examination: B.S. 4 Years Proeramme
!laaaaaaa
Ro[ No. .....................
aaaaoootaoo
:

PAPER: Computer Networks (CIUP) TIME ALLOWED: 2 Hrs. & 45 Mints.


Course Code: IT-309 Part - II MAX MARKS: 50
Attempt this Paper on Separate Answer Sheet provided.

Question No 2: Give the short answers of the following short Questions? [2x1O=2O]
1: What is the size in Bytes of PORT address?

2: Which layer is responsibie for the delivcry of data from one process to another?
3: Which topology is the ideal one for point to polnt networks?

4: The attenuation of a signal is -10 Db. What is the final signal power if it was originally 5 Watt?
5: Calculate the bit rate for the baud rate of 1oo0 baud under 8-PSK modulation?
6: How many bits can be transmitted in 1 sec if 10 bits can be transmitted in 0 1 ms?
7: What are the three types of decision taken by a bridge for an incoming frame?
g: using 4 bit sequence number, what is the maximum size of the send and receive windows for
a
each of the following Protocol:
Selective RePeat ARQ
Go-Back-N ARQ

9: What is the type of the following MAC destination addresses?


i.5E:30:10:21:10:14
ii, FF:FF:FF:FF:FF:FF

10: How the hop by hop choke packets approach is better than the other choke packets approach
(affect only the sou rce)?

Question No 3: Give the answers of the following Questions? [5x5=3O]

(1) Discuss three transmission Impairments?

(2) Encode the bit stream O1OO11O1 into digital signal with the following encoding schemes?
NRZ.L
Ma nchester
Differential Manchester
(3) The code 11010101101 was received. Using the Hamrning encoding algorithm, what as the
original code sent?

protoco '
(4) Two nodes (assume'A'rs sender and'B'is receiver) use a sliding window.(go- back-N )
window positions for the iollowing succession of events: (Assume that
Show the sender and receiver
sender window size is 4)
a) Before 'A' sends any frame.
U) efter'A' sends frame 0, !, 2 and receives acknowledgement from 'B'.for 0 and 1
cj efter'A'sends frames i, +, and 5 and'B'acknowledges 3, and 4 and the ACK of 4 is lost
whereas ACK of 3 is received bY'A'.
(5) Determine the level of sensitivity ('High'or'Low') of each application in the following table for
given parameters.

File shari
Web access
Audio on demand
Video conferencin

(6) From the following network find the shortest path from 'A' to all destinations using Dijkstra's
Algorithm.
T]NIVERSITY OF THE PUNJAB
Sixth Semester - 2018 Roll No.

PAPER: Computer Networks (CMp) TIME ALLOWED: 15 Mints.


Course Code: IT-309 Part - I (Co MA)L MARKS: 10

uestion Sheet onbv.

Question No 1: Multiple Choice Questions [1x1O=1o]


1. When data and acknowledgement are sent on the same frame,this is called
a) Back packing b) Piggybacking
c) Pigqypacking d) A good idea
2. If a sine wave completes one cycle in 7 seconds. what is its frequency?
a) 1.14 HZ b) o.14 HZ
c) o.zs HZ d) t.zs Hz
3. In the protocol we avoid unnecessary transmission by sending only frames that are
corrupted.
a) Stop and Walt b) Go-Back-N
c) Selective Repeat d) none

4. In an optical fiber, the inner core is --------than cladding


a)More dense b)Less dense
c)Equally dense d)N one of above

5. Which cf the 1'ollowing is not a digital-to-analog conversion?


a) ASK b) PSK
c) FSK d) AM

6. _ encoding has a transition at the middle of each bit.


a) RZ b) Manchester
c) Differential Manchester d) Au

7. To solve the looping problem, bridges on LAN use the algorithm, to create a loop
less topology,
a) Dijkstra's b) Distance Vector
c) Spanning tree d) none

8. In _ switching, there is no resource allocation for a packet.


a) datagram b) virtual circu it
c) message d) circuit

9. Which multiplexing technique transmit Digital signal.


a)FDM b)TDM
c)WDM d )None of a bove

10, In data communication ,ATM is acronym for __


a)AutomatedTelierMachine, Ullrto-atl.ftansmissionModel.
c)Asynchronous Transfer Mode. d)Asynchronous Telecommunication Method.
UNTVERSITY OF THE PTINJAB
aa a a aaaa aa a a aaa a a aaaa
oa a a
ra
Sixth Semester - 2018
Examlnation: B.S. 4 Years ::
!toloooooooooa
RollNo...................... :
aaaaa ooooo' aa

PAPER: Information Systems (IT) TIME ALLOWED:2 Hrs. & 45 Min.


Course Code: m'311 Part - II MA)L MARKS:50
Attempt this Paper on Separate Answer Sheet provided.

Question # 2. [2 x 10 = 20 Marks]
Precisely write down the answers of the following questions.

1. "To achieve the objectives of lnformation Technology, firm must be able to implement new
technology effectively". Now what are the problems in adrieving the objectives?
2. Define information system w.r,t functional perspective.
3. Define the following terms
a. P rocess
b. Knowledge
4. Differentiate lower and higher productivity.
5. What are the risks involved in utilizing information systems?
6. What is meant by customer relationship management?
7. Describe the stages of innovation based model of lnformation system implementation?
8. What are the management issues in information technology?
9. What is meant by forecasting?
10. What are the common type of issues in an organization?

Question # 3. [3 x 10 = 30 Marks]
Briefly write down the answers of thl following questions.

1. Write a brief explanation about business information systems.


2. What are the benefits of strategic management? Also explain the process of strategic
management.
3. Briefly describe the global challenges in information systems.
UNTYERSITY OF' TIIE PT]NJAB
Sirth Semester - 2018 '.. RollNo.
Eramination: B.S. 4 Years
\
PAPER: Informafion Systems (fI) TIME ALLOWED: 15 Min. '...
Course Code: IT-311 Part- I (Compulsory) MAX MARKS: 10 '..
uestion Sheet onlv.
Please encircle the colrect ootion. Each MCO csrries I Merk Thls Paper will be co[ected
back after ernilv of 6me limit mentioned above.

Question # 1. [Marks:1r19=101
Evaluate the statement and write down the correct option number.

1. Cooperation between business manaBers and lS personnel is the key to the potential of
any new or modified system.
a. Unlocking
b. Locking
c. Botha&b
d. None of these
2. tf is not accurate or complete - People can make poor decisions.
a..lnformation
b. Expenditure
c. Profit
d. None of these
3. Valuable Can help manaBers decide whether to invest in additional information systems
and tech nology.
a. Sou rces
b. Things
c. lnformation
d. None of these
4. mechanism - The component that helps organizations achieve their goals, such as
increasing profits or improving customer service.
a. lnput
b. Output
c. Feedback
d. None of these
5. World's largest computer network is known as
a. Skype
b. lnternet
c. Whatsapp
d. None of these

(P.r.o.)
6. __ management systems - Organized collection of people, procedures, software, databases,
and devices.
a. lnformation
b. Knowledge
c. Artif icial
d. None of these

7, Systems analysis - Defines problems and opportunities of the _ system.


a. New
b. Existing
c. Currently
d. None of these
8. Technology model - Specifies factors that can lead to higher acceptance and usage of
technology
a. -
Accepta nce
b. Repentance
c. Both a and b
d. None of these
9. People who create, use, and disseminate knowledge are known as _.
a. lT Experts
b. Knowledge Workers
c. Both a and b
d. None of these
10. Long range forecast is usually greater than 2 years.
a. Less than 2 years
b. More than 2 years
c. ln between 1-4 years
d. None of these
UNIVERSITY OF THE PUNJAB
aaaa ar aa aaaaaaaaaaa aaaaa
Sixth Semester - 2018 aa
aa

! oonouNo. .....................
oa aoaa aoooaoaa
:
o ooaa aa a al
PAPER: Linear Algebra (MA) TIME ALLOWED:2 Hrs. & 45 Mints.
Course Code: IT-312 Part - II MAX MARKS: 50
Attempt this Paper on Separate Answer Sheet provided.

Q. 2 SHORT QUESTIONS (4x5 = 20 Marks)

(i) Determine the values of a for which the system of linear equations has no solution, exactly one
solution and infinitely many solutions.
x+\t+Jz=-7
2x+3tt-r17z=-16
x +21t + (s2 + l)z = 3cr.
(ii) la' + b'
c

Prove that II l,: ,.r.


t; t . ),tht
(:

(iii) Show that the vectors (1,-2),and (3,-5) span the vector space IR'
(iv) Defjne 'I : ^li
r+ .Rr by 7'(_r,,xr,x.,) = (-_r.,,x,,x, + _r"). f ind N(7'). rs 7'one-to-one?
(v) [o I -rl
Show that the matrix | :i --l 4 | rs involutery
I

[: -3 4 I

sEcTtoN-ilt
LONG QUESTIONS (6x5 = 30 Marks)

Q.3 ff Aand Sare 3x3matricessuchthat det(Az83)=l08and det(r\3B'?S=T2thenfind


det(.2A) and det(B
r).

Q.4
Findthereal orthogonal matrix Pfor which J'-tAPisorthogonal,urr,"r" y'=[i jl
l
Q.s .l 2 _,.l
lf possible, find the inverse of the matrix
| 0 -2 0
l-z -2 rl
|

Q.6 Show that any finite dimensional vector space contains a basis.
Q.7 Determine whether or not the given set of vectors is a basrs of lR'

{(r,
z, -r ),(0,:, r), (r, -s, 3)}
TJNTVERSITY OF THE PUNJAB
Sixth Semester - 2018 . Roll No.

\
PAPER: Linear Algebra (MA) TIME ALLOWED: 15 Mints.
Course Code: IT-312 Part- I (Comnulso MAX. MARKS:10

q. 1 MCes (1x10 = 1o Marks)

(i) rhc set S = {(1,2),(2,3),,(0,0)}oivectors in R2 is ----------


(a) linearll,independcnt (b) linearly dependenr (c) l-rasis ot' /ir (d ) None ol these
(ii) Thc basis ol rrivial subsPace,{ = is
t0}
tnt {o} (b) {t} (") { } (rt)Noneof these

(iii) ll ,4 is a rrratrix of order 3 x 3 and de(,,1) -- -2 , then the value of det(31) is --------

(a) -24 (b) -6 (c) -2t (d) -54


(iv) A systenr ol' nr hornogcncous lincar equations lx :0 in n valiat:lcs lras a non-tr-ivial solLriiort ilantl
only i{'the larrk of I is ----------
(a) equal to r (b) less than 17 (c) greater [o /] (d) Nore o1' these
(v) '['fre
strbspace of /?i spanrred b1, the vector' (a, b, c) is ----------

(a) .r = /. -- fi1, 7 -. 1;1


.1,, tb).t, rl..y -l'r,: - -,i
(c) .i' .. cr1. .1: = fi1,3 -- x1 ( ci) Norte ol'thcs,.:
(vi) 'l-hc propertl, V a, be R tlren a.t beR is calted

(a) Associetive propet'ty (b) Tl ansitive property


(c) C Ios Lrre property (d) None of these
(vii) A lirreal tt'ans lolrnRtion T :I i --> I/ is one-to-onc ilant] orrly il----------
(a) N(r): {0} (b) N(7 )+ {0} (c) (l} (d) N(r)=- [-r]
(viii) ^/(r)=
Let Rr be the vector space of all ordeled triples ofreal nunrbels.'[hen the trarrsfornration -f : Ri -+ 1?r
defiuecl by 7'(x,y,z) = (,',-,';,,0) it
a) [-, in ear b) Not L inear' c) Ilational rl) None of thesc
(ix) 'flrc tlirrcnsiult ol lierT is calleil
(a) Iiarri, (b)NLrllirl, (c) basi. (ri)] nt,nc li lltcsc
(x) (1 0)
llr.'ilt;r:;rel,er.isticl)()I\'l)ol]lialofrhctttit1ttr is...... ... . ..

(a) p(l) -= (t - Dt (b) p(l-) - (2 )-)(. )- / I

(.c1
1\)t -. | (d) Nonc ot-ilri.sc
TINIVERSITY OF THE PUNJAB
aa a a aaaa aaaa aaaaaaaaaaaoaa
Sixth Semester - 2018 aa
aa
Examination: B.S. 4 Years Prosramme
ItoaRott
t
No. .....................
ao aaaaaa aao
:
aa aa o ooa o oo

PAPER: Introduction to Psychology (HM) TIME AILOWED: 2 Hrs. & 45 Mints.


Course Code: IT-313 Part - tr MA)L MI,RKS: 50
Attempt this Paper on Separate Answer Sheet provided.

Question - 2:
Short Questions (2 Marks X l0 Question :20 Marks)

[. Define Ctinical Psychology?


It. What is meant by Personality?
Ill. Name the stages olSurvey'?
IV. Differentiate between rn ind and brain?
V. What is rneant by Motivated Forgetting?
VI. Draw the diagrarn of Ear?
VII. Difl'erentiate betwecn perception and illusion.
Vlll. Dilferentiate berween S I-N{ and LTM.
IX. Dcfine I ntelligence?
X. [{ow will you explain figure-ground relationllip?

Question - 3:
Long Questions (10 Marks X 3 Question :30 Marks)

I. Write a detailed note on Central Nervous Svstem?

lt. l:xplain in detail the "l)sychodynanric Theory" o1'silnruncl lrreud'?

III. Detine "Hypnotisrr". Discuss the application of Hylnotism in medical.


UNIVERSITY OF THE PUNJAB
Sixth Semester - 2018 . RollNo.
Examination: B.S. 4 Years Prosramme
\
PAPER: Introduction to Psychology (HM) TIME ALLOWED: 15 Mints.
Qqqrse Code: IT-313 Part - I (Compulsory) MAX. MARKS: 10

Attemnt this Paoer on this uestion Sheet onlv.

Question - 1: MCQ's (l Mark X l0 Questions = l0 Marks)

I. Who fbcused on Psychology as the science of Consciousness :


(a) William Wundt (b)
Sigmund Freud
(c) J. B. Watson (d)
Carl Rogers
2. A tube likc structure that carries the neural message to othel cells:
(a) Neuron (b)
Soura
(c) Giial (d) Axon
3. Our episodic rrerror\/ consists of':
(a) Dducational events (b) Econornical events
(c) All important lit'c events (d) None f these
o

4. Variables that are resrrlt ol introdLrced stiinuli in the experitnental method are :
(a) The Independent Variable (b) Tlre Depencient Variables
(c) Both & (a) (b) (d) None ol'these
5. Who presented thcory ol'Social Learnirrg?
(a) AlbertBandura (b) Wilhelrn Wundt
(c) Ivan Pavlov (d) Roger Wolcott
6. psychoanalysis is a nreathod of searching a person's:
(a) Conscious Memories (b) UnconsciousMemories
(c) [,atent Mernories (d) None of them

7. whole is the greater than the sum of parts is the key point of
(r) Cognitive School of thotLght (b) ["unct ionalisrn
(") Behaviorisur (d) Getatt School ofthought
8 tl.U. -l'itchencr used the n.relhod ol':
(a) Fu nctiorr alisnt (b) lnttospcct iott
(c) Observation (d) C linical Methocl

9. Sleep walking rnurder cases occurred to date:


(a) 65 (b) 69
(c) 68 (d) 61

10. Who opened the first psychology Iab at the ttniversity ol l,eipzig?
(a) Wilhelnt Wurtdt (b) ts.F Sirtncr
(c) lvan Pavlov (d) E.B. Titchener
UNIVERSITY OF THE PI]NJAB
Sixth Semester - 2018 ."""""""""""".
Examination: B.S. 4 Years Proeramme ! RouNo. ..................... :

PAPER: Introduction to Sociology (SS) TIME ALLOWED:2 Hn. & 45 Mints.


Course Code: IT-314 Part - II MAX. MARKS:50
Attempt this Paper on Separate Answer Sheet provided.

Question - 2:
Short Questions (5 Marks X 4 Question = 20 Marks)

I. Define research. Differentiate between socialand scientific research.


It. Explain briefl1- the conflict theory of Karl Marx.
III. fixplain the fbrnral & intblrnal rleans ofsocial control.
1V. What is social intelaction? DiscLrss the various types of social interaction

Question - 3:
Long Questions (10 Marks X 3 Question :30 Marks)

l. Define rhc terrn sociology.'? Sociology is the scientilic study of lrLrrnan relationship &
interaction elaborate

II. Define the term "Soc ia lizat ion". DiscLrss the dilferent Agents ol'Socialization n

detail.

lll. Terrorism has becotne a real anrl potential threat to global peace and stability' What
ro,c social scientist can play to cornbat tlreir problem?
UMVERSITY OF THE PT]NJAB
Sirth Semester - 2018 ..Roll No.

\
PAPER: Introduction to Sociology (SS) TIME ALLOWED: 15 Mints.
Qourse Code: IT-314 Part - I (Compulsory) MAX. MARKS: 10

uestion Sheet onlv.

Question - l: MCQ's (l ilrark X l0 euesrions = l0 Marks)

I . Survey means:
(a) Overlooking (b) Observation
(c) Organizing social data (d) None ofthese

2. A stin.rrrlus responsc condition between two persons is called :


(a) [ixchange (b) Dialogue
(c) Interaction (d) None of these
3. When two or tnore persons interact with each other.they form.,
(a) Conrmun ity (b) Croup
(c) Society (d) None ofthese

4. A Socially accepted behavior is called:


(a) Fo lkway (b) Social Nornr
(c) More (d) None of these

5. Who can be taker as early pure sociology among the sooial thinkers?
(a) Auguste comte (b) lbSn_e-khuldun
(c) Durkheim (d) None ofthese

6. Who called sociology "social Physics,,


(a) Wilfrcd (b) Auguste comte
(c) I-{er-bet Spencer (d) None of these

7. Whr: said ntan is a social aninial:


(a) A rist ot le (b) P lato
(c) Soc ratcs (d ) o l' trese
^*one
8. Max Wcber focused on the idea of:
(a) Communism (b) Symbolic interactionism
(c) Functionalisnr (d) None of these

9. Sociotogy originated as a separate discipline tn:


(a) 1836 (b) 1837
(c) l8l3 (tl) None of these
l0.who used the arralogy of living organisrr lor soc iety"
(a) N4ax weber (b) c w. Mill
(c) Auguste Cornete (d) Flerbert spence r

You might also like