Trending ▼   ResFinder  

ISC Class XII Board Exam 2019 : Computer Science

10 pages, 35 questions, 0 questions with responses, 0 total responses,    0    0
Shraman Chaudhuri
Stads, Kolkata
XII vaigyan
+Fave Message
 Home > shraman79 >

Formatting page ...

COMPUTER SCIENCE PAPER 1 (THEORY) (Maximum Marks: 70) (Time allowed: Three hours) (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time.) ------------------------------------------------------------------------------------------------------------------------------- Answer all questions in Part I (compulsory) and six questions from Part-II, choosing two questions from Section-A, two from Section-B and two from Section-C. All working, including rough work, should be done on the same sheet as the rest of the answer. The intended marks for questions or parts of questions are given in brackets [ ]. --------------------------------------------------------------------------------------------------------------------PART I (20 Marks) Answer all questions. While answering questions in this Part, indicate 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 1 1 B 0 1 0 1 [1] X 0 1 1 0 (b) Write the canonical POS expression of: F(P, Q) = ( 0,2 ) [1] (c) Find the dual of: [1] (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: [1] X.Y + X.Y = X + 0 (i) Contrapositive (ii) Converse --------------------------------------------------------------------------------------------------------------------This Paper consists of 10 printed pages. 1219-868A Turn over Copyright reserved. Question 2 (a) What is an Interface? How is it different from a class? [2] (b) A matrix ARR[ 4 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 O(2n) and state which is better and why. [2] (e) State the difference between internal nodes and external nodes of a binary tree structure. [2] 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<10) return num; else { int z = num % 10; if( z % 2 = = 0 ) return z*x + Mystery( num/10,x,y); else return z*y + Mystery( num/10,x,y); } } ------------------------------------------------------------------------------------------------------------------------------- 2 1219-868A https://www.icseonline.com PART II (50 Marks) Answer six questions in this part, choosing two questions from Section A, two from Section B and two from Section C. SECTION - A Answer any two questions. Question 4 (a) Given the Boolean function F(A, B, C, D) = ( 0, 2, 3, 4, 5, 8, 10, 11, 12, 13 ). (i) (ii) (b) 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 NAND gates. Assume that the variables and their complements are available as inputs. Given the Boolean function: F(P, Q, R, S) = [4] [1] ( 0, 1, 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). [4] (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. [1] 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. [5] (b) From the logic circuit diagram given below, derive the Boolean expression and simplify it to show that it represents a logic gate. Name and draw the logic gate. [3] X Y F Z (c) Using a truth table, state whether the following proposition is a Tautology, Contradiction or Contingency: ~(P =>Q) <=> (~P Q) [2] ------------------------------------------------------------------------------------------------------------------------------- 3 1219-868A Turn over Question 6 (a) The owner of a company pays bonus to his salesmen as per the criteria given below: [5] If the salesman works overtime for more than 4 hours but does 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 O F H U Works overtime for more than 4 hours Festival sales are on Working on an off day/holiday Updates showroom arrangements (In all the above cases 1 indicates yes and 0 indicates no.) Output : X [1 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 half adder? Write the truth table and derive an SOP expression for sum and carry for a half adder. [3] (c) Simplify the following expression, using Boolean laws: [2] ( X + Z ) . ( X.Y + Y.Z ) + X.Z + Y ------------------------------------------------------------------------------------------------------------------------------- 4 1219-868A SECTION B Answer any two questions. Each program should be written in such a way that it clearly depicts the logic of the problem. This can be achieved by using mnemonic names and comments in the program. (Flowcharts and Algorithms are not required.) The programs must be written in Java. Question 7 Design a class ArmNum to check if a 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 + 73 + 13 1634 = 14 + 64 + 34 + 44 54748 = 55 + 45 + 75 + 45 + 85 [10] Thus 371, 1634 and 54748 are all examples of Armstrong numbers. Some of the members of the class are given below: Class name Data members/instance variables: n l Methods/Member functions: ArmNum (int nn) : ArmNum : : to store the number to store the length of the number : parameterized constructor to initialize the data member n=nn int sum_pow(int i) : returns the sum of each digit raised to the power of the length of the number using recursive technique eg. 34 will return 32 + 42 (as the length of the number is 2) void isArmstrong( ) : checks whether the given number is an Armstrong number by invoking the function sum_pow( ) 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 1219-868A Turn over Question 8 Design a class MatRev to reverse each element of a matrix. [10] Example: 72 371 5 12 6 426 5 123 94 becomes 27 173 5 21 6 624 5 321 49 Some of the members of the class are given below: Class name Data members/instance variables: arr[ ][ ] m n Member functions/methods: MatRev(int mm, int nn) : MatRev : : : to store integer elements to store the number of rows to store the number of columns : parameterised constructor to initialise the data members m = mm and n = nn to enter elements in the array returns the reverse of the number x void fillarray( ) 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 form Define the class MatRev giving details of the constructor( ), void fillarray( ), 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. ------------------------------------------------------------------------------------------------------------------------------- 6 1219-868A Question 9 A class Rearrange has been defined to modify a word by bringing all the vowels in the [10] word at the beginning followed by the consonants. Example: ORIGINAL becomes OIIARGNL Some of the members of the class are given below: : Rearrange wrd : to store a word newwrd : to store the rearranged word 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 Class name Data member/instance variable: Member functions/methods: Specify the class Rearrange, giving the details 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 Turn over SECTION C Answer any two questions. Each program should be written in such a way that it clearly depicts the logic of the problem stepwise. This can be achieved by using comments in the program and mnemonic names or pseudo codes for algorithms. The programs must be written in Java and the algorithms must be written in general / standard form, wherever required / specified. (Flowcharts are not required.) Question 10 A super class Record contains names and marks of the students in two different single [5] dimensional arrays. Define a sub class Highest to display the names of the students obtaining the highest mark. The details of the members of both the classes are given below: : Record : : : array to store names array to store marks to store the number of students : parameterized constructor to initialize the data member size = cap void readarray() : to enter elements in both the arrays void display( ) : displays the array elements Class name Data member/instance variable: n[ ] m[ ] size Member functions/methods: Record(int cap) Class name: Data member/instance variable: ind Member functions/methods: Highest( ) Highest : to store the index : 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 array elements along with the names and marks of the students who have obtained the highest mark void find( ) : void display( ) : Assume that the super class Record has been defined. Using the concept of inheritance, specify the class Highest giving the details of the constructor( ),void find( ) and void display( ). The super class, main function and algorithm need NOT be written. ------------------------------------------------------------------------------------------------------------------------------- 8 1219-868A Question 11 A linear data structure enables the user to add address from rear end and remove address from front. Define a class Diary with the following details: Class name : Diary Data members / instance variables: Q[ ] : array to store the addresses size : stores the maximum capacity of the array start : to point the index of the front end end : to point the index of the rear end Diary (int max) : constructor to initialize the data member size=max, start=0 and end=0 void 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 ????? void show( ) : displays all the addresses in the diary Member functions: (a) Specify the class Diary giving details of the functions void pushadd(String) and String popadd( ). Assume that the other functions have been defined. [4] The main function and algorithm need NOT be written. (b) Name the entity used in the above data structure arrangement. [1] Question 12 (a) A linked list is formed from the objects of the class Node. The class structure of the [2] Node is given below: class { Node int num; Node next; } Write an Algorithm OR a Method to find and display the sum of even integers from an existing linked list. The method declaration is as follows: void SumEvenNode( Node str ) ------------------------------------------------------------------------------------------------------------------------------- 9 1219-868A Turn over [2] (b) Answer the following questions from the diagram of a Binary Tree given below: A E G I B C D H F (i) Write the pre-order traversal of the above tree structure. [1] (ii) State the size of the tree. [1] (iii) Name the siblings of the nodes E and G. [1] ------------------------------------------------------------------------------------------------------------------------------- 10 1219-868A [1]

Formatting page ...

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

 

shraman79 chat