Formatting page ...
ASSOCIATION OF ODISHA ICSE SCHOOLS MODEL EXAMINATION-2020 COMPUTER SCIENCE PAPER I(THEORY) ( Three Hours ) 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 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 give 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) What is the use of principle of duality? [1 b) Write the converse and contrapositive expression for P Q [1 c) Convert F(X,Y,Z) = X Y +YZ to SOP form. [1 d) Draw the gate and expression for X Y [1 e) Find the expression of X for the given truth table: [1 A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 X 1 0 0 1 0 1 1 0 Question 2: a) Construct the binary tree using the following given orders: Inorder: BDCEAFG Preorder: ABCDEFG b) Convert -A/B*C + (D*G/E)-F to its postfix form. c) Differentiate between the keywords extends and implements. d) An array A[-4..6 , -2..12] stores elements in row major wise, with the address A[2][3] as 4142. If each element requires 2 bytes of storage, find the base address. e) What is the advantage of a circular queue over linear queue? Question 3: What will be the output of the following function segment if String n= WELLDONE and int y= 7? (Show the working) [2 [2 [2 [2 [2 [5 public void cal(String n, int y) { if (y>=0) { System.out.print((char)(n.charAt(y)+1)); cal(n,y-2); } return; } 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 F(Q,R,S,T) = (0,2,4,5,6,7,14). Reduce the POS equivalent of the expression. Draw the logic network for the reduced expression. [5 b) Simplify the given expression using Boolean laws. (mention the laws used in each step) [3 F= X Y Z + X Y Z + X YZ + X YZ + XY Z + XYZ c) Verify if the given proposition is valid or not: [2 (a b) ^ (b c) = (a c) Question 5: a) Using Karnaugh map simplify the expression F(A,B,C,D) = ABC + B C D +CD + AB CD Draw the logic network of the reduced expression. b) Construct the truth table of full adder. c) Differentiate between canonical form and cardinal form of expression with example. [5 [3 [2 Question 6: a) A person is allowed to travel in a reserved coach of the train, if she satisfies the following criteria: The person has a valid ticket and an ID proof OR The person does not have a ticket, but holds a valid pass with a a valid ID proof OR The person is physically challenged and holds a pass and a valid ID proof Taking inputs as : T - has a ticket P - has a pass I -has a ID proof D - is physically challenged Output: b) c) A - allowed to travel In all the above cases 1 represents yes and 0 represents no. Draw the truth table for the inputs and outputs given above and write the POS expression for A(T,P,I,D) [5 Construct the circuit for 3 to 8 decoder. [3 Represent X using a single gate (show the working) [2 A B X A B 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 program must be written in java. Question 7: [10 A bouncy number is a number where the digits are neither in ascending nor in descending order. e.g. 8769 is a bouncy number whereas 4589 is not because the digits are in ascending order. Define a class check with Data members: int n to store the number boolean status to store true if the number is bouncy else store false. Member functions: default constructor to initialize the data members void accept( ) to enter the number void bouncy( ) - to check the number for bouncy void display( ) to print whether the number is bouncy or not . write main( ). Question 8: A class sentence is to be defined to manipulate a sentence. Members of the class are: Data member: String s : to store the sentence (in any case) String s1: to store the changed sentence Member functions: [10 sentence( ): constructor void accept( ): to accept the sentence void change(int index): a recursive function to change the cases of the alphabets in the sentence in such a manner that first alphabet will be in uppercase, second alphabet in lowercase, third alphabet in upper and so on eg. Input : Attempt 2 Programs changed sentence: AtTeMpT 2 pRoGrAmS void display( ): to print the changed sentence Define the class. Write main( ) to invoke the function. Question 9: [10 A class array is designed to manage array operations. The class has Data members: int a[ ] - integer array int n to store the size of the array Member functions: default constructor to initialize the data members void accept( ) to enter the limit n void create( ) to input the values in the array void common(array ob1, array ob2) : to find and print the common elements in the array of ob1 and ob2. Specify the class array with details of all the functions. Need not write main( ). 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 not required) Question 10: [5 An interface store is defined with a method bill( ) which returns the bill of the implementing items purchased. Create the classes grocery and packet which implement the interface store. These classes have attributes which reflect their values (weight for grocery and number for packets) which are set by their constructors. The details of the members of the interface and both the classes are given below: Interface : store Member functions: void bill( ): to calculate and print the bill Class name: grocery Data members: double r: to store rate per kg double w: to store the weight in kg member functions: grocery(double,double): to initialize the rate and the weight void bill(): to calculate (rate * weight) and print the bill Class name: packet double r: to store the rate per packet int p: to store number of packets member functions: packet(double, rate): to initialize the rate the number of packets purchased void bill( ): to calculate (rate * packets) and print the bill Assume that the interface store has been defined. Using the concept of inheritance, specify the classes grocery and packet giving details of their constructors and void bill( ) respectively. Need not write main( ). Question11. a) A linked list is formed from the objects of the class. The class structure is given below: [4 class Node { b) int info; Node link; } Write an algorithm OR a method for reversing the linked list. The method declaration is given: void reverselist(Node start). Give two applications of stack data structure. Question 12: a) Calculate the worst case complexity of the following code segment : for( i=1; i<=a;i++) System.out.println(i); for (i=1;i<=n;i++) { for (j=1;j<=n;j++) { System.out.println(j); } } b) What is the worst case and best case time complexity of Binary search algorithm? c) Relation between generation and level in a binary tree with example. --xx-- [1 [2 [2 [1
|