Trending ▼   ResFinder  

ISC Class XII Board Exam 2019 : Computer Science

10 pages, 37 questions, 4 questions with responses, 4 total responses,    0    0
Sulabh Mehta
Alexandra School, Amritsar
+Fave Message
 Home > sulabh56 >

Formatting page ...

COMPUTER SCIENCE PAPER I (THEORY) (Maximum Marks: 70) (Time allowed: Three hours) (Candidates are allowed addilional 15 minulesfor only reading the paper. They must NOT slart wriling during this time.) Answer all questions in Part I (compulsory) and six questions from Parl-11. choosing two questions from Section-A, two from Section-Band two from Section-C. All working, including rough work, should be done on the same sheet as !he rest ofthe answer. The intended marks for queslions or parts ofquestions are given in brackets [ ]. --------------------------------------------------------------------------------------------------------------------PART I (20 Marks) Answer all questions. While a11swering questions in this Part, i11dicate briefly your working and reasoning, wherever required. Question 1 (a) Name and draw the logic gate represented by the following truth table, where A and B are inputs and X is the output. A 0 0 I I B X 0 I 0 I 0 I I 111 0 [1] = TT ( 0,2) (b) Write the canonical POS expression of: F(P, Q) (c) Find the dual of: (d) If f(A, B, C) = A'.B'.C' + A'.B.C' then find F' using De Morgan's Law. (1) (e) If A= "It is cloudy"' and B= "It is raining", then write the proposition for: (lJ X.Y + X.Y' (i) Contrapositive (ii) Converse -----------------------------------------------------------------------------------------------------This Paper consists of 10 printed pages. 1219-868A Copyright reserved. (1 J =X + 0 Turn over Question 2 (a) What is an Interface? How is it different from a class? [2J (b) A matrix ARR[ - -t ... 6, 3 .... 8] is stored in the memory with each element requiring 4 bytes of storage. If the base address is 1430, find the address of ARR[3][6] when the matrix is stored in Row Major Wise. (2) (c) Convert the following infix notation to postfix form : (2) (A+B*C)-(E*F/H)+J (d) Compare the two complexities O(n2) and 0(2") and state which is better and why. (2J (e) State the difference between internal nodes and external nodes of a binary tree structure. (2J Question 3 The following function Mystery( ) is a part of some class. What will the function Mystery( ) return when the value of num=43629, x=3 and y=4 respectively? Show the dry run/ working. [5) int Mystery( int num, int x, int y) { if(num<l0) return num; else { int z = num % IO; if( z % 2 = = 0) return z*x + Mystery( nurn/1 0,x,y); else return z*y + Mystery( nurn/1 0,x,y); } } ------ - --------- ---------------------- ------------------ ---------------------------- --------------------------------------- 2 1219-868A PART - II (50 Marks) Answer ,\'ir (Jll<!Stions in this part, choosing two questions [,- 0111 Section A, two Ji'om Section IJ and llvofrom Section c . SECTJON -A Answer any two questions. Question 4 (a) Given the Boolt:an function F(A, B, C, D) = I: ( 0, 2, 3, 4, 5, 8, 10, 11, 12, 13 ). (i) (ii) (b) 141 Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). Draw the logic gate diagram for the reduced expression using only NANO gates. Assume that the variables .and their complements are available as inputs. f 11 Given the Boolean function : F(P, Q, R, S) = rr ( 0, l, 2, 8, 9, 11, 13, 15 ). (i) Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). [41 (ii) Draw the logic gate diagram for the reduced expression using only NOR gates. Assume that the variables and their complements are available as inputs. I1I Question 5 (a) How is a decoder different from a multiplexer? Write the truth table and draw the logic circuit diagram for a 3 to 8 decoder and explain its working. ISJ (b) From-the logic circuit diagran1 given below, derive the Boolean expression and simplify it to show that it represents a logic gate. Name and draw the logic gate. [3J X _ ___:,,.___ __,_ Y ----i---1 F z----~-1 (c) Using a truth table, state whether the following proposition is a Tautology, Contradiction or Contingency: ~(P =>Q) <=> (~P V Q) [2) 3 l219-868A Turn over rI Question 6 (a) (SJ The O\rner of a company pays bonus to hi s salesmen as per the criteria given belO\v: ff the salesman .vorks overtime for more than 4 hours hut docs not work on off days/holidays. OR If the salesman works when festival sales are on and updates showroom arrangements. OR If the salesman works on an off day/holiday when the festival sales are on. The inputs are: INPUTS 0 Works overtime for more than 4 hours F Festival sales are on H Working on an off day/holiday u Updates showroom arrangements (In all the above cases 1 indicates yes and Oindicates no.) Output : X [ I indicates yes, 0 indicates no for all cases] Draw the truth table for the inputs and outputs given above and write the POS expression for X(O,F,H,U). (b) What is a halfadder? Write the truth table and derive an SOP expression for sum and carry for a half adder. [3J (c) Simplify the following expression, using Boolean laws: [2J ( X + Z ) . ( X .Y + Y.Z ' ) + X.Z + Y -----------------------------------------------------------------------------------------------------------------4 1219-868A SECTION - B t/lU'slions. Each program should be wrillen in such a H'.av thal it clearly depicts the loxic of!he problem. This can be achit>ved by using m11e1110;1ic names and cummenls in the program. (Flowcharts and Algorithms are not req uired.) A11.nt' 'r ,,,,., two The programs must be written in Java. Question 7 Design a class ArmNum to check ifa given number is an Armstrong number or not. [A number is said to be Armstrong if sum of its digits raised to the power of length of the number is equal to the number] Example : 371 = 33 + i + J 3 I634 = I 4 + 64 + 34 + 44 54748 = 55 + 45 + ?5 + 45 + g 5 [IOI Thus 3 71. 1634 and 54 748 are all examples of Armstrong numbers. Some of the members of the class are given below: Class name Data members/instance variables: n ArmNum to store the number to store the length of the number Methods/Member functions: ArmNum (int nn) parameterized constructor t<? initialize the data member n=nn returns the sum of each digit raised to the int sum_pow(int i) power of the length of the number using recursive technique eg. 34 will return J2 + 42 (as the length of the number is 2) void isArmstrong( ) checks whether the given number is an Armstrong number by invoking the function sumyow( ) and displays the result with an appropriate message Specify the class ArmNum giving details of the constructor( ), int sum_pow(int) and void isArmstrong( ). Define a main( ) function to create an object and call the functions accordingly to enable the task. -~-- --- ----------------------------------------------------- ---- -----------------------------------------------------------5 J21 9-868A Turn onr Question 8 (IOJ Design a class l\JatRe, to re, erse each element uf a matrix. Example: 72 371 5 12 6 426 5 123 94 I becomes 27 173 5 21 6 624 5 321 49 Some of the members of the class are given below: Class name MatRev Data members/instance variables: arr[][ J m to store the number of rows n to store the number of columns to store integer elements Member functions/methods: MatRev(int mm, int nn) parameterised constructor to initialise the data members m = mm and n = nn void fillarray( ) to enter elements in the array returns the reverse of the number x int reverse(int x) void revMat( MatRev P) reverses each element of the array of the parameterized object and stores it in the array of the current object void show() displays the array elements in matrix fonn Define the class ~atRev g1vmg details of the constructor( ), void fiJlarray( ), int reverse(int), void revMat(MatRev.) and void show(). Define the main( ) function to create objects and call the functions accordingly to enable the task. ----------------------------------------------------------------------------------------1219-868A 6 , Question 9 A class Rearrange has been d fi . . word at the beginning fi e med to modify a word by bringing all the vowels in the 0 11 . owed by the consonants. Example: ORIGINAL becomes OIIARGNL (101 Some of the members of the class are given below: Class name Rearrange Data member/instance variable: wrd newwrd to store a word to store the rearranged word Member functions/methods: Rearrange( ) default constructor void readword( ) to accept the word in UPPER case void freq_vow_ con( ) finds the frequency of vowels and consonants in the word and displays them with an appropriate message void arrange( ) rearranges the word by bringing the vowels at the beginning followed by consonants void display( ) displays the original word along with the rearranged word Specify the class Rearrange, giving the ~etails of the constructor( ), void readword( ), void freq_vow_con( ), void arrange( ) and void display( ). Define the main( ) function to create an object and call the functions accordingly to enable the task. ---------------------- ---------------------------------------- 7 1219-868A t ~ Turn over , SECTION - {' :'l11.\11 , r ""-" two </lll'.\ lions. Eucl, 11rogra111 .,//()11/d be ll'rille11 in Sllc'h cl ll 'U)' that it clc ,,r~y depicts the loKic "fthe problem S / ( '/JI Vi.\ l', This cc111 he ll<'lrit , c d h_,, ll.\i11g co111111c 111s in th ' 11rugrt1111 and m11<!11umic n,1111es or pseudo codes /or ulgont/,111,\ The programs 11111st he 11'1'il/e11 i11 Jm <t and the ulxorithms 11111st he wriflen in general I stanJardjvm1, 111here1 er re,111ired I .~peci/ied. (Flowcharts are not requin.:d.) (Jul stion I 0 A super class Record contains naml!s and marks of the students in two different single 151 dimensionnl arrays. Deline a sub class Highest to display the names of the students obtaining the higl1L st mark. The details of the: members of both the classes are given below: Class n;unc Record Oat;1 member/instance, ariabh. : nl J m[] size array to store names array to store marks to store the number of students .M ember functions/methods: Record(i m cap) parameterized constructor to initialize the data member size = cap m id readarr~n 0 to enter elements in both the arrays , oid display( ) displays the aITay elements Clas~ name: Data member/im.tance variable: ind Highest to store the index .\1ember functions/methods: Highest( .. .) \ oid find ( ) , oid display( J parameterized constructor to initialize the data members of both the classes finds the index of the student obtaining the highest mark and assign it to ind' displays the aITay elements along with the names and marks of the students who have obtained the highest mark . lssume rhat the super class Record has been defined. Using the concept of inheritance, sp~ci(v the class Highest giving the details of the constructor( ... ),void find( ) and void di~play( ). The super rlass, main function and algorithm need NOT be written. 8 1219-868,\ Question 11 A Iin ear data structure t:nablcs the usl!r to add address from rear end and remove address, from front. Ddine a class Diary with the following details: Class name Diary Data members / instance Yariables: array to store the addresses Q[ I stores the maximum capacity of the array StLe start to point the index of the front end end to point the index of the rear end Member functions : (a) Diary (int max) constructor to initialize the data member size=max, start=0 and end=0 \'uid pushadd(String n) to add address in the diary from the rear end if possible, otherwise display the message NO SPACE'. String popadd( ) removes and returns the address from the front end of the diary if any, else returns "'?????" mid show() displays all the addresses in the diary Specify the class Dia11 gi\'ing details of the functi ons mid pushadd(String) and String popadd( ). Assume that the other functions have been defined. 141 The main function and algorithm need NOT be written . (b) 111 Name the entity used in the above data structure arrangement. Question 12 (a) A linked list is formed from the objects of the class Node. The class structun: of th1..: l\'ode is gi\'en below: class { [21 Node int num; Node next; } Write an Algori1hm OR a .\l/e1hod to find and display the sum of even integers from an existing linked list. The method declaration is as follows: void SumEvenNodc( Node str ) 9 I 219-868A Turn OVl'r (b) Answer the following questions from the diagram of a Binary Tree given below: (i) Write the pre-order traversal of the above tree structure. lt I (ii) State the size of the tree. 11 I (iii) Name the siblings of the nodes E and G. to 1219-868A l 1I

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Rajeshwari Roy

(3)

Abhay Pratap Singh

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

sulabh56 chat