ISC Class 12 Computer Science Paper 1 (Theory) Question Paper - 2019
ISC Class 12 Computer Science Paper 1 (Theory) Question Paper - 2019
PAPER 1
(THEORY)
(Maximum Marks: 70)
(Time allowed: Three hours)
(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 [ ].
---------------------------------------------------------------------------------------------------------------------
PART I (20 Marks)
m
Answer all questions.
While answering questions in this Part, indicate briefly your working and reasoning,
co
wherever required.
Question 1
a.
(a) Name and draw the logic gate represented by the following truth table, where A [1]
and B are inputs and X is the output.
di
A B X
rin
0 0 0
0 1 1
1 0 1
e
1 1 0
(b)
re
(e) If A= “It is cloudy” and B= “It is raining”, then write the proposition for: [1]
(i) Contrapositive
w
(ii) Converse
w
---------------------------------------------------------------------------------------------------------------------
w
Question 3
The following function Mystery( ) is a part of some class. What will the function [5]
Mystery( ) return when the value of num=43629, x=3 and y=4 respectively? Show the
m
dry run/ working.
co
int Mystery( int num, int x, int y)
{
if(num<10)
a.
return num;
di
else
{
rin
}
.c
}
w
w
w
-------------------------------------------------------------------------------------------------------------------------------
2
1219-868A
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 the Boolean function F(A, B, C, D) = Ʃ ( 0, 2, 3, 4, 5, 8, 10, 11, 12, 13 ).
(i) Reduce the above expression by using 4-variable Karnaugh map, showing [4]
the various groups (i.e. octal, quads and pairs).
(ii) Draw the logic gate diagram for the reduced expression using only NAND [1]
gates. Assume that the variables and their complements are available as
inputs.
(b) Given the Boolean function: F(P, Q, R, S) = ( 0, 1, 2, 8, 9, 11, 13, 15 ).
(i) Reduce the above expression by using 4-variable Karnaugh map, showing [4]
m
the various groups (i.e. octal, quads and pairs).
(ii) Draw the logic gate diagram for the reduced expression using only NOR [1]
co
gates. Assume that the variables and their complements are available as
inputs. a.
Question 5
(a) How is a decoder different from a multiplexer? Write the truth table and draw the [5]
di
logic circuit diagram for a 3 to 8 decoder and explain its working.
(b) From the logic circuit diagram given below, derive the Boolean expression and [3]
rin
simplify it to show that it represents a logic gate. Name and draw the logic gate.
e
X •
re
Y
F
a
Z
.c
w
(c) Using a truth table, state whether the following proposition is a Tautology, [2]
Contradiction or Contingency:
w
-------------------------------------------------------------------------------------------------------------------------------
3
1219-868A Turn over
Question 6
(a) The owner of a company pays bonus to his salesmen as per the criteria given [5]
below:
If the salesman works overtime for more than 4 hours but does not
work on off days/holidays.
OR
If the salesman works when festival sales are on and updates showroom
arrangements.
OR
If the salesman works on an off day/holiday when the festival sales are
on.
The inputs are:
INPUTS
O Works overtime for more than 4 hours
m
F Festival sales are on
H Working on an off day/holiday
co
U Updates showroom arrangements
(In all the above cases 1 indicates yes and 0 indicates no.)
a.
Output : X [1 indicates yes, 0 indicates no for all cases]
Draw the truth table for the inputs and outputs given above and write the POS
di
expression for X(O,F,H,U).
rin
(b) What is a half adder? Write the truth table and derive an SOP expression for sum [3]
and carry for a half adder.
-------------------------------------------------------------------------------------------------------------------------------
4
1219-868A
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
Design a class ArmNum to check if a given number is an Armstrong number or not. [10]
[A number is said to be Armstrong if sum of its digits raised to the power of length of the
number is equal to the number]
Example : 371 = 33 + 73 + 13
1634 = 14 + 64 + 34 + 44
54748 = 55 + 45 + 75 + 45 + 85
Thus 371, 1634 and 54748 are all examples of Armstrong numbers.
Some of the members of the class are given below:
m
Class name : ArmNum
Data members/instance variables:
co
n : to store the number
l : to store the length of the number
a.
Methods/Member functions:
ArmNum (int nn) :
parameterized constructor to initialize the data
di
member n=nn
int sum_pow(int i) : returns the sum of each digit raised to the
power of the length of the number using
rin
recursive technique
eg. 34 will return 32 + 42 (as the length of the
number is 2)
e
Specify the class ArmNum giving details of the constructor( ), int sum_pow(int) and
.c
void isArmstrong( ). Define a main( ) function to create an object and call the
functions accordingly to enable the task.
w
w
w
-------------------------------------------------------------------------------------------------------------------------------
5
1219-868A Turn over
Question 8
Design a class MatRev to reverse each element of a matrix. [10]
Example:
72 371 5 27 173 5
becomes
12 6 426 21 6 624
5 123 94 5 321 49
m
n : to store the number of columns
Member functions/methods:
co
MatRev(int mm, int nn) : parameterised constructor to initialise the data
members m = mm and n = nn
void fillarray( ) : to enter elements in the array
a.
int reverse(int x) : returns the reverse of the number x
void revMat( MatRev P) : reverses each element of the array of the
di
parameterized object and stores it in the array of
the current object
rin
int reverse(int), void revMat(MatRev) and void show( ). Define the main( ) function to
create objects and call the functions accordingly to enable the task.
a re
.c
w
w
w
-------------------------------------------------------------------------------------------------------------------------------
6
1219-868A
Question 9
A class Rearrange has been defined to modify a word by bringing all the vowels in the [10]
word at the beginning followed by the consonants.
Example: ORIGINAL becomes OIIARGNL
m
void readword( ) : to accept the word in UPPER case
co
void freq_vow_con( ) : finds the frequency of vowels and consonants
in the word and displays them with an
appropriate message
a.
void arrange( ) : rearranges the word by bringing the vowels at
the beginning followed by consonants
di
void display( ) : displays the original word along with the
rearranged word
rin
Specify the class Rearrange, giving the details of the constructor( ), void readword( ),
void freq_vow_con( ), void arrange( ) and void display( ). Define the main( ) function to
create an object and call the functions accordingly to enable the task.
e
a re
.c
w
w
w
-------------------------------------------------------------------------------------------------------------------------------
7
1219-868A Turn over
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 are not required.)
Question 10
A super class Record contains names and marks of the students in two different single [5]
dimensional arrays. Define a sub class Highest to display the names of the students
obtaining the highest mark.
The details of the members of both the classes are given below:
Class name : Record
Data member/instance variable:
m
n[ ] : array to store names
m[ ] : array to store marks
size : to store the number of students
co
Member functions/methods:
Record(int cap) : parameterized constructor to initialize the data
a.member size = cap
void readarray() : to enter elements in both the arrays
di
void display( ) : displays the array elements
Class name: Highest
rin
void display( ) : displays the array elements along with the names
.c
Assume that the super class Record has been defined. Using the concept of inheritance,
specify the class Highest giving the details of the constructor(…),void find( ) and
w
void display( ).
The super class, main function and algorithm need NOT be written.
w
-------------------------------------------------------------------------------------------------------------------------------
8
1219-868A
Question 11
A linear data structure enables the user to add 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
m
void pushadd(String n) : to add address in the diary from the
rear end if possible, otherwise display
co
the message “ NO SPACE”
String popadd( ) : removes and returns the address from
the front end of the diary if any, else
a.
returns “?????”
void show( ) : displays all the addresses in the diary
di
(a) Specify the class Diary giving details of the functions void pushadd(String) and [4]
String popadd( ). Assume that the other functions have been defined.
rin
Question 12
(a) A linked list is formed from the objects of the class Node. The class structure of the [2]
a
class Node
{
int num;
w
Node next;
}
w
Write an Algorithm OR a Method to find and display the sum of even integers from
an existing linked list.
w
E B
G C D
I H F
(i) Write the pre-order traversal of the above tree structure. [1]
(ii) State the size of the tree. [1]
(iii) Name the siblings of the nodes E and G. [1]
m
co
a.
di
e rin
a re
.c
w
w
w
-------------------------------------------------------------------------------------------------------------------------------
10
1219-868A