Trending ▼   ResFinder  

ISC Class XII Sample / Model Paper 2023 : Computer Science

9 pages, 49 questions, 0 questions with responses, 0 total responses,    0    0
Divya SN
Ebenezer International School (EISB), Bangalore
+Fave Message
 Home > divyasn >

Formatting page ...

KARNATAKA ICSE SCHOOLS ASSOCIATION ISC STD. XII Preparatory Examination 2023 SUBJECT: Computer Science Paper I Time: 2.00 p.m. Duration: 3 Hrs. Date: 20.01.2023 Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time.) 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 including rough work, should be done on the same sheet as the question. The intended marks for questions or parts of questions are given in brackets [ ] PART- I [20 Marks] Attempt all questions While answering the questions in this Part, briefly indicate the working and reasoning, wherever required. Question 1 (i) The dual of the expression, (A+0).(A+1.A ) is (a) (A .0) + (A .1+A) [1] (b) (A.1) + (A.0+A ) (c) (A .1). (A +0+A) (d) (A.0) + (A.1+A ) (ii) Select the Canonical SOP expression for the expression A+BC [1] (a) ABC + ABC + AB C + AB C + A BC (b) A B C + A BC + AB C + AB C + ABC (c) AB + AC + A C + AB + BC (d) ABC + A BC (iii) Which among the following best describes the concept of Inheritance [1] (a) Using the code already written once (b) Using already defined functions in a programming language (c) Copying the code already written (d) Using the data and functions into the derived segment (iv) A java interface can contain [1] (a) public static final variables only (b) public abstract methods (c) Both public static final variables and abstract methods (d) abstract methods (unimplemented) and implemented methods both 1 (v) Give the output of the following code: [1] class Person { private int age; private Person() { age = 24; } } public class Test { public static void main(String[] args) { Person p = new Person(); System.out.println(p.age); } } (a) 24 (b) 0 (c) Compile-time error (d) Run-time error (vi) State the Absorption Laws. [1] (vii) Verify that ~(A^B) v (A B) is a Tautology. [1] (viii) Differentiate between Direct and Indirect recursion. [1] (ix) Prove that complement of A. (A+B). B. (B+C ) is a Universal Gate. [1] (x) Differentiate between Stacks and Queues. [1] Question 2 (i) Convert the following infix expression to postfix expression using the reverse Polish notation form: (A * (B + (C+D) * (E+F) /G) * H (ii) [2] An array A[25][20] is stored along the row in memory with each element requiring 2 bytes of storage. If the base address of the array A[][] is 42000, find the location of A[10][15]. Also, find the total number of elements in the array. (iii) [2] The following function is a part of some class. Assume n is a positive integer. Answer the given questions: int unknown(int n) { int i,k; if(n%2==0) { i = n/2; k=1; } 2 else { k=n; n--; i = n/2; } while(i>0) { k=k*i*n; i - -; n - -; } return k; } (a) What will be the output returned by the function unknown(5)? (b) What is the task performed by the function unknown() in the above code segment? (iv) [2] [1] Predict the answers that follow with a dry run. int arr[] = {22,16,8,9,12,3,0}; for(int a = 0; a<5; a++) { for(int b = 0;b < 5-a; b++) { if(arr[b] > arr[b+1]) { int t = arr[b]; arr[b] = arr[b+1]; arr[b+1] = t; } } } (a) State the final values of a and b after execution (b) What are the values stored in arr[] after the execution of the above code segment? (c) Name the sorting technique used in the above program snippet. [1] [1] [1] 3 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 3 (i) Given the Boolean function F(A,B,C,D) = (0,1,4,5,6,7,11,12,13,14,15) (a) Reduce the above expression by using a 4-variable Karnaugh map, showing the various groups (i.e. octal, quad or pairs). [4] (b) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. (ii) [1] Given the Boolean function F(X,Y,Z,W) = (1,7,6,8,9,12,13,14,15) (a) Reduce the above expression by using a 4-variable Karnaugh map, showing the various groups (i.e. octal, quad or pairs). [4] (b) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1] Question 4 (i) In a Home Delivery Store, it was observed that the Sales were more if any one of the following conditions were true. There were rains and the time was after 8 p.m. The season was Summer, and the year-end sale was on. Th year-end sale was on but there was rain. The time was not after 8 p.m. and the year-end sale was not on The inputs are: INPUTS R There was rain S The season was summer T The time was after 8 p.m. Y The year-end sale was on Output: X- Denotes high sales [1 indicates a Yes and 0 indicates a No, in all cases]. Draw the truth table for the inputs and output given above. Derive the Minterms from the truth (ii) table and write the SOP expression for X(R,S,T,Y) [5] Simplify the following expression using Boolean Laws, [3] (A+C) (AD+AD )+AC+C 4 (iii) Obtain the Boolean Expression for the logic circuit shown below: [2] Question 5 (i) (ii) What is an Encoder? Draw the logic diagram for an Octal to Binary Encoder. State one application of an Encoder. [5] Verify if the following proposition is valid, [3] (~a v b) ^ (~b v a) = a b (iii) Derive the Boolean expression for a logic circuit that will have outputs 0 only when, [2] X = 1, Y = 1, Z=1; X= 0, Y = 0, Z=0; X=1, Y=0, Z=0; The outputs are 1 for all other cases. 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 6 [10] Define a class TwistedPrime to check if a given number is a Twisted Prime number or not. [A number is said to be 'Twisted Prime', if the input number is a prime number and the new number obtained after reversing the digits is also a prime number.] Sample Input: 167 Sample Output: 167 is a 'Twisted Prime'. The class is designed with the following specifications: Data members n : integer value Member functions TwistedPrime() : default constructor to initialize the data member to legal initial value. void accept() : to accept a positive integer number. int reverse(int y,int r) : that accepts a number and returns its reverse using Recursive technique. Boolean isPrime(int x): function that checks if a number is prime or not and returns a Boolean value. display(Boolean a, Boolean b) : displays if the input number is a Twisted Prime or not. 5 Specify the class TwistedPrime giving details of the constructor(), void accept(), int reverse(int,int), Boolean isPrime(int) and void display(Boolean, Boolean). Define a main() function to create an object and invoke the functions accordingly to enable the task. Question 7 [10] A class Reverse has been defined to add the elements of two arrays and store the reverse of each added value in a new array. Example: Array 1 Array 2 3 4 8 2 7 5 9 2 33 11 4 50 23 13 6 12 8 17 Output: New array 5 11 31 2 6 38 53 12 32 Some of the members of the class are given below: Class name : Reverse Data members arr[ ] [ ] :to store integer elements m : to store the number of rows n : to store the number of columns Member methods Reverse(int x, int y) : parameterized constructor to initialize the data members to m = x and n = y. void fillarray() : to enter the elements into the array void AddReverse(Reverse A, Reverse B): adds the elements of the two parameterized objects A and B, reverses the sum of the elements and stores the reversed number in the array of the current object. void show() : displays the array elements in matrix form. Define the class Reverse giving details of the constructor(), void fillarray(), void AddRevers(Reverse, Reverse) and void show(). Define the main () function to create objects and call the functions accordingly to enable the task. 6 Question 8 [10] Design a class Change which toggles a word by converting all vowels to the next letter and all consonants to previous letter present in the word. Example: INPUT: Motivate OUTPUT: Lpsjubsf The details of the class are given below: Class name: Change Data members Str : stores the input word Newstr : stores the toggled word len : to store the length of the word Member methods Change() : default constructor void readword(): to accept the word void swap() : converts all the vowels to the next alphabet and all consonants to previous alphabet and store it in Newstr. void display() : displays the original word along with the new word. Specify the class Change giving the details of the constructor, void readword(), void swap(), and void display(). Define the main() function to create an object and call the functions 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 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 9 [5] Rack is a kind of data structure which can store at the most 20 books. The rack restriction is that a book can be kept into the rack or removed only at one end. i.e., on the top. The class Rack has the following details: Class name : Rack 7 Data members/instance variables Book [ ] : array of string of maximum 50 locations to store books. name : string variable to store the book name limit : integer variable to store the number of books in the array. top : integer to indicate the topmost book in the Rack Member methods Rack() : constructor to store empty string in the array Book[ ] Rack(int n) : constructor to assign n to limit and -1 to top. Boolean ifEmpty() : returns true if rack is empty, otherwise returns false. void putBook(): input the name of the book and store it in the variable name and add it on top of the array Book[ ] if the rack is empty, otherwise prints a message Rack overflow . void removeBook() : removes a book from the top of the rack, if the rack is not empty and prints the book name, otherwise, outputs a message Rack underflow . void dispList(): to display the list in the rack. Specify the class Rack giving the details of the functions ifEmpty(), void putBook(), void removeBook() only. Assume that the other functions are already written. You do not need to write the main() function. Question 10 [5] A super class Employee has been defined to store the details of an Employee. The basic salary is undergoing a revision for all employees within the organization. Design a subclass Grade_Revision to calculate the new basic salary of the employee based on the number of years of experience. The details of the members of both classes are given below: Class name : Employee Data members name : to store the name of the employee basic : to store the basic salary of the employe Member methods Employee( ) : parameterized constructor to assign values to data members void display() : to display the employee details. Class name : Grade_Revision Data members exp : to store the number of years of experience of the employee designation : Designation of the employee increment : to store the increment amount nbasic : to store the new basic salary of the employee(basic+increment) 8 Member Methods Grade_Revision( ): parameterized constructor to initialize the data members of both classes. Experience(in years) Increment Up to 3 years Rs. 1000 + 10% of basic 3 years or more and up to 5 years Rs. 3000 + 12 % of basic 5 years or more and up to 10 years Rs. 5000 + 15 % of basic 10 years or more Rs. 8000 + 20% of basic void calculate(): to calculate the increment for the employee based on the following slab void display() : to display the details of the employee along with the increment and new basic salary. Assume the super class Employee has been defined. Using the concept of inheritance, specify the class Grade_Revision giving the details of the constructor( ), void calculate() and void display(). The super class and main() function need not be written. Question 11 (i) A Linked list is formed from the objects of the class, [2] class Node { int num; Node next; } Write an algorithm OR a method to count the number of nodes in a given linked list. The method declaration is given below: int count(Node start) (ii) Answer the following questions from the diagram of a Binary Tree given below: (a) Write the Pre-order Traversal of the above Tree structure [1] (b) State the height of the tree. [1] (c) Write the path between A to L. [1] ****END OF PAPER***** 9

Formatting page ...

Related ResPapers
ISC Class XII Sample / Model Paper 2023 : Computer Science
by nil199306 
ISC Class XII Sample / Model Paper 2023 : Computer Science
by divyasn 
ISC Class XII Sample / Model Paper 2024 :
by cindy23 
ISC Class XII Sample / Model Paper 2024 : Computer Science
by comp_sc 

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

 

divyasn chat