Trending ▼   ResFinder  

ISC Class XII Prelims 2019 : Computer Science (Jamnabai Narsee School (JNS), Mumbai)

8 pages, 46 questions, 19 questions with responses, 19 total responses,    3    0
Minu Joshi
Jamnabai Narsee School (JNS), Mumbai
+Fave Message
 Home > minujoshi >   F Also featured on: School Page isc

Formatting page ...

FIRST PRELIMINARY EXAMINATION NOVEMBER 2018 COMPUTER SCIENCE Paper - 1 (THEORY) Class: XII - ISC Marks: 70 Time: 3 Hrs. Date: 30/11/2018 (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 [ ]. This paper Consists of 8 printed pages ____________________________________________________________________________________ PART I Answer all questions While answering questions in this Part, indicate briefly your working and reasoning, wherever required . Question 1. a) State the Boolean expression and draw the truth table for the propositional logic p q. [1] b) Verify the Boolean expression using truth table : A+A = A. [1] Also name the law stated above. c) Consider the statement if an odd number of input signals are 1 then output is 1 [1] otherwise 0 . Name the gate represented by the given statement and also draw its symbol using two inputs. d) Using the truth table prove that p q p q [1] e) Reduce the expression : F = A.B + A .B + A.B +A .B [1] 1 Question 2. a) Define the term inheritance. How is it useful in programming? [2] b) Convert the given expression to postfix form: [2] X+Y*Z^P(M/N+Q) c) Each element of an array X[30][20] requires 4 bytes of storage in the memory. If the [2] address at X[6][8] is 5020, find the Base Address at X[0][0] when the array is stored as Row Major Wise. d) Explain Worst case complexity of an algorithm with the help of an example. [2] e) What is interface? How does it differ from abstract class? [2] Question 3. a) Give output of the following where x and y are arguments greater then 0. Show dry run/working. void confusing ( int x, int y) { if( x > y ) // base case { if ( x % y = = 0 ) { System.out.print( y + ); confusing( x / y , y) } //end of inner if else confusing( x , y + 1); } //end of outer if } // end of function confusing i) What will the function confusing(24,2) return? [2] ii) What will the confusing(84,2) return? [2] iii) In one line state what the function confusing ( ) is doing, apart from recursion. [1] 2 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. a) (i) Given the Boolean function F ( a,b,c,d) = ( 0,1,2,4,5,6,8,9,12,13,14) Reduce the above expression using 4-Variable Karnaugh map, showing the various [4] groups (i.e. octal , quads and pairs). (ii) Draw the logic diagram for the reduced SOP expression. Assume that the variable and [1] their complements are available as inputs. b) (i) Given the Boolean function F(p,q,r,s) = ( 7,11,12,13,14,15) Reduce the above expression using 4-Variable Karnaugh map, showing the various [4] groups (i.e. octal , quads and pairs). (ii) Draw the logic diagram for the reduced POS expression. Assume that the variable and [1] their complements are available as inputs. Question 5. a) Draw the truth table and logic diagram Binary to Hexadecimal Decoder. [4] b) Draw a logic diagram for the following function using NOR gates : [2] F( A, B . C) = (A + B ) . ( B + C) c) Convert the following expression into canonical Sum-Of-Product form: [2] F(X,Y,Z) = X .Y +X .Y +Y.Z d) From the logic circuit diagram given below name the outputs (1) , (2) and (3) , Finally derive the Boolean expression and simplify it to show that it represents a logic gate. Name and draw the logic gate. 3 [2] Question 6. a) How many select lines does 4 : 1 multiplexer have? Draw the truth table and logic [4] gate diagram for 4 : 1 multiplexer and briefly explain its working. b) A combinational logic circuit with three inputs P, Q, R produces output 1 if and only [4] if an odd number of 0 s are inputs. i) Draw its truth table ii) Derive a canonical SOP expression for the above truth table. iii) Find the complement of the above derived expression using De Morgan s theorem and verify if its equivalent to POS expression. c) Prove that the complement of A.(A+B) . B.(B+C ) is Universal Gate. [2] 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. A class Check defines a recursive function to perform the string related operations. [10] The details of the class are given below: Class name Data Members Str : Check : to store the string. w : integer variable. C,S : integer variables to store the count of capital and small letters. Member functions Check( ) : constructor to initialize the data members. void inputString( ) : to input the string. void counter ( ) : to count total number of words starting with the vowels and store in w. void checkLetters( int ) : to count the total numbers of capital and total number of small letters present in Str using recursive technique and store in C and S respectively. void display() : to display W , C and S with proper message. Specify the class Check giving details of the constructor Check( ) int inputString ( ) , void counter( ) , void checkLetters(int ) and void display( ). Also define the main function to create an object and call methods accordingly to enable the task. 4 Question 8. The sum of angles is calculated as : [10] Let the first angle = 20 degrees 45 minutes Let the second angle = 12 degrees 40 minutes The sum of angles will be 33 degrees 25 minutes. (where 60 minutes = 1 degree) Design a class Angle with the following details: Class name : Class name : Angle Data Members deg : integer to store degree. min : integer to store minutes. Member functions Angle( ) : constructor to assign 0 to deg and min. void inputAngle( ) : to input the values of deg and min. void dispAngle( ) :to print the values of deg and min with proper message. Angle sumAngl (Angle A , Angle B) : to find and return the sum of angles from objects A and B by using the above technique of adding angles. Specify the class Angle giving details of the constructor( ), and all other functions. Also define the main function to create an object and call methods accordingly to enable the task. Question 9. A class Convert has been defined to express digits of an integer in words The details of the class are given below: Example : Input : 479 Output : 479 is expressed as Four Seven Nine. Class name : Convert Data Members n : integer whose digits are to be expressed in words. Member functions Convert( ) : constructor to assign 0 to n. void inpNum( ) : to accept value of n. void num_word(int x) : to print the word for x. void extdigit ( ) : to call num_word with extracted digit from n. Specify the class Convert giving details of the constructor Convert( ), void inpNum( ) , void num_word( ) and void extdigit( ). Also define the main function to create an object and call methods accordingly to enable the task. 5 [10] 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 Bank defines account holder related information such as name and account number while another class Deposit defines amount to make a fixed deposit. The details of both the classes are given below. Class name : Bank Data members nam : string variable to store the name of the account holder. AccNo : long integer variable to store account number. Member functions Bank( ..) : constructor to store 0 to AccNo and blank to nam; void show_det : to display Name and Acoount number. Class name : Deposit Data members amt : double variable to store amount to be deposited as fixed deposit. Time : double variable to store time period in years. Rate : double variable to store current rate of interest on fixed deposits. CI : double variable to find and store compound interest. Maturity : double variable to store maturity amount after Time years. Member functions Deposit ( ) : parameterized constructor to assign values to the Data members of both the classes and CI and Maturity 0.0. void calculate( ) : calculates the compound interest and maturity amount using the formula: CI = (amt *(1+rate/100)time) amt Maturity = amt + CI. void show_det( ) : to display the details of both the classes Assume that the super class Bank has been defined. Using the concept of Inheritance, specify the class Deposit giving details of the constructor( .) , void calculate( ) , and void show_det( ), The super class and the main function need not be written. 6 [5] Question 11. Number is a kind of entity which can hold 40 numbers with decimals at the most. The Number allows the user to add and remove a number from both the ends. A class Number is declared with following details: Class name : Number Data members num[ ] : array of double data type to hold elements of array cap : stores the maximum capacity of array. front : stores the front index. rear : stores the rear index. Member functions Number ( int size) : constructor to initialize cap = size and front =rear = 0. void insertfront ( double v) : adds the v at the front index if possible otherwise displays the message Full from front . double exitfront ( ) : remove and return element from the front if possible and if array is empty then return 999.99 void insertrear ( double v) : adds the v at the rear index if possible otherwise displays the message Full from front . double exitrear ( ) : remove and return element from the rear if possible and if array is empty then return 999.99 a) Specify the class Number giving the details of the constructor( ) and the functions void insert front( double ) , double exitfront( ), void insertrear( double) and exitrear( ). [4] Assume that other functions if any have been defined. The algorithm and main function need not be written. [1] b) What is the common name given to the entity above? 7 Question 12. a) A linked list is formed from the objects of the class Node. The class structure of [2] the Node is given below: class Node { int num; Node link; } Write an algorithm or a method to add Node at the end of the linked list. The method declaration is as void addNode(Node S) b) Answer the following questions from the binary tree given below. M N P O Q S R T i. Write the pre-order traversal of the tree [1] ii. Name the root and leaves of the right sub tree [1] iii. Write the depth of the sub-tree. [1] ---------------------------------------- XXXXX---------------------------------- 8

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Arnav Mehta

(6)

Kalpit Patil

(4)

Shreyas Minocha

(4)

Anonymous

(1)

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

 

minujoshi chat