Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

N

1ST BOSCO SCHOOL, BANDEL Marks: 70


ASSESSMENT
(2023 24)
COMPUTER SCIENCEPaper 1
Time: 3 Hours

(Theoryl
Instruction: CLASS- 11
1. Answer allquestions in PART -Iand six question from PART - II,
A, two from Section-B and two from choosing two questions from Section
Section-C.
2. Allworking including rough work should be done on the
same sheet as the rest of the answer.
PART- I
Answer all questions
[While answering questions in this part, indicate briefly your working and reasoning
wherever
required.
Qaestionl
Choose the correct answver:
[1"5=5]
(i)State the Commutative law of addition for two variables
(a) A+B=AB
(b) A+B-B+A
(c)AB=A +B
(d) None of these
(ii)Which is the complement of NOR?
(a) AND
(b) OR
(c) NOT
(d) XOR
(iii)) What is the other name of AND relation?
(a) logical multiplication
(b) logical subtraction
(c) logical addition
(d) bitwise addition
(iv) Name the type of constructor that gets invoked when an object is created, which is initialised with
the content of another object.
(a) copy constructor
(b) default constructor
(c) parameterised constructor
(d) all of these
(v) Which of the following is a composite data type?
(a) int
(b) String
(c) char
(d) float

(vi) (83.34)10-(?)16
(vii) (34A)16t(DE8)16=(?)% [1]
(viii) What is Coercion?
(ix) (234)g + (737)% + (654)8 = (?)16
(x) State any one Associative law.
(1)
-2

Question 2
(a) Draw the truth table
of
(b) If x>y then write it's bitwise XOR and bitwise OR. (2]
(i) Converse [2]
(c) Find the output of the (i) Contrapositive
following code:
String s="Food Provides [2]
Us Energy";
SysSystteemm..ooutut..pprriinnttllnn((ss..ssuubsbsttrriinng(g(ss..claosmpatlnderexTOfo((""DUBB"s"); );
(d) (A67.DE)\6-(?)%
(e) (10110101)2 + (110)2 [2]
[2]
PART -II
Answer six questions in this part,
choosing two questions from
two from Section B and two
from Section C. Section A,
SECTION-A
[Answer any two questions.]
Question 3.
(a) (5A2.1A)16 (?)2= (?)8
(b) Why NOR gate regarded as the
the three input NOR gate. Universal gate? Draw the logic gate symbol and make the [2]
truth table for
(c) (1011010)2 - (101101)2 [1+1+2-4]
(d) Draw the truth table of three [2]
input XNOR gate.
[2]
Question4.
(a) Prove that:
(i) AB+ A'C+ BC = AB + AC [2+2-4]
(ii) (A + B).(A' + C).(B + C) = (A + B).(A' + C)
(b) Simplify:
i) (A+B)(AC+C)(B'+AC)" [2+2-4]
(ii) A+AB+(A+B) ".C+{A+B+C).D
(c) Find the complement of A'B' + AB (C+D)
[2]
Question5.
(a) Findthe dual of the following Boolean expression:
X(YZ' + YZ)
[]
(b) State the De Morgan's Laws. Verify any one of them by using truth table.
(c) Construct the truth table and show that the given statements are
[1+2-3]
tautologies or contradictions or
contingencies:
(i) (a - b) ^a) (i) (p^(p +))>q
b
[2+2-4]
(d) Differentiate between pure and impure functions. [2]

Cont. page 3...


-3
SECTION B
Each program should be written in such a way that it clearly depicts the logic of the problem. Thiscan also be
achieved by using mnemonic names and comments in the program.
(Flowcharts and Algorithms are not required)
The programs must be written in Java.
[Answer any two questions]
Question 6.
In Piglatin, a word such as KING is replaced by INGKAY, while [10]
so on. The first vowel of the original word becomes the start of TROUBLE becomes OUBLETRAY and
the translation, any preceding letters being
shifted towards the end and followed by AY.
Words that begin with a vowel or which do not contain any vowel are left
unchanged.
Design a class PigLatin using the description of the data members and member
Class name : PigLatin
functions given below:
Data members:
String word : to store a word
Member functions :
PigLatin) :constructor to initialize data members with legal initial values
void readstring) : to accept the word
input in uppercase
void convert) :converts the word into its Piglatin form and displays the word.
Specify the class PigLatin giving details of the constructor, void
define a main function to create an object and call readstring) and void convert(). Also
methods accordingly to enable the task.
Question 2.
A class Telephone calculates the monthly [10]
telephone bill ofa consumer. Some of the members of the
class are given below:
Class name : Telephone
Data Members:
int phno: to store the phone number
String name : to store the name of the consumer
int n :to store the number of calls made
double amt : to store the bill amount
Member functions:
Telephone():constructor to initialize data members with initial values
void calculate() : to calculate the phone bill amount based on the slabs given below:
Number of calls rate:
1-100: Rs. 500/- rental charge only
101-200: Re. 1.00/- per call t rental charge
201-300: Rs.1.20/- per call + rental charge
Above 300: Rs.1.50/- per call + rental charge
The calculation needs to be done as per the slabs.
void display() : to display the details in the specified format.
Specify the class Telephone, giving the details of the constructor, void calculate() and void display().
Inthe main function,create an object of type Telephone and display the phone bill in the following
format:
Phone_number Name Total calls Amount
XXXXX XXXX XXXXX XXXXX
-4 [10]
Question 8. 25 is an
which is contained in the last digit(s) of its square.
An Automorphic number is the number digits.
Automorphic number as its square is 625 and 25 is present as the last two
Create a class Automorphic with the following details:
Class narme: Automorphic
Data members:
int x: to store the lower range
int y: to store the upper range
boolean z
Member functions:
Automorphic() : constructor to assign 0 to x and y
int number_of_digits(int n) : returns the number of digits of n.
boolean isAutomorphic(int k) :checks if the given number is an automorphic number by calling the
function number of digits(int) and return the result.
void range(int a, int b): Display all the automorphic numbers from a to b.
Specify the class Automorphic by giving details of the constructor, int number_ofdigits(int) ,boolean
isAutomorphic(int ) and void range(int, int). You have to write main function.
SECTION C
[Answer any two questions]
Question 9.
(a) Give the output of the following program segment: [3]
int x=2;
do

if(x<25)

x+=3;
System.out.println(x+-+);
continue;

else

System.out.print1n(x++);
break;

while(x<27);

(b) State the use of setLength() and setCharAt() functions in StringBuffer. [2]
Question 10.
(a) Given the Boolean function: [1]
F= (X+YZB') (Z'+B)
Draw the circuit diagram of this Boolean function.
(b) (-12)10 +(-19)10 [Using 2's complement method] [2)
(c) Using a truth table verify: (21
(-L->M)L = (L^~M)Y(L^M) Cont. page 5,,
-5

Question 11,
(a) Give the output of the following: [2]
int s=-7,ij;
for(i=15;i>-3;i3)
for(j=4;j<i; jt=7){
s=stitj;
System.out.println(s) ;

(b) int a-5,b=-2,c=1; [3]


ct=a--- --b %b----a* --b/at+;
Find out the value of a,b and c.

You might also like