Sample Paper – 2010Class – XIISubject – Computer Science
PAPER-I
(THEORY)
Time :Three hours Max.Marks:100
(Candidates are allowed additional 15 minutes for only reading the paper. They must not start writing during this time)
------------------------------------------------------------------
Answer all Question in Part I (compulsory) and seven questions from Part II, choosing three questions from Sections A and four questions from
Section B. All working, including rough work, should be done on the same sheet as the rest of the answer. The intended marks for questions or for parts of questions are given in brackets[].
------------------------------------------------------------------
PART -I
Answer all questions.
while answering questions in this part indicate briefly your working reasoning wherever required.
Question 1. [10]
State the Boolean expression and draw the truth table for the proportional logic A(B.
Find the compliment of the following expression using DeMorgan’s law and other laws.
F(x,y,z) =x’.y’.z + x.y’.z + x’.y.z’
Define Syllogism and Premises.
Convert the expression F(X,Y,Z) = (X’ + Y).(Y’ + Z) into canonical Product-of-Maxterms.
Simplify the expression: F=(A,B)’ + (A.C)’ + A’ + A’.C’ using Boolean laws.
QUESTION 2. [10]
What is Binary tree? Show diagrammatically a tree data structure marking its maim part.
Convert the following into postfix from: X + Y * Z ^ P – (M/N + Q )
Let A is an array having 4 rows and 5 columns with base address 1142. Find the address of A[4][3]. Each element of array occupies 2 bytes and the arrangement is column major wise.
Explain Base class, Derived class and Abstract class.
Explain any two standard ways of traversing a Binary Tree.
QUESTION 3. [10]
Give output for the given program when function main( ) is invoked. Show dry run/working.
Class Test
{
ing g = 10;
void func ( int x, int y)
{
x =x - y; y = x * 10;
System. out. Println (x+”,”+y);
{
void main ( )
{
Int g = 7;
func (this.g, g) ;
System.out.println (g+” , ”+ this.g);
}
}
Answer the question given after the following class:
Class somedata
{
final int size=150;
private int count;
private char arr [ ] = new char [ size ] ;
public somedata ( )
{
count = 0;
}
arr [++count] = ch;
char result ( )
{
return (arr [ count-- ] ) ;
}
public static void main ( )
{
pomedata obr = new somedata ( ) ;
obr. data ( ‘A’) ;
obr. data ( ‘B’) ;
obr. data ( ‘C’) ;
System . out . println (“1. “+obr . result ( )) ;
System . out . println (“2. “+obr . result ( )) ;
obr. data ( ‘D’) ;
obr. data ( ‘E’) ;
obr. data ( ‘F’) ;
System . out . println (“3. “+obr . result ( )) ;
System . out . println (“4. “+obr . result ( )) ;
}
}
What will be the output when main( ) is invoked?
Name the entity which is being managed by the above class.
PART-II
Answer seven question in this part, choosing three question from Section A, Two question from Section B and two question from Section C
SECTION – A
Answer any three questions
Question 4
a) Given the Boolean function F(A,B,C,D) = ∑(0,1,2,3,4,5,10,11,15) using Karnought's map to reduce this function F. using the given SOP form. Draw logic gate diagram for the reduce SOP form. You may use gates with more than two inputs. Assume that variable and their complements are available as inputs. [5]
b) Now given G(A,B,C,D) = ∏ (0,1,2,3,4,6,8,10) use Karnaugh’s map to reduce this function G using the given POS form. Draw logic gate diagram for the reduced POS form. You may use gates with more than two inputs. Assume that variables and their complements are available as inputs. [5]
Question 5
A man goes to matrimonial office to select his bride. The office has information about 10,000 girls. His criteria of selection is as follows:
Condition 1: The girls should be Graduate or must be a teacher.
Condition 2: The girl should be in the age group of 20 to 25 years and must be beautiful.
Let us assume that INPUTS ARE:
G – The girl is Graduate (1 indicates yes 0 indicates no)
T – The girl is Teacher (1 indicates yes 0 indicates no)
A – The age between 20 to 25 years (1 indicates yes 0 indicates no)
B – The girl is beautiful (1 indicates yes 0 indicates no)
OUTPUT IS:
S – The girl is selected (1 indicates yes 0 indicates no)
a) Draw the truth table for the inputs and outputs given above. Write the SOP expression for S(G,T,A,B). Reduce R using Karnaugh’s Map [5]
b) After getting reduced expression from K-Map, write the POS of reduced expression. Draw the logic gate diagram for POS. [5]
Question 6
a) Using the truth table, prove that (A+B)'+(A+B')' = A' [2]
b) Convert (X'+Y+Z').(X+Y'+Z).(X+Y+Z').(X+Y+Z) into SOP form. [2]
c) Draw a truth table representing a 2 input XNOR operation. Derive its SOP expression and draw its logic gate diagram. [2]
d) Prove that F(A,B,C) = ∏ (2,3,4,7) = ∑ (0,1,5,6) [2]
e) Explain the principle of Duality and State the dual form of
XY'(Y'Z+X+X'Z') [2]
Question 7
(a) What is a decoder? Draw the truth table and a logic circuit diagram for a 2 by 4 decoder. [2]
(b) What is a Half Adder? Draw the truth table, derive its Boolean expression and draw a logic diagram for Full Adder. [4]
a) Using NAND gates draw a logic diagram to construct NOR gate. [2]
b) Draw the logic diagram and function table for 4x1 Multiplexer and explain its working . [2]
SECTION – B
Answer any two questions
Question 8. [10]
A Ramjee number is a number in which the eventual sum of square digits of the number is equal to 1.
For example, 139= 12+32+92 =91
91=92+12=82
82=82+22=68
68=62+82=100
100=12+02+02=1
Then 139 is a Ramjee number
Class name Ramjee
Data member/instance variables
N : store the number
Members Functions/methods
Ramjee() : constructor to assign 0 to N.
void getnum(int nn) : to assign the parameter value to the number.
int power(int x) : return the square of the number
int sum_of_square(int x) : return the sum of square of the number
void isRamjee() : checks if the given number is a Ramjee number or not.
Specify the class Ramjee giving the details of the constructor and function void getnum(int nn), int power(int x), int sum_of_square(int x),void isRamjee().You need not write the main function.
Question 9. [10]
Fractions are numbers of the type where num and den are whole numbers and num is the numerator and den is denominator and den is not equal to 0. Some of the methods in class Fraction are given below.
Class Name Fraction
Date Members: num and den of integer types.
Member Function/Methods:
Fraction(int,int) constructor, first argument is numerator and second argument is denominator.
int hcf(int,int) find the hcf of two numbers using recursive technique.
int lcm(int,int) find the lcm (using hcf to find lcm).
void reduce() reduce current Fraction objects to its lowest terms e.g. 1000/3000 is 1/3
Fraction addTo(Fraction f) to add the current fraction object to Fraction f and return the sum as a Fraction object. E.g. the sum of 2/9 and 5/18 is 1/2
Define the class Fraction with the details of all the functions in above mentioned. You may assume that the other functions are written for you.
Question 10. [10]
Class convert has been defined to express digits of an integer in words. The details of the class are given below.
Class Name Convert
Date Members:
N : integers whose digits are to be expressed in words
Member Function/Methods:
Convert() : constructor to assign 0 to N.
void inpnum() : to accept the value of N.
void extdigit(int) : to extract the digit of N using the Recursive technique and by
invoking function num_to_words(int) print digits of integer N
in words.
void num_to_words(int) : to display the digits of an integer N in words.
Specify the class Convert giving the details of the constructor and the functions void inpnum(),void extdigit(int), void num_to_words(int). You have to write the main function also.
SECTION – C
Answer any two questions
Question 11. [10]
A Principal of a school needs to find the highest and lowest marks scored by student and also merit list on marks from highest and lowest in a class of 50 students. The classes Student and MeritList are declared for above activities with following details :
Class name Student
Date Members:
tot[] : a floating array to store total marks of 50 students
out of 500 each.
Stud[] : String array to store name of 50 students of a class.
Member Function/Methods:
void readDetails() : to input names and marks of 50 students.Marks are given
out of 500 each.
void printResults() : to print student scoring highest and lowest marks in the
class along with name of student.
Class name MeritList
Date Members: None
Member Function/Methods:
void generatemerit() : to generate merit list of 50 students on the basis of total
marks along with name of the students.
void printmerit() : to print merit list of 50 students in two columns in the
following format :
NAME MARKS SCORED
xxxx xxxxxxxx
xxxx xxxxxxxx
xxxx xxxxxxxx
class MeritList is derived from class Student. You have to write the main function also.
Question 12. [10]
Strange is an entity that can hold at the most 20 integers. The strange restriction is that an integer can only be added from the top or removed from the top. This is like a pile of China plates where we added a plate to the pile from the top and remove a plate from the top only. Define the class Strange with the following details.
Class Name Strange
Data Member/Instance variable:
int ele[] The array to hold the integers element.
int capacity The maximum capacity of the integer array.
int top To point to the index of the topmost element.
Member Functions/Methods:
Strange(int cap) : constructor to initialize the data
capacity=cap, top=-1 and create the integer array.
void push(int N) : adds the integer N to the top of
Strange if possible, otherwise output
a message "Strange is full, Cannot
push Item".
int pop() : removes the integer from the top of Strange and return it if Strange is not empty, otherwise output a message "Strange is empty. Returning -9999" and returns -9999.
(a) Specify the class Strange giving the details of the constructor and the functions void pustItem(int value) and int popItem() only. You do not need to write the main function.
(b) What is the common name of the entity described above?
Question 13. [4+2+4=10]
Write an algorithm to search an element num from an already sorted (ascending) array og integers using binary search method.Assume that the array has 20 integers. Print the subscript of the element in the sorted list if found otherwise print an appropriate message.
Write an algorithm to pop elements from the queue of size N.
(c ) It is assumed a binary tree is already created with integers. Write
an algorithm to print the nodes of binary tree in post-order form.
Paper By : Mr. Ram jee Awasthi
Email Id:- ramji_awasthi2005@yahoo.co.in
Telephone No. : 09305035029
http://www.icseguess.com/
-------------------------------------------------------------------------------------------------------www.icseguess.comOther Educational Portalswww.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com