Formatting page ...
ASSOCIATION OF ODISHA-CHHATTISGARH ICSE SCHOOLS MODEL EXAMINATION-2017 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 Answer all questions While answering questions in this Part, indicate briefly your working and reasoning, wherever required Question 1. a) Write the converse and inverse of A B. [1 b) Using truth table show that (A+B) + (A .B) = A [1 c) With an example explain the term redundant group in K-map. [1 d) Convert the expression (X Y) .(Y Z ) to its canonical SOP form. [1 e) Name the logic gate for the following circuit diagram and write its truth table. [1 Question 2. a) Convert ABC*DE/F^+H*+ to infix notation. [2 b) A two dimensional array X[4 7, LC 3] requires 2 bytes of storage space for each element. Base address is 100 and the address of X[6,2] is 128. Find the value of LC if the array is arranged in column major form. [2 c) Differentiate between LIFO and FIFO techniques of data processing.[2 d) Define the term method overriding . [2 e) State the difference between throw & throws in java program. [2 Question 3. a) find( ) is a part of a class. Answer the questions that follow after the segment. Show the dry run. void pf(int num, int x) { if (num>1) { if (num % x ==0) { System.out.println(x); pf(num / x, x); } else { pf(num, x+1); } } } i. ii. What will the output if num=24 and x=2? What is the function performed by pf( )? [2 [1 b) Answer the following questions after going through the function display( ). String display(int x) { if (x<=0) return # ; else return (display(x-2)+x+ # ); } i. ii. What will be the output for display(8)? What will be the output for display(6)? [1 [1 PART II 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. Given the boolean expression F(A,B,C,D)= (2,3,6,7,9,11,12,13,14,15) a) Reduce the above expression using K-map and draw the logic gate diagram of the reduced expression using only NOR gates. [5 b) What is full adder? Draw the truth table for a Full Adder and draw its logic circuit diagram. [3 c) State whether the following expression is a tautology/contradiction/contingency. [(A B)+(B C)] [2 Question 5. a) Reduce F(W,X,Y,Z)= (0,2,5,7,8,10,11,13,14,15) using K-map. Draw the logic network for the reduced expression using NAND gates only. [5 b) Define multiplexer. Draw the logic diagram of 8 x 1 multiplexer. [3 c) Simplify the following expression using boolean laws: [2 (A.B + X+Y+Z)(A.B+X .Y .Z ) Question 6. a) Write the SOP expression corresponding to the following table and draw its logic diagram. [5 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 D 0 0 1 1 0 0 1 1 b) Define maxterms and minterms. How are they related? [3 c) To get an output Y=1 from the circuit shown, write any 2 possibilities of the inputs of A, B and C. [2 A B Y C 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. a) A class sentence is to be defined to manipulate a sentence. Members of the class are: [9 Data member: String s : to store the sentence (in any case) String s1 : to store the changed sentence Member functions: sentence( ) void accept( ) : : constructor to accept the sentence void change( ) : 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. b) What is the difference between using = = and .equals( ) in strings? [1 Question 8. a) Define a class search to find the index of an integer using binary search technique from an integer array which is arranged in Ascending order. The class contains: [9 Data Members: n[ ] : integer array of maximum size 100 size : actual limit of n[ ] num : number to be searched l, u to store the lower and upper bound of the array : Member functions: search( ) : initialize 0 to n[ ] and other data members search( int, int ) : assign the size of n[ ] and the value of void accept( ) to create n[ ] num : int binsearch(int l, int u) : to return the index of num in the array if found, otherwise return -1. Use the recursive binary search technique to get the index. void result( ) : invoke int binsearch( ) and print the index if found otherwise print NOT FOUND Write the details of the class search giving the details of the constructors, int binsearch( ) and void result( ). Assume other functions are already written. Need not write main( ). b) Mention one advantage of using recursive function over iteration. [1 Question 9. a) Define the class number with the following number. Data members: int n : integer to store a number [9 Member functions: number( ) : constructor void readnum( ) : accept the number void square( ) : to print all the digits which are perfect square from the number n void prime( ) : to print all the prime digits from the number n Specify the details of the class. Write main( ) to call all the functions b) Write any 2 features of a default constructor. [1 SECTION C 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 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 not required) Question 10. [5 A class series defines to store Fibonacci series(0,1,1,2,3,5,8,. . . . . . . . . ) in an array while another class sum which is inherited form class series defines to find the sum of the values from the array. The details of both the classes are given. Data members : n : integer to store total number of terms f[ ] : to store n Fibonacci numbers Member functions void limit( ) 50) void generate( in the void display( ) Derived class name : : to input total number of terms in n (maximum ) : : : to generate and store n Fibonacci numbers array f[ ] print the array sum Data member: s : integer to store the sum Member function: sum( ) :default constructor to initialize s, invoke limit( ) and generate( ) of the base class void findsum( ) : to calculate the sum of all the values stored in the array f[ ] void display( ) : to display the array and the sum s Using the concept of inheritance, specify the class sum with all the member functions. Need not write the base class and main( ). Question 11. [5 Write a method insert(int ) to insert an element in the front of a deque data structure dq[ ] of size n. Question 12. a) Calculate the total time taken and the complexity of the following code: [2 c= 1; while (c<=n) { c++; } for(i=1;i<=n;i++) { for(j=1;j<=n;j++) { c=c+i+j; } } b) Write an algorithm to delete two values from an integer stack s[ ]. [3 --xx--
|