Saturday, February 18, 2017

ISC computer science class XII sample paper 8

ISC computer science class XII sample paper 8



Answer all questions in Part I (compulsory) and seven questions from Part-II, choosing three 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

Answer all questions        

Question 1
                                                        [1X5=5]



 (a)
Simplify the following boolean expression using law of algebra



x.y.(x.y)+y.z



(b)  Prove that (x.y)’=x’+y’ using truth table                                                                                  
(c)  Convert the following sum of product expression into its corresponding POS
F(A,B,C)=A’.B’.C’+A’.B’.C+A’.B.C+A.B’.C                                                                           
(d)  Find the compliment of :F(A,B,C,D)=[A+{(B+C).(B’+D’)}]                                                
(e)  Draw the logic gate diagram and the truth table XOR Gate                                                   
Question 2
(a)  Name the Universal gates ,Explain with truth table And Diagram                                       [2]
(b)  State the difference between Stack and Queue.                                                                       [2]
(c)  Convert the following infix notation to its postfix form.
E*(F/(G-H)*I)+J                                                                                                                            [2]
(d)  What is function overloading?                                                                                                   [2]
(e)  What is meant by access modifier, define it.                                                                           [2]

Question 3
State the final value of q at the end of following program segment
int m, n,p,q=0;
for(m=2;m<=3;++m){
for(n=1;n<=m;++n){
p=m+n-1;
if(p%3==0)
q+=p;
else
q+=p+4;
}}                                                                                                                                                     [5]
PART II
Attempt seven questions, choosing two questions from Section-A, two from Section-B and Section-C
Section A
Question 4
(a)  Give the Boolean function F(A,B,C,D)= Σ(0,1,2,3,5,7,9,13) used K-map to reduce it in SOP form, draw logic gate diagram from the reduced from expression                                                  [5]
(b)  Now given X(A,B,C,D)=π (0,2,6,8,10,14) do the same for this Boolean expression         [5]

Question 5
(a)  How is an XOR gate different from an OR gate , draw a truth table representing a 2 input XOR expression , derive its SOP expression & draw the logic gate diagram                               [6]
(b)  State a difference between a multiplexer and decoder.                                                          [2]
(c)  State how a binary tree is a recursive data structure.                                                             [2]

Question 6
(a)  Draw the logic gate diagram to implement the following by using NOR gates only. Show the output at each stage
1. AND 2. OR.                                                                                                                               [4]
(b)  State the principal of Duality, give example                                                                   [3]
(c)  What do LIFO and FIFO stand for? Name a data structure that follows LIFO principle and one that follows FIFO.                                                                                                                         [2]

Section B
Question 7
NIC institute resource manager has decided to network the computer resources like printer, storage, etc, so that minimum resources & max sharing could be avail. Accordingly printers are linked to centralized system& the printing jobs are done on a “FIFO”(first cum first served ) served bases only. In order to avoid collision , the restriction is that no more than 2 printing jobs can be added
     Define a class printJob with the following details                                                                    [10]

Class name
printJob
Data members

Job[]
Array of integers to hold printing jobs
NewJob
To add new printing job inside array
Capacity
The max capacity of the integer array
Front
Rear
Point index of front
Point index of last
Member function

PrintJob()
 constructor to assign values to data members
capacity=20,front=rear=-1 & call function createJob()
Void createJob()
To create an array to hold the printing jobs
Void AddJob()
Adds the new printing job to the end of the last array, if possible print “jobs full” when more than 2 jobs are added
Void removeJob()
Remove the printing job from front, if the array is not empty, otherwise prints “Vancy”


Question 8
A special number is a number in which the sum of the factorial of each digit is equal to the number itself
145= 1!+4!+5!
      =1+24+120
     Design a class special to check if a given number is a special number. Some of the members of a class are given below                                                                                                                                  [10]


                                                                                                                                                                
Class name
Special
Data members

N
Integer
Member functions

Special()
Constructor to assign 0 to n
Special(int)
Parameterized constructor to assign a value to n
Void sum()
Calculate and display the sum of the first and last digit of n
Void isSpecial()
Check & display if the number n is special number

Question 9
A class collection contains an array of 100 integers, using the following class description create an array withn elements .some of the members of the class are given below                                  [10]
Class name
Collection
Data members

Arr[]
No. of people visited the booth
Len
Total amount of money collected
Member functions

collection()
Default constructor
collection(int)
Parameterized constructor to assign the length of array
Void inparr()
To accept the array elements
Void disp()
To display the sorted elements
Void sort_arr()
To sort the array with any sorting algorithm

Section C
Question 10
A class Employee contains employee details and another class salary calculates the employee’s net salary. The details of 2 classes are given below                                                                              [5]

Class Name
Salary
Data members

Basic
double variable to store basic pay
Name
String variable to store name of employee
Designation
String variable to store designation
Member function

Salary(…)
Constructor to assign initial values
Void calc()
Calculate the employees net salary according to following rules
DA=10%of basic
HRA=15%of basic
Salary= basic+DA+HRA
PF=8%of salary
Netsal= salary-PF
Display employee details and net salary through main class.

Question 11
A class hifact has been define to find the HCF of two numbers using the recursive technique. This HCF is used to find the LCM of the two numbers. Some members of class are given below   [5]

Class name
HiFact
Data members

A,b,hcf,lcm
Integers
Member functions

HiFact()
Constructor to assign initial values
Void getdata()
To input values of a&b
Void change()
To swap a&b if a>b
Int reacHCF(int,int)
To find HCF using recursive technique
Int fn_Lcm(int,int,int)
To find LCM using a,b,HCF
Void result()
To to call reacHCF(),fm_LCM() & print LCM,HCF of the two members a&b
Question 12                                                                                                                           [5]

(a)     A Linked List is formed from the objects of the class,                                                    [2]

Class Node

{

int num;

Node next;

}

Write the algorithm OR a method for inserting a node in the end of the list.

The method declaration is given below :

void insertnode(Node start)


(c)     List the nodes in the tree given below using:                                                                    [3]

(i)          Preorder Traversal

(ii)        Root of the tree
(iii)     External nodes of the tree