0% found this document useful (0 votes)
11 views

Computer Gp 1

The document is an ISC Class 12th Computer Science question paper covering topics in Boolean algebra, Java programming, and data structures. It includes multiple-choice questions, programming tasks, and theoretical questions related to computer science concepts. Students are required to answer a total of ten questions from various sections, demonstrating their understanding of the subject matter.

Uploaded by

gitamondal86
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Computer Gp 1

The document is an ISC Class 12th Computer Science question paper covering topics in Boolean algebra, Java programming, and data structures. It includes multiple-choice questions, programming tasks, and theoretical questions related to computer science concepts. Students are required to answer a total of ten questions from various sections, demonstrating their understanding of the subject matter.

Uploaded by

gitamondal86
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ISC CLASS 12TH COMPUTER GP – 01

Q.1
(i)Which of the following Boolean laws is correct? [1]

(a) A + AꞌB = A
(b) A(A + B) = A
(c) A(B + C) = AB + AC
(d) (A + B)(A + C) = A + BC

(ii) Assertion: The minterm AB'C'D has a value of 1.


Reason: B and C are complemented to make the product 0. [1]
(a) Both A and R are true and R is the correct explanation of A
(b) Both A and R are true but R is NOT the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true
(iii) According to duality principle, (P + Q')(R + 1) = PR + Q'R is equivalent to: [1]
(a) P'Q + R'1 = (P' + R)(Q + R')
(b) P'Q + R'0 = (P' + R')(Q + R)
(c) PQ' + R + 1 = (P + R')(Q' + R)
(d) PQ' + R0 = (P + R)(Q' + R)

(iv) The complement of (X'Y)' + Z is: [1]


(a) (X + Y)Z'
(b) XYZ
(c) (X' + Y')Z'
(d) (X' + Y')Z

(v) Equivalent of P∧Q ∨ ∼P∧∼Q is: [1]


(a) (P∧Q) ∨ ∼P) ∧∼Q
(b) (P∧Q) ∨ (∼P∧∼Q)
(c) P∧(Q∨∼P)∧∼Q
(d) P∧(Q∨(∼P∧∼Q))

(vi) Assertion: Boolean algebra and binary number system have some similarities. Reason:
Basic operations like AND, OR and NOT are common. [1]
(a) A is true, R is true and R correctly explains A
(b) A is true, R is true but R does not correctly explain A
(c) A is true but R is false
(d) A is false but R is true

(vii) What is the purpose of static for class data members? [1]

(viii) Give one use of interfaces in Java. [1]


(ix) Define canonical form of an expression. [1]

(x) Give one application each of half adder and full adder. [1]

Question 2:
(i) Convert the following infix expression to postfix form:
(P + Q) * (R – S) / T [2]

(ii) An array ARR[-3…..,4,-1……..8] stores elements row-wise with ARR[1][2] at address


2000. If each element is 4 bytes, find the base address.

(iii) Void Reverse (char arr [], int start , int end) {
If (start < end) {
Char temp = arr[start];
Arr[start] = arr[end];
Arr[end] = temp;
Reverse (arr, start + 1, end – 1);
}
}

Void Process String (String input) {


Char char Array [] = input.toChar Array();
Reverse (charArray, 0, charArray.length – 1);
System.out.println(charArray);
}

(a) What will be the output of ProcessString() when called with the input string
"JAVA"?

(b) What will be the output of ProcessString() when called with the input string
"HELLO"?

(c) Explain the functionality of the Reverse function and how it affects the output

(iv) int factorial(int n) {


Int result = ? 1 ?;
If (n = = 0 || n = = 1 )
Return 1;
Else {
For (int i = 2; i <=n; ?2?, i++);
Return ?3?;
}
}

(a) What should be replaced at ?1? to initialize the variable 'result' correctly?

(b) What should be replaced at ?2? to correctly compute the factorial within the loop?
(c) What should be replaced at ?3? to return the correct factorial value at the end of

the function?

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.

Question 3
A software engineer is designing a program that evaluates whether a computer

system in functioning well based on the following conditions:

• If the CPU and Memory perform well but the Storage does not perform

well.

OR

• If the GPU and Storage perform well but the CPU does not perform well.’

OR

• If all components perform well.

The inputs are:

• C (CPU performs well) where 1 indicates yes and 0 indicates no.

• M (Memory performs well) where 1 indicates yes and 0 indicates no.

• S (Storage performs well) where 1 indicates yes and 0 indicates no.

• G (GPU performs well) where 1 indicates yes and 0 indicates no.

The output is denotes as Y where 1 indicates a well-functioning system, and 0

indicates a system with issues.

Draw the truth table for the inputs and outputs given above and write the Sum of

Products (SOP) expression for Y(C,MS,G).

Reduce the above expression X (C,M,S,G) by using 4-variable Karnaugh map,

showing the various groups (i.e. octal, quads and pairs). Draw the logic gate

diagram for the reduced expression. Assume that the variables and their

complements are available as inputs.


Question – 4

(i)

(a) Reduce the Boolean function G(P,Q,R,S) = π(0,1,3,5,7,9,12,14,15) using a 4-

variable Karnaugh map. Clearly show the octal, quads, and pair groups.[4]

(b) Draw the logic gate diagram for the simplified expression. Assume that the

variables and their complements are available as inputs.[1]

(ii)

(a) Given the Boolean function H(A,B,C,D) = 𝜮 (1,3,5,7,9,11,12,15), use a4-variable

Karnaugh map to reduce the expression. Identify octal, quads, and pairs

groups.[4]

(b) Create the logic gate diagram for the simplified expression. Assume the

availability of both variables and their complements as inputs. [1]

Question :5

(a) Draw the logic circuit for a 3-to-8 decoder. Also, provide the truth table for the

decoder. (5)

(a) Determine the validity of the proposition. (3)

D⇒(E𝚲F)=(D⇒E)𝚲(E⇒ 𝑭) using a truth table.

(b) Write the SOP (Sum of Products) expression for the given Boolean function:

G(A,B,C)=𝜮(0,2,4,5). (2)

Question-6:
Design a class named “GoodNumber” to check if a given positive integer is a Good
Number or not. A Good Number is defined as a number that contains an odd number
of 1’ s in its binary equivalent.
Class name : Good
Data members/instance variables:
num : to store a positive
integer number bin : to
store the binary equivalent
Methods / Member
functions:
Evil( ) : default constructor to initialize the
data member with legal initial value
void accept Num( ) : to accept a positive integer number
void rec_bin (int x) : to convert the decimal number
into its binary equivalent using recursive technique
void check( ) : to check whether the given number is
an Good number by invoking the function rec_bin()
and
to display the result with an
appropriate message
Specify the class Good giving details of the constructor( ), void acceptNum( ),
void rec_bin(int) and void check( ). Define a main( ) function to create an
object and call all the functions accordingly to enable the task.

Question 7

A class Palindrom contains a two-dimensional array of order [m x n]. The


maximum values possible for both ‘m’ and ‘n’ is 20. Design a class
Palindrome to fill the array with the first (m x n) 3 digit palindromic
numbers in column wise.
[Palindrome numbers are those numbers which are looks similar
from both ends] The details of the members of the class are given
below:
Class name : Palindrome
Data members/instance variables:
arr[ ] [ ] : integer array to store the Palindromic numbers column wise
m: integer to store the number of rows
n: integer to store the
number of columns Member
functions/methods:
Palindrome(int mm, int nn ) : to initialize the size of the matrix,
m=mm and n=nn int is Palindrome( int p ) : to return 1 if the number
is composite otherwise returns 0
void fill ( ) : to fill the elements of the array with the first (m × n) Palindrome
numbers in column wise
void display( ) : to display the array in a matrix form
Specify the class Palindrome giving details of the constructor(int,int),
int is Palindrome(int), void fill( ) and void display( ). Define a main( )
function to create an object and call all the functions accordingly to enable
the task.

Question 8:
To translate word into Piglatin word, convert the word into uppercase and then
place the first vowel of the original word as the start of the new word along with the
remaining alphabets. The alphabets present before the vowel being shifted
towards the end followed by "AY".

Sample Input 1:
London Output:
ONDONLAY

Class name : Piglatin


Data members/instance variables:
word : to store a word
length : integer to store the
length of the word result: to
store the converted word
Methods / Member functions:
Piglatin( ) : default constructor to initialize data members with legal
initial values void acceptWord( ) : to accept a word
void change( ) : to convert the word in Piglatin form and
store it in result void display( ) : to display the original word
along with the encrypted word

Question : 9

A bookshelf is designed to store the books in a stack with LIFO(Last in First Out)
operation. Define a class book with the following specifications:
Class Name Book
Data members/instance variable:
Name[ ] : Stores the names of the book
Point : Stores the index of the topmost book
Max : Stores the maximum capacity of the bookshelf
Methods/Member Functions:
Book(int cap) : Constructor to initialise the data member max
= cap and point = -1
Void tell ( ) : Displays the name of the book which was last
Entered in the shelf. If there is no book left in
The shelf, displays the message
“SHELF EMPTY”
Void add(String v) : adds the name of the book to the shelf if
Possible, otherwise displays the message
“SHELF FULL”
Void Display ( ) : Displays all the names of the books available
In the shelf
Specify the class Book giving the details of ONLY the functions void tell ( ) and void
add (String). Assume that the other function have been defined.
The main function need not be written.
Question:10
A line on a plane can be represented by coordinates of the two-ends points p1 and p2
as p1(x1, y1) and p2(x2, y2).

A super class Plane is defined to represent a line and a sub class Circle to find the
length of the radius and the area of circle by using the required data members of
super class.
Some of the members of both the classes are given below:

Class name : Plane


Data members/instance variables :
X1 : to store the x-coordinate of the first end point
y1 : to store the y-coordinate of the first end point
Member functions/methods :
Plane( int nx, int ny ) : parameterized constructor to assign the data m
Members x1 = nx and y1 = ny
Void Show ( ) : to display the coordinate
Class name : Circle
Data members/instance variables:
X2 : to store the x-coordinate of the first end point
y2 : to store the y-coordinate of the second end
point
radius : double variable to store the radius of the circle
area : double variable to store the area of the circle

Member functions / methods


Circle (….) : parameterized constructor to assign values to
Data members of both the classes
Void find Radius( ) : to calculate the length of radius using the
Formula:
(√(𝒙𝟐 − 𝒙𝟏)𝟐 + (𝒚𝟐 − 𝒚𝟏)𝟐 )/ 2
Assuming that x1, y2, y1, y2 are the coordinates
Of the two ends of the diameter of a circle
Void find Area ( ) : to find the area of circle using formula: 𝝅𝒓𝟐 . The
Value of pie (π) is 22/7 or3.14
Void show ( ) : to display both the coordinates along with the
Length of the radius and area of the circle
Specify the class Plane giving details of the constructor and void Show ( ). Using the
concept of inheritance. Specify the class circle giving details of the constructor, void
The main function and algorithm need not be written.
Question : 11

a) Briefly explain the difference between LIFo and FIFO (2)

(b) Answer the following questions from the diagram of a Binary Tree Given below:

(i) Write the inorder traversal of the above tree structure.


(ii) Name the parent of the nodes B and G.
(iii) Name the leaves of the right sub-tree.

You might also like