[go: up one dir, main page]

0% found this document useful (1 vote)
701 views28 pages

91 Computer Science

The document discusses object oriented programming concepts in C++. It contains code snippets of classes, functions and inheritance. Questions related to class definitions, functions, inheritance, access specifiers, constructors and destructor are asked.

Uploaded by

Aravind Shankar
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 (1 vote)
701 views28 pages

91 Computer Science

The document discusses object oriented programming concepts in C++. It contains code snippets of classes, functions and inheritance. Questions related to class definitions, functions, inheritance, access specifiers, constructors and destructor are asked.

Uploaded by

Aravind Shankar
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/ 28

SET-4

Series BVM/C Code No. 91


Candidates must write the Code on the
Roll No.
title page of the answer-book.

 Please check that this question paper contains 28 printed pages.


 Code number given on the right hand side of the question paper should be
written on the title page of the answer-book by the candidate.
 Please check that this question paper contains 7 questions.
 Please write down the Serial Number of the question before
attempting it.
 15 minute time has been allotted to read this question paper. The question
paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the
students will read the question paper only and will not write any answer on the
answer-book during this period.

COMPUTER SCIENCE

Time allowed : 3 hours Maximum Marks : 70

General Instructions :
(i) SECTION A refers to programming language C++.
(ii) SECTION B refers to programming language Python.
(iii) SECTION C is compulsory for all.
(iv) Answer either SECTION A or SECTION B.
(v) It is compulsory to mention on the page 1 in the answer-book whether you
are attempting SECTION A or SECTION B.
(vi) All questions are compulsory within each section.
(vii) Questions 2(b), 2(d), 3 and 4 have internal choices.

91 1 P.T.O.
SECTION A
[Only for candidates, who opted for C++]
1. (a) Which of the following are valid operators in C++ :
(i) +=
(ii) not
(iii) = /
(iv) &&
(v) 
(vi) = =
(vii) ++
(viii) and 2
(b) Write the names of the correct header files, which must be included
to compile the code successfully : 1
void main()
{
char S1[20]="CS", S2[20]="2018";
strcat(S1,S2);
cout<< S1;
}
(c) Rewrite the following C++ program after removing any/all
syntactical error(s). Underline each correction done in the code : 2
Note : Assume all required header files are already included in the
program.
#define Volume(L,B,H) = L*B*H
structure Cube
{
int Length,Breadth,Height;
};
void main()
{
Cube C = [10,15,20];
cout<<Volume(Length,Breadth,Height);
}
(d) Find and write the output of the following C++ program code : 2
Note : Assume all required header files are already included in the
program.
void Convert(char *P1, char *P2)
{
char *Q;
Q=P2;
P2=P1;
P1=Q;
cout<<P1<<"*"<<P2<<endl;
}
void main()
{
char S1[]="One", S2[]="Two";
Convert(S1,S2);
cout<<S1<<"&"<<S2<<endl;
}
91 2
(e) Find and write the output of the following C++ program code : 3
Note : Assume all required header files are already included in the
program.
void Alter(float &I, int J=2)
{
I=I+J;
J=I/J;
cout<<I<<"#"<<J<<endl;
}
void main()
{
float P=25, Q=15;
Alter(P,Q);
Alter(P);
Alter(Q);
}

(f) Observe the following C++ code and find the possible output(s) from
the options (i) to (iv) following it. Also, write the minimum and
maximum values that can possibly be assigned to the variable End. 2
Note :
 Assume all the required header files are already being included in
the code.
 The function random(N) generates any possible integer between
0 and N-1 (both values included).

void main()
{
randomize();
int A[]={5,10,15,20,25,30,35,40};
int Start = random(2) + 1;
int End = Start + random(4);
for(int I=Start; I<=End, I++)
cout<<A[I]<<"*";
}

(i) 20*25*30*35* (ii) 15*20*25*30*


(iii) 5*15*20 (iv) 10*15*20*25*30*

91 3 P.T.O.
2. (a) Given the following class Exam and assuming all necessary header
file(s) included, answer the questions that follow the code :
class Exam
{
int Marks; char EName[20];
public:
Exam (int M) //Function 1
{
Marks = M;
}
Exam (char S[]) //Function 2
{
strcpy(EName,S);
}
Exam (char S[], int M) //Function 3
{
Marks = M;
strcpy(EName,S);
}
Exam (Exam &E) //Function 4
{
Marks = E.Marks + 10;
strcpy(EName,E.EName);
}
};

void main()
{
Exam E1(10); //Statement I
Exam E2(70); //Statement II
Exam E4("THEORY",70); //Statement III
_______________; //Statement IV
}

(i) Which of the statement(s) out of (I), (II), (III), (IV) is/are
incorrect for object(s) of the class Exam ? 1

(ii) What is Function 4 known as ? Write the Statement IV,


that would execute Function 4. 1

91 4
(b) Observe the following C++ code and answer the questions (i) and (ii).
Note : Assume all necessary files are included.

class Coordinate
{
int X,Y;
public:
Coordinate(int I=20, int J=10) //Function 1
{
X = J; Y = I;
}
void Show() //Function 2
{
cout<< " Coordinates are " << X << " & " << Y <<endl;
}
~Coordinate() //Function 3
{
cout<<"Erased "<<endl;
}
};

void main()
{
Coordinate C(15);
C.Show();
}

(i) For the class Coordinate, what is Function 3 known as ?


When is it executed ? 1

(ii) What is the output of the above code, on execution ? 1

OR

(b) Explain Constructor Overloading in context of Object Oriented


Programming. Also give a supporting example in C++. 2

91 5 P.T.O.
(c) Write the definition of a class STATS in C++ with following
description : 4

Private Members

 Code // integer

 Tests // an array of integer with 3 elements

 Avg // integer

 CalAvg() /* Member function to calculate Avg

as Average of values given in

array Tests */

Public Members

 In() /* Function to allow user to enter values

of Code and Tests and then invoke

CalAvg() to calculate average */

 Out() // Function to display all data members

91 6
(d) Answer the questions (i) to (iv) based on the following : 4
class GFloor
{
int GRooms;
protected:
void Give();
public:
void Take();
};

class FFloor : private GFloor


{
int FRooms;
public:
void Get(); void Put();
};

class SFloor : public FFloor


{
int SRooms;
public:
void Input(); void Output();
};

void main()
{
SFloor S;
}
(i) Which type of Inheritance out of the following is illustrated
in the above example ?
 Single Level Inheritance, Multilevel Inheritance,
Multiple Inheritance
(ii) Write the names of all the members, which are directly
accessible by the member function Get() of class FFloor.
(iii) Write the names of all the members, which are directly
accessible by the member function Input() of class SFloor.
(iv) Write the names of all the members, which are directly
accessible by the object S of class SFloor declared in the
main() function.
OR

91 7 P.T.O.
(d) Consider the following class Institution 4
class Institution
{
int Code;
char Course[20];
protected :
float Fee;

public:
void Reg(){cin>>Code;gets(Course);cin>>Fee;}
void Show(){cout<<Code<<Course<<Fee<<endl;}
};
Write a code in C++ to publicly derive another class Student from
the base class Institution with following members.

Data Members
Rno of type long
Name of type character of size 10
Member Functions
A constructor function to assign Rno as 100
Admit() to allow user to enter Rno and Name
Display() to display Rno and Name

3. (a) Write a user-defined function NoThreeFive(int Arr[], int N) in


C++, which should display the value of all such elements and their
corresponding locations in the array Arr (i.e. the array index), which
are not multiples of 3 or 5. N represents the total number of
elements in the array Arr, to be checked. 3
Example : If the array Arr contains

0 1 2 3 4
25 8 15 49 9

Then the function should display the output as


8 at location 1
49 at location 3
OR
91 8
(a) Write a user-defined function HalfReverse(int Arr[], int N) in
C++, which should first reverse the contents of the first half of the
array Arr and then reverse the contents of the second half of the
array Arr. The total number of elements in the array Arr is
represented by N (which is an even integer). 3
Example : If the array Arr contains the following elements (for N = 6)
0 1 2 3 4 5
12 5 7 23 8 10

Then the function should rearrange the array to become

0 1 2 3 4 5
7 5 12 10 8 23
NOTE :
 DO NOT DISPLAY the Changed Array contents.
 Do not use any other array to transfer the contents of array Arr.

(b) Write a user-defined function OneZero(int M[4] [4]) in C++, which


replaces every occurrence of a 1 with a 0 in the array, and vice versa. 2
For example :

ORIGINAL ARRAY M CHANGED ARRAY M

1 1 0 1 0 0 1 0

0 1 0 0 1 0 1 1

0 0 1 1 1 1 0 0

1 1 0 0 0 0 1 1

NOTE :
 DO NOT DISPLAY the Changed Array contents.
 Do not use any other array to transfer the contents of array M.

OR

91 9 P.T.O.
(b) Write a user-defined function RowSwap(int A [4] [4]) in C++,
which swaps the contents of the first row with the contents of the
third row. 2

For example :

ORIGINAL ARRAY A CHANGED ARRAY A

10 15 20 25 50 55 60 65

30 35 40 45 30 35 40 45

50 55 60 65 10 15 20 25

70 75 80 85 70 75 80 85

NOTE :

 DO NOT DISPLAY the Changed Array contents.

 Do not use any other array to transfer the contents of array A.

(c) Let us assume P[20][30] is a two-dimensional array, which is stored


in the memory along the column with each of its elements occupying
2 bytes, find the address of the element P[3][5], if the address of the
array is 45000. 3

OR

(c) Let us assume P[10][20] is a two-dimensional array, which is stored


in the memory along the row with each of its elements occupying
2 bytes, find the address of the element P[5][10], if the address of the
element P[2][15] is 25000. 3

91 10
(d) For the following structure of Items in C++
struct Item
{
char Name[20];
float Price;
Item *Link;
};
Given that the following declaration of class ItemStack in C++
represents a dynamic stack of Items :
class ItemStack
{
Item *Top; //Pointer with address of Topmost Item
of Stack
public:
ItemStack()
{
Top = NULL;
}
void Push(); //Function to push an Item into the
dynamic stack
void Pop(); //Function to pop an Item from the
dynamic stack
~ItemStack();
};
Write the definition for the member function void ItemStack::Pop(),
that pops the details of an Item from the dynamic stack of
ItemStack. 4
OR
(d) Write a user-defined function Push(Item S[], int &T), which
pushes the details of an Item, into the static stack of Items S, at the
location T (representing the Top end of the stack), where every Item
to be pushed into the stack is represented by the following structure : 4
struct Item
{
char Name[20];
float Price;
};
91 11 P.T.O.
(e) Convert the following Infix expression to its equivalent Postfix
expression, showing the stack contents for each step of conversion : 2
P – Q / R ^ S + T
OR
(e) Evaluate the following Postfix expression, showing the stack
contents : 2
150,25,5,/,45,+,2,*,-
4. (a) A text file named IONS.TXT contains some text. Write a
user-defined function ShowP() in C++ which displays all
such words of the file which start with alphabet 'P'. 3
For example : If the file IONS.TXT contains :
"Whether an atom will form a cation or an anion is
based on its position in the periodic table"
Then the function ShowP() should display the output as
position, periodic
OR
(a) A text file named BIG.TXT contains some text. Another text file
named SMALL.TXT needs to be created such that it would store
only the first 50 characters from the file BIG.TXT.
Write a user-defined function BigToSmall() in C++ that would
perform the above task of creating SMALL.TXT from the already
existing file BIG.TXT. 3

(b) A binary file CUSTOMER.DAT contains records stored as objects of


the following class :
class Customer
{
int CNo; char Name[20]; char Address[30];
public:
int *GetNo() { return CNo; }
void Show()
{ cout<<CNo<<" * " <<Name<< " * " <<Address<<endl;
};
Write a user-defined function Search(int N) in C++, which displays
the details of the Customer from the file CUSTOMER.DAT, whose
CNo matches with the parameter N passed to the function. 2
OR

91 12
(b) Write a user-defined function TotalCost() in C++ to read each object
of a binary file ITEMS.DAT, and display the Name from all such
records, whose Cost is above 150. Assume that the file ITEMS.DAT is
created with the help of objects of class Item, which is defined
below : 2
class Item
{
char Name[20]; float Cost;
public:
char* RName() { return Name; }
float RCost() { return Cost; }
};

(c) Find the output of the following C++ code considering that the
binary file ITEMS.DAT exists on the hard disk with the following
5 records for the class Item containing Name and Cost. 1
Name Cost
Rice 110
Wheat 60
Cheese 200
Pulses 170
Sauce 150
void main()
{
fstream File;
File.open("ITEMS.DAT",ios::binary|ios::in);
Item T;
for (int I=1; I<=2; I++)
{
File.seekg((2*I-1)*sizeof(T));
File.read((char*)&T, sizeof(T));
cout<<"Read :"<<File.tellg()/sizeof(T)<<endl;
}
File.close();
}
OR

(c) Differentiate between ios::out and ios::app file modes. 1

91 13 P.T.O.
SECTION B
[Only for candidates, who opted for Python]
1. (a) Which of the following are valid operators in Python ? 2
(i) +=
(ii) ^
(iii) in
(iv) &&
(v) between
(vi) */
(vii) is
(viii) like

(b) Name the Python Library modules which need to be imported to


invoke the following functions : 1
(i) open()
(ii) factorial()
(c) Rewrite the following code in Python after removing all syntax
error(s). Underline each correction done in the code. 2
"HELLO"=String
for I in range(0,len(String)–1)
if String[I]=>"M":
print String[I],"*"
Else:
print String[I-1]

(d) Find and write the output of the following Python code : 2
Str1="EXAM2018"
Str2=""
I=0
while I<len(Str1):
if Str1[I]>="A" and Str1[I]<="M":
Str2=Str2+Str1[I+1]
elif Str1[I]>="0" and Str1[I]<="9":
Str2=Str2+ (Str1[I-1])
else:
Str2=Str2+"*"
I=I+1
print Str2
91 14
(e) Find and write the output of the following Python code : 3

def Alter(P=15,Q=10):
P=P*Q
Q=P/Q
print P,"#",Q
return Q
A=100
B=200
A=Alter(A,B)
print A,"$",B
B=Alter(B)
print A,"$",B
A=Alter(A)
print A,"$",B

(f) What possible output(s) are expected to be displayed on screen at


the time of execution of the program from the following Python
code ? Also specify the minimum values that can be assigned to each
of the variables BEGIN and LAST. 2

import random

VAL=[80,70,60,50,40,30,20,10]
Start=random.randint(1,3)
End=random.randint(Start,4)

for I in range(Start,End+1):
print VAL[I],"*",

(i) 40 * 30 * 20 * 10 * (ii) 70 * 60 * 50 * 40 * 30 *

(iii) 50 * 40 * 30 * (iv) 60 * 50 * 40 * 30 *

91 15 P.T.O.
2. (a) What is an Abstract Method in a class of Python ? Write a code in
Python to illustrate use of an Abstract Method in Python. 2
(b) class Matter:
Vol = 10
Type="SOLID"
def __init__(self,T,V=30):
self.Type = T
self.Vol = V
def Disp(self):
print self.Type,Matter.Type
print self.Vol,Matter.Vol
M1=Matter("GAS",20)
M1.Disp()
Matter.Type="LIQUID"
M2=Matter("SOLID")
M2.Disp()

(b) Write the output of the above Python code. 2

OR

class Point: #Line 1


def __init__(self): #Line 2
self.X = 20 #Line 3
self.Y = 24 #Line 4
def Show(self): #Line 5
print self.X,self.Y #Line 6
def __del__(self): #Line 7
print "Point Moved" #Line 8
def Fun(): #Line 9
P=Point() #Line 10
P.Show() #Line 11
Fun() #Line 12
91 16
(i) What are the methods/functions mentioned in Line 2 and
Line 7 specifically known as ?

(ii) Mention the line number of the statement, which will call
and execute the method/function shown in Line 2. 2

(c) Define a class TRANSPORT in Python with the following


specifications : 4

Instance Attributes
- Vno # Vehicle Number
- Vehicle # Vehicle Name
- Type # Type of the Vehicle

Methods/Functions
- FindType() # To assign Type of Vehicle
# based on Name of the Vehicle as shown
# below :

Vehicle Type

MotorCycle MCYCL

Car MTV

Truck HTV

Bus HTV

- Enter() # To allow user to enter value of


# Vno and Vehicle. Also, this method should

# call FindType() to assign Type

- Display() # To display Vno, Vehicle and Type

91 17 P.T.O.
(d) Answer the questions (i) to (iii) based on the following :
class Super(object): #Line 1
def __init__(self,n): #Line 2
self.N = n
def Set(self,n): #Line 3
self.n =self.N+n
def SPShow(self): #Line 4
print self.N

class Top(object): #Line 5


def __init__(self,n): #Line 6
self.N=n
def Set(self,n): #Line 7
self.N =self.N+n
def TPShow(self): #Line 8
print self.N

class Bottom(Super,Top): #Line 9


def __init__(self,d): #Line 10
self.D=d
n=0
if self.D<10:
n=5
else:
n=10
Super.__init__(self,n) #Line 11
Top.__init__(self,n) #Line 12
def SetAll(self,n): #Line 13
Super.Set(self,n)
Top.Set(self,n)
def BTShow(self): #Line 14
print self.D,
Super.SPShow(self)
Top.TPShow(self)
B=Bottom(101) #Line 15
B.SetA11(7)
B.BTShow()
91 18
(i) Write the type of the inheritance illustrated in the above. 1
(ii) Find and write the output of the above code. 2
(iii) What is the difference between the statements shown in
Line 11 and Line 12 ? 1

OR

(d) Define Inheritance. Show brief Python example of Single Level,


Multiple and Multilevel Inheritance. 4

3. (a) Consider the following randomly ordered numbers stored in a list :


601, 430, 160, 120, 215, 127
Show the content of list after the First, Second and Third pass of
the selection sort method used for arranging in ascending
order. 3
Note : Show the status of all the elements after each pass very
clearly encircling the changes.

OR

(a) Consider the following randomly ordered numbers stored in a list :


601, 430, 160, 120, 215, 127
Show the content of list after the First, Second and Third pass
of the bubble sort method used for arranging in descending
order. 3
Note : Show the status of all the elements after each pass very
clearly encircling the changes.

(b) Write definition of a method/function DoubletheOdd(Nums) to add


and display twice of odd values from the list of Nums. 3
For example :
If the Nums contains [25,24,35,20,32,41]
The function should display
Twice of Odd Sum: 202
OR

91 19 P.T.O.
(b) Write definition of a method/function FindOut(Names, HisName)
to search for HisName string from a list Names, and display the
position of its presence. 3
For example :
If the Names contain ["Arun","Raj","Tarun","Kanika"]
and HisName contains "Tarun"

The function should display


Tarun at 2

(c) Write InsQueue(Passenger) and DelQueue(Passenger)


methods/function in Python to add a new Passenger and delete a
Passenger from a list of Passenger names, considering them to act
as insert and delete operations of the Queue data structure. 4

OR

(c) Write DoPush(Customer) and DoPop(Customer)


methods/function in Python to add a new Customer and delete a
Customer from a List of Customer names, considering them to act as
push and pop operations of the Stack data structure. 4

(d) Write a Python method/function SwitchOver(Val) to swap the even


and odd positions of the values in the list Val. 2

Note : Assuming that the list has even number of values in it.
For example :
If the list Numbers contain
[25,17,19,13,12,15]
After swapping the list content should be displayed as
[17,25,13,19,15,12]
OR

91 20
(d) Write a Python method/function Count(Start,End,Step) to display
natural numbers from Start. 2
End in equal intervals of Step
For example :
If the values of Start as 14, End as 35 and Step as 6
The method should be displayed as
14
20
26
32

(e) Evaluate the following Postfix expression, showing the stack


contents : 2
25,5,*,15,3,/,+,10,-

OR

(e) Convert the following Infix expression to its equivalent Postfix


expression, showing the stack contents for each step of
conversion : 2
P * Q + R / S – T

4. (a) Write a statement in Python to open a text file CONTENT.TXT so


that new contents can be written in it. 1

OR

(a) Write a statement in Python to open a text file REMARKS.TXT so


that existing content can be read from it. 1

91 21 P.T.O.
(b) Write a method/function BIGWORDS() in Python to read contents
from a text file CODE.TXT, to count and display the occurrence of
those words, which are having 5 or more alphabets. 2

For example :
If the content of the file is

ME AND MY FRIENDS
ENSURE SAFETY AND SECURITY OF EVERYONE

The method/function should display


Count of big words is 5

OR

(b) Write a method/function BIGLINES() in Python to read lines from a


text file CONTENT.TXT, and display those lines, which are bigger
than 20 characters. 2

For example :
If the content of the file is

Stay positive and happy


Work hard and dont give up hope
Be open to criticism and keep learning
Surround yourself with happy, warm and genuine people

The method/function should display


Be open to criticism and keep learning
Surround yourself with happy, warm and genuine people

91 22
(c) Considering the following definition of class ITEMS, write a
method/function LowStock() in Python to search and display
Iname and Qty from a pickled file STOCK.DAT, for the items, whose
Qty is less than 10. 3

class ITEMS :

def __init__(self,I,Q):

self.Iname=N

self.Qty=Q

def IDisp(self):

print self.Iname,"@",self.Qty

OR

(c) Considering the following definition of class MEMBERS, write a


method/function MONTHLYMEMBERS() in Python to search and
display all the content from a pickled file MEMBERS.DAT, where
Type of MEMBERS is ‘‘MONTHLY’’. 3
class MEMBERS :

def __init__(self,N,T):
self.Name=N
self.Type=T
def Disp(self):
print self.Name,"$",self.Type

91 23 P.T.O.
SECTION C
[For all candidates]

5. (a) Observe the following table STOCK carefully and answer the
questions that follow : 2
Table : STOCK
SNO NAME PRICE
101 PEN 50
102 PENCIL 5
103 PENCIL 10
104 NOTEBOOK 50
105 ERASER 5

Which attribute out of SNO, NAME and PRICE is the ideal one for
being considered as the Primary Key and why ?

(b) Write SQL queries for (i) to (iv) and write outputs for SQL queries
(v) to (viii), which are based on the tables given below : 6

Table : TRAINS
TNO TNAME START END
11096 Ahimsa Express Pune Junction Ahmedabad Junction
12015 Ajmer Shatabdi New Delhi Ajmer Junction
1651 Pune Hbj Special Pune Junction Habibganj
13005 Amritsar Mail Howrah Junction Amritsar Junction
12002 Bhopal Shatabdi New Delhi Habibganj
12417 Prayag Raj Express Allahabad Junction New Delhi
14673 Shaheed Express Jaynagar Amritsar Junction
12314 Sealdah Rajdhani New Delhi Sealdah
12498 Shan-e-Punjab Amritsar Junction New Delhi
12451 Shram Shakti Express Kanpur Central New Delhi
12030 Swarna Shatabdi Amritsar Junction New Delhi

91 24
Table : PASSENGERS
PNR TNO PNAME GENDER AGE TRAVELDATE
P001 13005 R N AGRAWAL MALE 45 2018-12-25
P002 12015 P TIWARY MALE 28 2018-11-10
P003 12015 S TIWARY FEMALE 22 2018-11-10
P004 12030 S K SAXENA MALE 42 2018-10-12
P005 12030 S SAXENA FEMALE 35 2018-10-12
P006 12030 P SAXENA FEMALE 12 2018-10-12
P007 13005 N S SINGH MALE 52 2018-05-09
P008 12030 J K SHARMA MALE 65 2018-05-09
P009 12030 R SHARMA FEMALE 58 2018-05-09

NOTE : All Dates are given in ‘YYYY-MM-DD’ format.

(i) To display total number of MALE and FEMALE Passengers


(ii) To display details of all Trains which Start from Pune
Junction
(iii) To display details of all Passengers travelling in Trains
whose TNO is 12030
(iv) To display the PNR, PNAME, GENDER and AGE of all
Passengers whose AGE is above 50.
(v) SELECT DISTINCT TRAVELDATE FROM PASSENGERS;
(vi) SELECT MIN (TRAVELDATE), MAX (TRAVELDATE) FROM
PASSENGERS WHERE GENDER = 'MALE';
(vii) SELECT START, COUNT(*) FROM TRAINS
GROUP BY START HAVING COUNT (*)>1;
(viii) SELECT TNAME, PNAME FROM TRAINS T, PASSENGERS P
WHERE T.TNO = P.TNO AND AGE BETWEEN 40 AND 50;

6. (a) State any one Absorption Law of Boolean Algebra and verify it using
truth table. 2

(b) Draw the Logic Circuit of the following Boolean Expression : 2


A.B + A.C
91 25 P.T.O.
(c) Derive a Canonical POS expression for a Boolean function F,
represented by the following truth table : 1
X Y Z F(X,Y,Z)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

(d) Reduce the following Boolean Expression to its simplest form using
K-Map : 3
F(P,Q,R,S) = (2,6,7,8,9,10,11,13,14,15)

7. (a) William Jones has got a file that is replicating itself in order to
spread to other computers using computer network on its own,
relying on security failures on the target computer to access it. It is
consuming a lot of network bandwidth also. Which of the following
type category of infection will it be considered ? Also, mention, what
should he do to prevent this infection ? 2
(i) Virus
(ii) Worm
(iii) Trojan Horse

(b) Dr. Theekkar Singh is a very experienced orthopaedician in the Ilaj


Nagar City. He is planning to connect 5 of his clinics of the city with
a personalised application for his appointment organization without
using mobile/web application. Which out of the following networks
would be suitable ? 1
(i) PAN
(ii) LAN
(iii) MAN
(iv) WAN
91 26
(c) Select two server side scripting languages out of the following ? 1
(i) ASP
(ii) VBScript
(iii) JavaScript
(iv) PHP

(d) Write the expanded names for the following abbreviated terms used
in Networking and Communications : 2
(i) HTML
(ii) PAN
(iii) TCP
(iv) GBPS

(e) CASE STUDY BASED QUESTION

Piccadily Design and Training Institute is setting up its centre in


Jodhpur with four specialised units for Design, Media, HR and
Training in separate buildings. The physical distances between
these units and the number of computers to be installed in these
units are given as follows.

You as a network expert, have to answer the queries as raised by the


administrator as given in (i) to (iv).

Shortest distances between various locations in metres :

Design Unit to Media Unit 60


Design Unit to HR Unit 40
Design Unit to Training Unit 60
Media Unit to Training Unit 100
Media Unit to HR Unit 50
Training Unit to HR Unit 60

91 27 P.T.O.
Number of computers installed at various locations are as follows :

Design Unit 40
Media Unit 50
HR Unit 110
Training Unit 40

(i) Suggest the most suitable location to install the main server
of this institution to get efficient connectivity. 1

(ii) Suggest by drawing the best cable layout for effective


network connectivity of the building having server with all
the other units. 1

(iii) Suggest the devices to be installed in each of these buildings


for connecting computers installed within each of the units
out of the following : 1

Modem, Switch, Gateway, Router

(iv) Suggest an efficient as well as economic wired medium to be


used within each unit for connecting computer systems out of
the following network cable : 1

Co-axial Cable, Ethernet Cable, Single Pair Telephone Cable.

91 28

You might also like