Trending ▼   ResFinder  

ISC Class XII Prelims 2025 : Computer Science (Hiranandani Foundation School (HFS), Powai, Mumbai)

13 pages, 36 questions, 5 questions with responses, 5 total responses,    1    0
Printa Printable
  
+Fave Message
 Home > treasuredbrook45 >   F Also featured on: School Page geeta82

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

ST D: XI I - HI RA NA ND AN I FO UN DA TI ON SC HO OL , PO W Ai PR EL IM IN AR Y EX AM IN AT IO N CO M PU TE R SC IE NC E PA PE R 1 (T HE OR Y) M AX .M AR KS : 70 DA TE : 25 -11 -20 24 TI M E: 3 ho ur s (Candidates ar e all ow ed addit ional 15 minutes fo-r on ly read ing th e paper. They mu st NO T start writing during this time.) --------------------------An sw er al l questions in Pa rt I (compulsory) an d six quest ions fro m Part-IL choosing two questions fro m Section-A, two fro m Section-B an d two fro m Section-C. Al l working, including rough work, sh ou ld be done on the sa me sh ee t as the The intended ma rk s fo r question s or pa rts of questions are giv en in brackets [ J. PA RT I - 20 M AR KS An sw er all questions. While an sw eri ng questions in thi s Part, indicate briefly yo ur working an d reasoning, wherever required. Qu es tio n 1 (i) (ii) 'A sse rti on : A 1 B=O C= l an d D= l and mi nte rm is A B' C D Re as on : A an d C mu st be co mplemented. W hic h on e of the following op tions is correct? (a) Bo th As se rti on an d Re aso n are true, and Re as on is the correct explanation fo r As ser tio n. (b)B oth As ser tio n an d Re as on are true, bu t Re as on is no t the correct ex pla na tio n fo r Asser tion. (c) Assertion is true an d Re as on is false. (d)Assertion is false an d Re as on is true. The Ca rdi na l su m- of- pro du ct ex pre ssi on of F(a, b, c) = a.b ' + a.c + b.c' is (a) :E( 1, 3, 5, 6,7) (b) a.b'.c + a.b'.c' +a .b. c + a.b .c' + a'.b.c' (c) a.b.c + a.b'.c +a .b. c Page 1 of 13 [1] [1] .. I \ XII/PRELIMS NOV 2024 HFSP/ISC/csc/ (d) L( 2, 4, 5, 6,7) . . (iii) Assertion : The group which ehnunates the ma ximutn variables in [1] a Kamaugh map is octet. Reason : Octet can group 4 minterms/maxterms. Which one of the following options is correct? - 1S the correct (a) Both Assertion and Reason are true, and Reason explanation for Assertion. (b)Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion. (c) Assertion is true and Reason is false. (d)Assertion is false and Reason is true. (iv) Assertion (A): Recursion is implemented using function calls. Reason (R): Absence of base case leads to infinite recursion. (a)Both A and Rare true, and R is the correct explanation of A. (b)Both A and Rare true, and R is not the correct explanation of A. (c)A is true, but R is false. (d)A is false, but R is true. (v) Assertion (A): The converse of p' => q is q => p' Reason (R): The contrapositive of p' => q is p => q' (a) Both A and Rare true, and R is the correct explanation of A (b) Both A and Rare true, but R is not the correct explanation ~ 0 A. (c) A is true, but R is false. (d) A is false, but R is true. (vi) The dual of (X' +l) : (Y' tO) = Y' is: (a) (X. 0) + (Y. 1) = Y (b) (X' . l) + (Y' . 0) = Y' (c) (X'. 0). (Y' .1) = Y' (d) (X' ..0) +. (Y'_.1-) = Y' Page 2 of 13 [l] [l] [1] HFSP/ISC/CSC/XI I/PRELI MS NOV 2024 (vii) Consider the following snippet, calculate the time complexity [1] assuming the code compiles successfully. for(int j=0;j<m;j++) { for( int i=0;i<m;i++){ System.out.println("Hello ");} } (a) O(m) (b) O(m+m) (c) O(m2) (d) 0(1) (viii) All methods declared in the interface are abstract. Where will the body of these abstract methods be defined? [1] (ix) [1] Which Exception will be thrown when the following code is executed and why? public class Excep { public static void main() { int arr = null; System.out.println("Array length: "+arr.length); } } (x) What is the difference between the two methods nextToken() and countTokens( ) of StringTokenizer class ? [1] Question 2 (i) Answer the questions related to the circuit given below: (a) Give the final output of the circuit if, A=l and B=O. (b) Name the basic gate represented by the given diagram. Page 3 of 13 [1] [l] HFSP/ISC/CSC/XII/PRELIMS NOV 2024 X A B (ii) [2J lean law s: Sim plify the follo win g exp ress ion usin g boo F= [(X' +Y) . (Y' +Z)] I+ (X' +Z) e clas s whi ch com pute s and (iii) The follo win g func tion is a part of som pow er 'q' (pq). The re retu rns the valu e of a num ber 'p' rais ed to the ?2? , ?3? whi ch mus t are som e plac es in the cod e mar ked by ?1? , the func tion wor ks be repl aced by an expr essi on a state men t so that corr ectl y. dou ble pow er ( double p, int q) { dou ble r = ?1? ; int c = ( q<O ) ? -q : q ; if( q = 0) retu rn 1 ; else { for (int i= 1; i <= C ;?2? , i++) ; retu rn (q>O )? r: ?3? ; } } (a)W hat is the expr essi on or state men t at ?1? [lJ (b)W hat is the expr essi on or statement at ?2? [lJ (c)W hat is the expr essi on or state men t at ?3? [lJ () are a part of some class. (iv) The follo win g function trialO and perform the dry run/working. Ans wer the following part s give n belo w. Sho w int trial(int n) { if(n= l) retu rn O; else iftn= 2) Page 4 of 13 HFSP/ISC/CSC/XII/PRELIMS NOV 2024 return l; else return trial(n-2)+ trial(n-1); } void perform(int p) { int x ' for(int i= 1;i<=p;i++) { X'-lt ial(i); System out.pri nt(x + " "); } } (i)Wha t will the function trial() return when the value of n is 4? [l] (ii)Wh at will be the output of the function perform() when the value [1] ofp is 5? (iii) In one line state what the function trial() is doing, apart from recursion? PART - n (50 Marks) Answer six questions in this part, choosing two questions from Section A, two from Section B and two from Section C. SECTI ON-A Answer any two questions. Question3 A provisional store announces a special discount on all its products ~s a festival offer only to those who satisfy any one of the followmg conditions: Page 5 of 13 [1] HFSP/ISC/CSC/Xll/PRELIMS NOV 2024 If he/she is an emp loye e of the stor e an ten years OR d has a service of mor e tha n If he/she is a regular cust ome r of the stor e whose age is less than 65 years and is not an emp loye e of the store OR . . . If he/s he is a sem or citiz en but not a regu1arcustomer of the stor e The inputs are: E R s C Employee of the stor e Regular cust ome r of the store Service of the emp loye e is more than 10 yea rs Senior citiz en of 65 years or above Output X Denotes eligible for discount [ 1 indi cate s YES and 0 indicates NO in all cases] a) Draw the truth table for the inputs and outp uts give n abo ve an wri te the SOP expression for X(E,R,S,C). (5) b) Reduce X(E,R,S,C) using Kam aug h's map . Dra w the logic gate diagram for the reduced SOP exp ress ion for X(E,R,S,C) using AND , OR gates. You may use gate s with mor e than 2 inputs. Ass ume that the variables and their com plements are avai labl e as inputs. [5] Que stio n 4 a) F(P,Q,R,S)= P'Q 'RS ' + P'Q RS' + PQ' R'S + PQ' RS' + PQ' RS + PQR'S + PQRS' + PQRS Use Kamaugh map to reduce the given function Fus ing the SOP form. Draw a logic gate diagram for the reduced SOP form . You may use gate s with more than two inputs. Ass ume that the variables and thei r complements are available as inputs. Page 6 of 13 [5] I HFSP/ISC/CSC/XII/PRELIMS NOV 2024 b) F(A,B,C,D)= 1t{O,l,2,3,5,7,9,13) [5] Use Karnaugh map to reduce the given function Fusing the POS form. Draw a logic gate diagram for the reduced POS form. You may use gates with more than two inputs. Assum e that the variables and their complements are available as inputs. Questi on 5 (i} From the logic circuit diagram given below, name the parts (I), (2), (3) [ ] 4 and fmally derive the Boolea n expression F and simplify it: (11 A 8 C I ---- ---- t--- ---1 AND I OR I NOT (J) I F(A.B.q (ii) A_3 to 8 decode r contains 3 inputs denoted by A2, Al and AO and 8 [2] outputs denoted by DO, D1, D2, D3, D4, D5, D6, D7. Write the minterm representations for D4 and D6. (iii) Following is the circuit diagram of a full adder. Redraw the circuit [4] diagram by adding missing logic gates. A B S um (i) C_ ,n --=-........(Ii) (iv) L _I Page 7 of 13 ( Ill) -~ 4 HFSP/ISC/CSC/XII/PREUMS NOV 202 SE CT IO N- B Answer any two questions. the problem. way that it clearly depicts the logic of Each program should be written in such a m ic names and comments in the pro gra This can be achieved by using mnemon uired.) (Flowcharts and Algorithms are not req a.The programs must bC' written in Jav [10] Question 6 cul ate the sum of the fol low ing A ~lass Ser ies Sum is des ign ed to cal senes: 0 6 4 Su m= x2 / 1! + x / 3! + x /5! + ... x / (n- 1)! giv en bel ow : Som e of the me mb ers of the cla ss are : Ser ies Sum Class nam e Da ta me mb ers /in sta nce var iab les: : to sto re an int ege r num ber X n Sum : to sto re the num ber of ter ms : dou ble var iab le to sto re the sum of the ser ies Me mb er functions: SeriesSum(int xx, int nn) dou ble find fact(int m) double find pow er(i nt x, int Y) voi d calculateQ voi d displayQ : con stru cto r to ass ign x= xx and n=n n : to retu rn the fac tor ial of m usi ng the rec urs ive tec hni que . y : to _return x rai sed to the pow er of usm g the rec urs ive tec hni que . : to cal cul ate the sum of the ser ies by inv oki ng the rec urs ive fun ctio ns res pec tive ly : to dis pla y the sum of the ser ies Page 8 of 13 HFSP/ISC/CSC/XII/PREUMS NOV 2024 Specify the class SeriesSum, giving details of the constructor(int, int), double find fact(int), double find power(int, int), void calculate() and void display(). Define the main() function to create an object and call the functions accordingly to enable the task. Question 7 [10] A class Mixer has been defined to merge two sorted integer arrays in ascending order. Some of the members of the class are given below: Class name Mixer Data members/instance variables: int arr int n to store the elements of an array to store the size of the array Member functions: Mixer( int nn) : constructor to assign n = nn void accept() : to accept the elements of the array in ascending order withou t any duplicates Mixer mix( Mixer A) : to merge the current object array elements with the parameterized array elements and return the resultant object (containing sorted array elements in ascending order). void display() : to display the elements of the array Specify the class Mixer, giving details of the constructor(int), void accept(), Mixer mix(Mixer) and void display(). Define the main() function to create an object and call the function accordingly to enable the task. Page 9 of 13 HFSP/ISC/CSC/XII/PRELIMS NOV 2024 Question 8 contain h ther if both the words are FoIIowing the same_letters ut ey hich are anagrams of each other. . wolf fowl h some pairs of the words w o T o words are called anagram of eac d . different order. b th are arrange m w :o heart, e~rt t two words i~ lower case and check Hear, hare Design the class Anagram i:pu Th member functions and data if they are anagram of eac. ot er. ~ members ofthe class are given below. :Anagram Class Name . Data members/instance variables: : stores the two words tn lower case str 1, str2 Member functions : Anagram() void inputQ void charArray() void sort(char st[ ]) : constructor : Input two strings and assign it to strl and str2 respectively. : Creates two char arrays stl [] and st2[] for the two strings resp.Call sort(stl) and sort(st2) to sort the char arrays. Call check (stl,st2) to check whether the given strings are Anagram or not. Display appropriate messages for the same. , : Sort a char array in ascending order using any suitable technique. baolean check(char st!O, char s120): Check whether both the arrays have same length and same set of characters. Specify the class Anagram giving details of all the functions mentioned above. ~reate one object in the main( )method and call the methods appropriately. Sample input Enter two strings wolf fowl Output Anagram Page 10of 13 [10] r HFSP/ISC/CSC/XII/PRELIMS NOV 2024 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 9 [5] A super class Record contains names and marks of the students in two different single 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 Data member/instance variable: : Record n[] m[] : array to store names : array to store marks : to store the number of students SIZe Member functions/methods Record(int cap) : parameterized constructor to initialize the datamember size = cap : to enter elements in both the arrays : displays the array elements void readarray() void display() Class name Data member/instance variable: Ind Member functions/methods: Highest( .. . ) :Highest :to store the index : parameterized constructor to initialize the data members of Page 11 of 13 \ HFSP/ISC/CSC/XII/PREUMS NOV 2024 both the classe s void find( ) : finds the index of the stude nt obtai ning the highe st mark and assig n it to 'ind' void display( ) : displays the array eleme nts along with the name s and mark s of the students who have obtain ed the highe st mark Assume that the super class Reco rd has been defined. Using the conce pt of inheritance, specify the class Highest givin g the detail s of the constructor( ... ) and void displa y(). The super class, main function and algorithm need NOT be writte n. Question 10 [5] A Circular queue is a linear data structure which work s on the princ iple of FIFO, enables the user to enter data from the rear end and remo ve data from the front end with the rear end connected to the front end to form a circular pattern. Define a class CirQueue with the following details: Class name : CirQueue Data memb er/ins tance variable: cq[] : array to store the integers cap : stores the maxim um capac ity of the array front : to point the index of the front end rear : to point the index of the rear end Mem ber functions/methods: CirQueue (int max) : constructor to initialize the data memb er cap=max, front=O and rear=O void push(int n) : to add integer in the queue from the rear end if possible, otherwise display the message "QUE UE IS FULL " int pop() : removes and returns the integer from the front end of the queue if any, else returns -9999 void show () : displays the queue elements Page 12 of 13 I f HFSP/ISC/CSC/XII/PRELIMS NOV 2024 (a) Specify the class CirQueue giving details of the functions void push(int) and int pop(). Assume that the other functions have been defined. The main function and algorithm need NOT be written. (b) How is a linear queue structure different from a circular queue structure? Question 11 (a) A linked list is formed from the objects of the class: [2] class Node { int number, Node nextNode; } . . Write an Algorithm OR a Method to add a node at the end of an ex1stmg linked list. The method declaration is as follows: void add node (Node start, int num) (b) Answer the following from the diagram of the Binary Tree given below: [1] (i) The root of the tree. [1] (ii) Left subtree [1] (iii) Inorder traversal of the tree ******************* Page 13 of 13

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Bhagyashree Sap...

(5)

ResPaper Admins

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

treasuredbrook45 chat