 ## ISC sample paper 2021

ISC sample paper 2021

## JAVA videos

Answer all questions in Part I (compulsory) and seven questions from Part-II, choosing three 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 [ ].

PART I

Question 1.                                                                     [1X5=5]

(a)State the complementary law and prove it with the help of a truth table.

(b)Draw the truth table to prove the propositional logic expression.

(X ^( Y v Z)) = (X^ Y)V (X^Z)

(c)Find the dual for the Boolean equation: P’ Q’+QS’ +1 = 1.

(d)Convert the Boolean expression F(A,B,C) = ABC+A’B’C’+AB’C into its

cardinal form.

(e)Minimize: F = AB + (AC)’ +AB’C using Boolean laws.

Question 2.                                                                [2 x 5 =10]
a)  State the difference between the functions next() and nextLine().
b) Find the complement of X.(Y.Z’+ Y’X) using De Morgan’s law. Do not reduce the expression.

c)   State the sequence of traversing binary tree in :
i)          Preorder ii)         Postorder

d) Convert the following infix expression into its postfix form: A+B*C- D/E

e) For an array of real numbers x[-6…8, -12…. 20], find the address of x , if x is stored in location

100 in the column major order. Assume that each element requires 4 bytes.

Question3.                                                          

The following is a function of some class. What will be the output of the function display( ) when the value of val is equal to 6?Show the dry run / working.

int display (int val)

{

if(val==0)

return 0;

else

return val+ display(val-1);

}

ICSE sample paper 2021 computer applications

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

Question 4.
(a) Given the Boolean function F (A, B, C, D) (1, 3, 5, 7, 8, 9, 10, 11, 14, 15).

(i) Reduce the above expression by using 4-variable Karnaugh map, showing the various

groups (i.e. octal, quads and pairs).                                                           

(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables

and their complements are available as inputs.                                         

(6) Given the Boolean function: F (P,Q,R,S) = T (4, 6, 7, 10, 11, 12, 14, 15)

(i) Reduce the above expression by using the 4-variable Karnaugh map, showing the

Various groups (i.e, octal, quads and pairs).                                              

(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables

and their complements are available as inputs.                                          

Question 5

(a) How is a decoder different from a multiplexer? Write the truth table and draw the

logic circuit diagram for a 3 to 8 decoder and explain its working.    

(b) Draw the logic circuit and truth table for half adder.              

(c) Using a truth table, state whether the following proposition is a Tautology, Contradiction or contingency:      ~(P =>Q)< =>(~PVQ)                

Question 6.

1. The main safe in the nationalized bank can be opened by means of a unique password consisting of three parts.  Different parts of the password are held by the chairman, Regional Manager, Bank Manager and Head Cashier of the bank, respectively.

In order to open the safe any one of the following conditions must be satisfied:

The password of the chairman, together with passwords of any two other officials, must be entered.

OR

The password of all three bank officials, excluding the chairman, must be entered.

The inputs are: INPUTS

B                          Denotes the Regional Manager’s password

C                          Denotes the Bank Manager’s password

Output

X           Denotes the safe can be opened [ 1 indicates YES ad 0 indicates NO in all cases]

Draw the truth table for the inputs and outputs given above and write the SOP expression for X(A,B,C,D).                                                                                                        

2. What do you understand by a multiplexer? Explain an 8 to 1 multiplexer with the truth table and logic circuit.                                   

Section B

ISC sample paper 2021

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 recursion has been defined to find the Fibonacci series upto a limit. Some of the members of the class are given below:

Class Name                                 :                           Recursion

Data Members:

a, b,  c, limit                                :                           int

Member functions

Recursion()         :      constructor to assign a,b,c with appropriate values.

void input()                                   :      to accept the limit of the series.

int fib(int n)    :       to return the nth Fibonacci term using recursive technique.

void genearatefibseries()              :      to generate the Fibonacci series upto the given limit.

Specify   the   class   recursion   giving   details   of   the   constructor,   int   fib()    ,   void generatefibseries()and  the main function.           

Question8.                                                                                                    

A perfect square is an integer which is the square of another integer.  For example, 4, 9,16  are perfect squares. Design a Class Perfect with the following description:

Specify  the  class  Perfect  giving details of the constructors, void perfect_sq( ) and void sum_of(). Also define the main function to create an object and call methods accordingly to enable the task.

Question 9.

Design a class modify has been defined with the following details                         

Section C

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 consumer wants to computerized his electricity bill calculations for his/her own purpose. There is class meter which contains meter details and another class ElectricityBill which calculates the bill amount. The details of both the classes are as given below:

Class name                             :           Meter

Data members                       :

meternum                    :           long integer data to store meter number.

name                            :           string data to store name of consumer.

mcharge                       :           double type data to store meter rental charges.

Member functions                 :

Meter(long m, double ch, long p)       :           a constructor to assign m to meternum, ch to mcharge

void readname()               :           to accept name of consumer.

Class name                             :           ElectricityBill

Data members                       :

rate                              :           stores rate per unit.

units                            :           stores total units consumed

amt                              :           stores total bill amount

Member functions                 :

ElectricityBill(……..) :           constructor to initialize the data members and assign 3.50 to rate.

double calculations()   :           to find total units consumed and returns the bill amount (units * rate

per unit) to be paid by the consumer.

void dispBill()             :           to display electricity bill in the following format

Meter              Name   Rental             Previous         Current          Rate                Total               Bill

Question 11.
A linear data structure enables the user to add an address from rear end and remove address from front. Define a class Diary with the following details :

Class name: Diary

Data members/instance variables:

Q[]: array to store the addresses

size: stores the maximum capacity of the array

start: to point the index of the front end

end: to point the index of the rear end

Member functions:

Diary(int max): constructor to initialize the data member size = max, start=0 and end=0

void pushadd(String n): to add the address in the diary from the rear end if possible, otherwise display the message “NO SPACE”

String popadd(): removes and returns the address from the front end of the diary if any, else returns “?????”

void show (): displays all the addresses in the diary

(a) Specify the class Diary giving details of the functions void pushadd(String) and String popadd(). Assume that other functions have been defined. The main function need NOT be written.      

(b) Name the entity used in the above data structure arrangement.                                            

Question 12.
Answer the following questions from the diagram of a binary tree given below.                       

1. root of the tree
2.  Size of the  tree
3. Preorder Traversal
1. Postorder Traversal
1. Inorder traversal
ISC sample paper 2021