Trending ▼   ResFinder  

ISC Class XII Sample / Model Paper 2024 : Computer Science

5 pages, 32 questions, 0 questions with responses, 0 total responses,    0    0
Shraman Chaudhuri
Stads, Kolkata
Nur - XII
+Fave Message
 Home > comp_sc >

Formatting page ...

Page 1 of 6 PRACTICE EXAMINATION 3 CLASS-XII COMPUTER SCIENCE PAPER-1(THEORY) Time 3 hours Maximum Marks-70 Answer all questions from 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 and rough work should be done in the same sheet as the rest of the answer. The intended marks of questions or parts of questions are given in brackets [ ]. PART-I(20 marks) [Answer all the questions . While answering questions in this part, indicate briefly your working and reasoning, wherever required] Question 1 (a) Using a truth table, verify the following expression: [1] X + (Y + Z) = (X + Y) + Z Also, state the law. (b) Given, F (X, Y, Z) = (X + Y ) . (Y + Z ) [1] Write the function in the canonical product of sum form. (c) Show that the dual of P QR + PQ R + P Q R is equal to the complement of: [1] PQ R + Q. (P R + PR ) (d) Convert the following function into its canonical sum of products form: [1] F(X, Y , Z) = (0, 1, 5, 7). (e) From the logic circuit diagram given below, find the output F and simplify it. [1] Also, state the law represented by the logic diagram. Question 2 (a) (b) State the difference between an Interface and a Class. [2] Convert the following infix notation to postfix notation: [2] A+B/C*D E (c) A matrix B [10][7] is stored in the memory with each element requiring 2 bytes of storage. If the base address at B [x] [1] is 1012 and the address at B [7][3] is 1060, determine the value of x where the matrix is stored in Column Major wise. [2] (d) Write the differences between Linear Data Structure and Non-Linear Data Structure. [2] (e) How can we override a method in inheritance. [2] [5] Question 3 The following function witty ( ) is a part of some class. What will be the output of the function witty( ) when the value of n is PROJECT and the value of p is 5. Show the dry run/working: void witty (String n, int p) { if (p < 0) System.out.println(" "); else { System.out.print (n.charAt(p) + " . "); witty (n, p - 1); System.out.print (n.charAt(p)); } } Page 2 of 6 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) (b) Given F(P,Q,R,S) = (0, 2, 5, 7, 8, 10, 11, 13, 14, 15) (i) Reduce the above expression by using 4 Variable K-Map, showing the various groups (i.e., octal, quads and pairs). [4] (ii) Draw the Logic gate diagram of the reduced expression using NAND gate only. [1] Given F(A, B, C, D) = (A + B + C + D). (A + B + C + D ). (A + B + C + D ). (A + B + C + D). (A + B + C + D ). (A + B + C + D ). (A + B + C + D). (A + B + C + D). (i) Reduce the above expression by using 4 Variable K-Map, showing the various groups (,i.e., octal, quads and pairs). [4] (ii) Draw the Logic gate diagram of the reduced expression using Universal gate only. [1] Question 5 (a) A Football Association coach analyzes the criteria for a win/draw of his team depending on the following conditions: [5] If the Centre and Forward players perform well but Defenders do not perform well. O R If Goalkeeper and Defenders perform well but the Centre players do not perform well. O R If all the players perform well. The inputs are: Inputs C D F G (b) (c) Centre players perform well. Defenders perform well. Forward players perform well. Goalkeeper performs well. (In all of the above cases 1 indicates yes and 0 indicates no) Output: X Denotes the win/draw criteria [1 indicates win/draw and 0 indicates defeat in all cases.] What is a Full Adder? Draw the truth table for a Full Adder. Also derive SOP expression for the Full Adder and draw its logic circuit. [3] Convert the following cardinal expression into its canonical form and reduce it using Boolean laws : F(L, M, N, O) = M(0,2,8,10) [2] Question 6 (a) Define Encoder? Draw the circuit diagram for octal to binary encoder and explain its working. (b) State how a Decoder is different from a Multiplexer. Also state one use (application) of each. (c) Simply the following expression and also draw the circuit/gate for the reduced expression. [Show the stepwise working along with its law used.] F = X.(Y +Z.(X.Y + X.Z) ) [4] [3] [3] Page 3 of 6 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 [10] A disarium number is a number in which the sum of the digits to the power of their respective position is equal to the number itself. 1 2 3 Example: 135 = 1 + 3 + 5 Hence, 135 is a disarium number. Design a class Disarium to check if a given number is a disarium number or not. Some of the members of the class are given below: Class name : Disarium Data members/instance variables: int num : stores the number. int size : stores the size of the number. Methods/Member functions: Disarium(int nn) : parameterized constructor to initialize the data members num = nn and size = 0. void countDigit() : counts the total number of digits and assigns it to size. int sumOfDigits(int n, int p) : returns the sum of the digits of the number (n) to the power of their respective positions (p) using recursive technique. void check() : checks whether the number is a disarium number and displays the result with an appropriate message. Specify the class Disarium giving details of the constructor, void countDigit(), int sumOfDigits(int, int) and void check(). Define the main() function to create an object and call the functions accordingly to enable the task. Question 8 [10] A class Combine contains an array of integers which combines two arrays into a single array including the duplicate elements if any, and sorts the combined array. Some of the members of the class are given below: Class name : Combine Data members/instance variables: com[] : integer arrays size : size of the array Member functions/methods: Combine(int nn) : parameterized constructor to assign size = nn. void inputarray() : to accept the array elements. void sort() : sorts the elements of combined array in ascending order using the selection sort technique. void mix(Combine A, Combine B) : combines the parameterized object arrays and stores the result in the current object array along with duplicate elements if any. void display() : displays the array elements. Specify the class Combine giving details of the constructor, void inputarray(). void sort(), void mix(Combine, Combine) and void display(). Also define the main() function to create an object and call the methods accordingly to enable the task. Question 9 [10] Page 4 of 6 Design a class VowelWord to accept a sentence and calculate the frequency of words that begin with a vowel. The words in the input string are separated by a single blank space and terminated by a full stop. The description of the class is given below: Class name : VowelWord Data members/instance variables: str : to store a sentence. freq : store the frequency of the words beginning with a vowel. Member functions: VowelWord() : constructor to initialize data members to legal initial values. void readStr() : to accept a sentence. void freq_vowel() : counts the frequency of the words that begin with a vowel. void display() : to display the original string and the frequency of the words that begin with a vowel. Specify the class VowelWord giving details of the constructor, void readStr(), void freq_vowel() and display(). Also define the main() function to create an object and call the methods accordingly to enable the task. SECTION C Answer any two questions. Each Program should be written in such a way that it clearly depicts the logic of the problem step wise. This can also be achieved by using comments in the program and mnemonic names or pseudo codes for algorithms. The program 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 Detail has been defined to store the details of a customer. Define a subclass Bill to compute the monthly telephone charge of the customer as per the chart given below: Number Of Calls : Rate 1 100 : Only Rental charge 101 200 : 60 paisa per call + rental charge 201 300 : 80 paisa per call + rental charge Above 300 : 1 rupee per call + rental charge The details of both the classes are given below: Class Name : Detail Data members / Instance variables: name : to store the name of the customer. address : to store the address of the customer. telno : to store the phone number of the customer. rent : to store the monthly rental charge Member functions: Detail( ) : parameterized constructor to assign values to data members. void show() : to display the detail of the customer. Class Name : Bill Data members / Instance variables: n : to store the number of calls. amt : to store the amount to be paid by the customer. Member functions: Bill( ) : parameterized constructor to assign values to data members of both classes and to initialize amt = 0.0. void cal() : calculates the monthly telephone charge as per the charge given above. [5] Page 5 of 6 void show() : to display the detail of the customer and amount to be paid. Assume that the superclass Detail has been defined. Using the concept of inheritance, specify the class Bill giving details of the constructor( ), void cal() and void show(). The main function and algorithm need not be written. Question 11 [5] Define a class Repeat which allows the user to add elements from one end (rear) and remove elements from the other end (front) only. The following details of the class Repeat are given below: Class name: Repeat Data Members/instance variables: st[] : an array to hold a maximum of 100 integer elements cap : stores the capacity of the array f : to point the index of the front r : to point the index of the rear Member functions: Repeat (int m) : constructor to initialize the data members cap = m, f = -1, r = -1 and to create the integer array void pushvalue (int v) : to add integer from the rear index if possible else display the message ( OVERFLOW ) int popvalue () : to remove and return element from the front. If array is empty then return -9999 void disp () : Displays the elements present in the list Specify the class Repeat giving details of the constructor (int), member function void pushvalue (int), int popvalue () and void disp (). The main ( ) function need not be written. Question 12 (a) (b) Write an algorithm for push operation (to add elements) in a based stack. Answer the following question from the diagram of a Binary Tree given below: [2] (i) (ii) (iii) [1] [1] [1] Write the Pre order traversal of the above tree structure. State the height of the tree, if the root is at level 0 (zero). Draw the left sub tree. -----------------------------------------------------------------------------------------------------------------------6

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

 

comp_sc chat