Download as pdf
Download as pdf
You are on page 1of 5
MODEL SPECIMEN PAPER-12 (Unsolved) PART-I Question 1. (a) Write the distributive laws. (b) Write the Product of Sum for the Boolean function, FI(A,8,C) whose output is Oonly when, A=1, B+0, C-0 A=0, Bl, A=0, B-0, Ac1, Bel, C= 5 and p29 (0 Draw the truth table of the propositional Jogic expressions P =q and P a Whe lass and Abstract method in Java? (a) What do you understand by Abstract (b) Convert from prefix to infix form: /+*~ ABCDE ()__ State one similarity (@) A character array B(7II the array is stored Colu (©) Whatis the complexity of pri Question 3. Given the code, answer int fnS (int x, int y ) { a Queue? 5 1046 at 0,0. Cs [6] has a base addres: : requires imn Major wise. Each character inting an array of length? the questions following it 2 bytes of storage. if(x>ey) return X; ) @ What will the function fnS (20,5) return? (i) What will the function fn (15,6) return? (ii) __Inone line state what the function fnS (...)is doing? PART-II SECTION—A Question 4. fa) For the given expression, plot it in Kamaugh's Map, reduce , write the reduced expression and draw the Logic Gate Diagram of the reduced expression using Elementary Gates F2(P,QRS)= 2(0,1,4,5,6,7,8 9 10, 11, 14, 15) (b) The Alumni of a college was organizing a reunion in which they had planned to honour a member if ‘The member has attended all the previous reunions and has donated blood in any social event The member is a contributor in a hospital and had no disciplinary issues in college The member did not attended all the previous reunions but is a contributor in @ hospital i Stack and i and one difference between 4 falculate the address at B23) i¢ Computer Science | 131 Inputs olen Be qpamember has attended all the previous reunions Ce qpemember has donated blood in any social event Ds peiemberisa contributor in a hospital Output is member had no disciplinary issues in college Hi: A member is hi 5 : ‘ono @ Draw the truth table for the inputs and oe [1 for yes, 0 for no] Gi) Write the Sum of Product expression {puts given above estion 5. the i " (a) __ Inthe given Logic Gate Diagram, F3 isa tautology. State True or False. Justify. A ae (o) Plotin Truth Table: p4=~( . (0 Writethe dualof: ore ey (@ Ina 4x1 Multiplexer, what will be the output if No=1 Ni=0 No=1 No=0 and Si=1 So=1 Question 6. (@) A Full Adder has 3 input lines and Half Adder has 2 input lines. Why do both of them have two output lines? Justify, (b) Draw the Half Adder Circuit using elementary gates. (@) _ Draw the Full Adder Circuit using Half Adders and any elementary gate. SECTION-B Question 7 ‘Anew number N is created from W by applying the given technique - the odd digits are decreased by Lad the even digits are increased by 1. For example: Input W : 2796041 Output N 3687132 ‘A class STYLE has been designed to perform the given task , some of the members of the class are given below Class Name STYLE Data member! instance variables: long W, M : numbers Member functions: STYLE () + constructor to initialize member data to null void frinput () to fill the member data W void fnDisplay( ) to print the member data with proper messages void inChange( ) + Tocreate M from W as explained above Specify the class STYLE, giving the details of the above member data and methods. Question 8. 'A decimal number can be converted to its equivalent binary by continuously dividing it by 2 and storing the remainders (in reverse order finally), the division continues tll the number becomes <2 For example : Input N=22 Output Binary Equivalent of Nis 10110 A dass EQUIDB has been defined to convert a decimal number to its equivalent binary value, The details of the class are given below : SS 182 | ISC Model Specimen Papers, XII Class Name EQUIDB Data member/ instance variables: intN integer String B string to store the binary equivalent ofN Member functions: io EQUIDB(...) constructor to initialize member data tony void fnShow () to show the member data with proper at void frinput() to input N void inConvert() tostore the binary equivalent of Nin sing Is of the above member data and methods, aj Specify the class EQUIDB, giving the detail & call the other methods accordingly to enable he ‘write the main( ) method to create objects an task. Question 9. ; ; Every date in a calendar has an annual day number which is called its Julian Day. For example: Input: Date:1-Month:2—_ Year: 2010 Output Julian Day is 32 Input: Date:31 Month: 12 Year: 2016 Output Julian Day is 366 [Note: Incase of Leap Year, Feb has 29 days otherwise 28 days ] ‘Acdass JULIAN that accepts a date and prints its corresponding Julian Day. Some ofthe members of the class JULIAN are given below: Class Name JULIAN ‘Data member/ instance variables: int dd, mm, yy + integers to represent a date intjd integer to store the corresponding Julian day intendm{] :_artay to store the month end values Member functions: JULIAN...) constructor to initialize member data int Leap () to retum 1 ifthe year is Leap , 0 otherwise boolean frisValid( ) to verify whether the given date is a valid date or not void frJD() : tocalculate and return the Julian Day value of the date given ‘Apply method fnlsValid()) and fLeap() void frShowt ) to print the date and its equivalent Julian Day Specify the class JULIAN, giving the details of the above member data and methods only. SECTION—C Question 10. Asuper class DATA anda sub class. i i i Thedetietboh cnssaregenbeows nn nsmmnareton ‘The details of the base class Class Name DATA pata a sas 2 integer array i : to store the size of member array 4 per factions methods: go allocate aA (~~) : parameterized constructor to initialize 7 D memory to the member array oid Fill ( ) + tofill the member array with random numbers oid show() : toshow the member array v A ‘pe aetis of the derived class : ccsss Name : SORT pata member! instance variable: vrei » store the choice of ascending or descending order of set Member functions/ methods: pase and sort (--) : parameterized constructor to initialize the data members of the current class. woid Sorta () to sort the member array in ascending order “oid Sort () to sort the member array in descending order ae j invol void Show) «to show the member array before and after Sort This method method SortA( ) or SortB() according to the vale of choice specify te class SORT giving the details ofits mentioned methods only- ‘jsume that cass DATA is already present Question 11. | ne ‘A dass HIFI has been defined to find the Highest Common Factor of two numbers using recurs que, some of whose details are given below Class Name HEI Data member! instance variables: inta,b : integers int + integer to store the hef Member functions: HIFI(...) constructor to initialize member data a and b to the parameters and f to 0. void inShow () + to print the member data with proper message int inHHCF () = to retum the hef of member data a, b [apply recursion] [Note: you may make necessary assumptions ] spciy the class HIFI giving the details ofthe mentioned methods only. Question 12. @ a linked list is formed from the objects of a class NODE. The class structure of NODE is given class NODE { double d; NODE next; 134 | ISC Model Specimen Papers, XII Write an Algorithm OR a Method to delete the last node of the list. The method of declaration is given below. void fnDeleteLastNode ( NODE start ) : (b) Answer the following questions from the diagram of the Binary Tree given below : (i) | What is the size of the tree ? (ii) What is the depth of the tree ? (iii) Write the In-order traversal of the above tree.

You might also like