ClassX1 Annual
ClassX1 Annual
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)
Answer all questions
While answering questions in this part, indicate briefly your working and reasoning, wherever required.
Question 1:
a) State the Commutative law and prove it with the help of a truth table. [2]
b) Verify the following proposition with the help of a truth table: [2]
( P ^ Q) V ( P ^ ~ Q)=P
c) If(~P=>Q) then write its: [2]
i) Inverse
ii) Converse
d) State the law represented by the following proposition and prove it with the help of a truth table.
P V P=P [2]
e) Draw the logic diagram and truth table for a two input XNOR gate. [2]
Question 2:
a) What are the Wrapper classes? Give any two examples. [2]
b) What is exception handling? [2]
c) Differentiate between a constructor and a method of a class. [2]
d) Define the term ‘wff’’ in proposition logic. Give one example. [2]
e) Convert the following arithmetic expression into Java statement. [2]
Z=(X5 – Y4) / XY
Section – A
Answer any two questions
Question 3:
a) The following is a part of some class which checks if a positive integer is a Palindrome number by
returning true or false.(A number is said to be a palindrome if the reverse of the number is equal to
the original number) The function does not use the modulus (%) operator to extract digit. There are
some places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which may be replaced by a
statement/expression so that the function works properly.
boolean Palindrome(int n)
{
int rev=?1?;
int num=N;
while(num>0)
{
int f=num/10;
int s=?2?;
int digit=num-?3?;
rev= ?4? + digit;
num/=?5?;
}
if( rev=N)
return true;
else
return false;
}
What are the statement or expression at ?1?, ?2?, ?3?, ?4?, ?5? [5]
Question 5: [5+3+2]
a) Define full Adder. Write the expression and draw the logic diagram for a full Adder.
b) Find out the equivalent expression for (p q) + (p => q), without having any conditional or Bi-
conditional.
c) Draw the logic circuits of NOT operation using NAND logic.
Section – B
Answer any two questions
Use mnemonic names and comments in the program
(Flowcharts and Algorithms are not required)
The programs must be written in Java
Question 6: [10]
Design a class Wordwise to separate words from a sentence and find the
frequency of the vowels in each word. Some of the members of the class are given
below.
Question 7: [10]
A class ArrayMax contains a square matrix which finds the smallest element in each row. Some
of the members of the class are given below:
Question 8: [10]
Write a program which has the following members.
Question 9: [5]
Roll no and percentage marks of some students are stored in file stu.dat. Open the file in input mode and
display roll no and marks of only those students who have scored more than 75% marks.
-----------------------------
Number of copies: 65