Professional Documents
Culture Documents
The Heritage ISC12 Computer Sc. Preboard 2019
The Heritage ISC12 Computer Sc. Preboard 2019
Answer all que,stions in Parl I icompulsory) and slx queslion-t.from Part II, choosing lwo
qtrcstbnsfroru Section - .4, twofrom Section - B ond tnofram Sectirtn - (1.
All working, inclur.ling roul:h vnrk shaultl he done iin the same sheet {}s the rest af the
m
afisy:er.
The inlended rnarksfor qttes{ions or parls of questions nre given in llrc brockets IJ.
co
PART I (20 Llarks)
z.
Answer all questittns
er
f4/hile cnst$,ering questions in this Part, indic{tte hriefly' 3,our warkinp; and reasoning.
v,herever required.
ap
QUESTTON r
tp
t1l
(c) Show that the dual o1 A'BC'+AB'C+A'B'C is equal to the cornplernent of
AR',C+8.(A',C',+AC',) IU
//t
QUESTTON 2
tp
(a) Convert the fbllowing inf,rx exprression to its postfir forrn t2I
NOT (A OR B) AND (A NOT(B AND C))
ht
(h) A two dimensional array defined as X[2...7,-2....7) requires 4 b3,tes of storage space I2l
for each element. If the array is st-ored in column ma.lor r-rrder. determine the address
of X[5,11, given the base address as 1200.
(c) Iixplain two types of pol,vrnorphism in java. I2l
(d) Deline the terms Best-Case and Average-Case Complexities. l2l
(e) Why is it not a gr:od idea to apply binary search on a sorted linked list r:f values? l2l
Downloaded from TestPaperz.com
, Ll7
This question paper consists of 7 printed pages
QUESTTON 3
Fill in ihe '?.-?' r,vith the appropriate aitslver, Atrso sho* the dry run&vorking. tsl
Pollowing is the code for l+(2*3)+(485*6)...n
Downloaded from TestPaperz.com
int series(int past int presenl. int n)
{
i
int i, cur =' ? 1?:
if(present:: n - l)
rcturn ?2?:
m
I
t
co
PAR.T II
(50 Marks)
Answer sLt que stions in lhis part, choo.rittg two que,stions frrxn Section A. tw,o frr:m Sectiort B
z.
and lwo fronr St,tlion C.
Sf,CTION - A
er
.Anxt,er {*?y llra r1ueslian,t
ap
QUESTION.$
tp
(a) Given a Boolean Function F(A-B,C,D):I($,1.6,7.8.9.10.14"15). tJse Karnaugh NIap to reduce the
function F, using SOP fomr. l)rarv a logic gate diagram for the reduced SOP fonn.
es
You may use gates rvith more than two inputs. Assume that the variables and their complements are
available as inputs. tsl
//t
(b) Given a Boolean Function X(A,B.C.D):L(2,3,4,5,11.12,13). Use Karnaugh Map to reduce the function
X, using POS form. Drarv a logic gate diagram for the reduced pOS form.
s:
You may use gates w'ith more than two inputs. Assume that the variables and their complements are
available as inputs. tsl
tp
QUESTTON s
ht
217
This question paper consists of 7 printed pages
QUESTION 6
(ai An insura.nce company issues a policl'to an applicant trnlr when the applicant satis{ies atleast one of the
lbllowing conditions:
The applicant is a married maie of age 35 1'ears or abLr\ e.
The applicant is a female lvlro ner,er had a car accident. Downloaded from TestPaperz.com
T'he applicant is a married female and had a car accident.
The applicant is a male below 25 1'ears.
The applicant is not below 25 years and has never had a car accident.
m
Y The applicant is below 25 l ears
co
The outputs are:
I: denotes, issue of policy I I indicates res and 0 indicates no]
z.
Draw the truth table fbr the inputs an,j outputs given abor e ancl write the SOP expression fbr
r(M,s.c.Y).
er
tsl
(b) Drarv the trogic gate diagram tirr ihe -rlivcn Boolean function. making use of only NAND gates.
ap
F(A,B,C): (A+B'XB'+C) l2l
(c) What is an encoder? State its application, t3l
tp
il :r ,'' 317
This question paper consists of 7 printed pages
SECTION - B
In,:sw*er efiy ltt{) qu€,tti{}rltt
Each progran should be written in such & way that it clearly depicts the togic of the problem.
This can be achiewd by using mnemonic names and commcnts in the program.
(Flowcharts and Algorithms are not required.)
Downloaded from TestPaperz.com
The prngrnms mu$i be writtcn in Java.
QUESTTON 7 [101
A h*ppy nlirnber is a numtrer in *'hieh the eventual sunr of the square of the disits of the
number is equal tol.
Example:
/$:"t2-yg2:4+64:68
m
68:62+82:36+64: t 00
100:12+02+02: 1 + 0 + 0 : I
co
Hence" 28 is a happ.v number.
*4 :
z.
Example; 11 - 12+22: i 5
Mernher filnctions :
s:
lhenumbern:nn
l Specify the class Happy giving details of the constructor( ), void getnum(int), int
sum*sq_digits(int) and void ishappy{ ). Aiso define a main( ) function to create an object
and call the methods to check for happy' number.
QUESTTON I ll0l
Design a class lileight tc accept sentence and calculate the frequency of words that have
weight greator than 600
Member functions :
m
Weight0 : to initialize str and freq
void readstr() : to readthe sentence
co
void fieq_word(String) : to count the number of words
rvith weight greater than 600.
z.
void display() : to display the frequency of the
words greater than 600.
er
Specift the class Weight giving details of all the methods. Also write the main function.
ap
QUESTTON I [10]
A class FlaneA defines coordinaies of rrvo points in a plane. -fhe details of the class is given
tp
belou':
es
Functions/lVlethods
PlaneA0
s:
if xl, x2" yl,yZ are the cocrdinates of the two points. then the distance between the points
intheplarreis@.
Specif,, the class PlaneA giving details *f all the methods. AIso write the main function.
SECTION. C
,4nswer arc.t| twa question^;
Downloaded from TestPaperz.com
QUE$TfOItil I0 tsl
Define a class Calculate and a deriyed class HllF tr; i'rnil the HCF of tw-o rlunlbers.
The details of both the classes are given below:
Class narne Calculate
Data Members
nl. n2 inteEers whose H(lF is to be detennined
Member Frnctions
void accept() to accept integer nl and n2
m
void display$ to display nl and n2 r.vith suitable Inessages
co
Class nirme :HCF
Data Members
z.
h : to store the HCF
Memtrer Functions
void findHCF0 :
er
to find and store I-ICF of n1.nl in h
'r,oid show0 : to display h witir suitable message.
ap
Using the concept of inheritance specify the class HCF. giving details of the function
void findl-[CF0 and void show.$. Do not write the nrain functinn.
tp
lt
es
QUESTTO|{ tsl
Define a class Auditcriur-n which allo*'s the user to add elements fronr one end(rear) and
//t
Data Members
at[] r an arra,v tt hold a maximum of i 00 inteser
ht
lements
cap stores the cepacitlv of the array
f to point to the front
T to point to the rear
Member Functions
Auditorium(int m) constru*tr:r to initialize the data meinbers
cap:rn,FCi,r0 and to create the integer array
Downloaded from TestPaperz.com
617
This question paper consists of 7 printed pages
Downloaded from TestPaperz.com
QUESTTON 12
(a) What Iixplain brief)y w-ith an example'
is ttie role of constants in cornpleriry?
13t
12)
iUi fto* the given binary tree ans*er the following questions
m
i) External nodes
ii) Postorder Traversal
co
z.
er
Downloaded from TestPaperz.com
ap
tp
es
//t
s:
tp
ht
t';1 . 717