{"id":47360,"date":"2024-02-09T10:05:52","date_gmt":"2024-02-09T04:35:52","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=47360"},"modified":"2024-02-09T13:15:53","modified_gmt":"2024-02-09T07:45:53","slug":"isc-class-12-computer-science-previous-year-question-papers-solved-2014","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/isc-class-12-computer-science-previous-year-question-papers-solved-2014\/","title":{"rendered":"ISC Computer Science Question Paper 2014 Solved for Class 12"},"content":{"rendered":"
Maximum Marks: 70
\nTime allowed: 3 hours<\/p>\n
Part – I<\/strong> While answering questions in this Part, indicate briefly your working and reasoning, wherever required.<\/p>\n Question 1. Question 2. (b) AR [-4,… 6, -2 … 12] (c) (i) Preorder is Root, Left, Right (d) (A\/B + C) * (D\/(E -F)) (e) nextlnt() returns an integer present in a Scanner class object whereas hasNextInt() checks whether Scanner class object contains an integer or not and returns true if it contains an integer, otherwise false.<\/p>\n Question 3. (i) What will be the output of fun1() when the value of s[ ]={\u2018J\u2019,\u2018U\u2019,\u2018N\u2019,\u2018E\u2019} and x = 1? [2] (i) What is the expression or statement at ?1? [1] Part – II<\/strong><\/p>\n Answer seven questions in this part, choosing three questions from Section -A, two from Section-B and two from Section-C.<\/p>\n Section – A<\/strong> Question 4. Question 5. (In all of the above cases, 1 indicates yes and 0 indicates no) Question 6. Question 7. (b) A proposition is an elementary atomic sentence that returns either true or false. Whereas wff’s are a well-formed formula which contains propositions and connectives.<\/p>\n (c) It is a digital electronic circuit used to add two bits. Section – B<\/strong> Question 8. Question 9. (b) Iteration: Fast process and less memory. Question 10. Section – C<\/strong> Question 11. Question 12. Question 13. Write an Algorithm OR a Method to add a node at the end of an existing linked list. The method declaration is as follows: Method to add a node at the end of an existing linked list.<\/p>\n (b) Complexity: It is the measurement or growth rate of an algorithm with respect to time and space. ISC Computer Science Previous Year Question Paper 2014 Solved for Class 12 Maximum Marks: 70 Time allowed: 3 hours Part – I Answer all questions While answering questions in this Part, indicate briefly your working and reasoning, wherever required. Question 1. (a) From the logic circuit diagram given below, find the output \u2018F\u2019 and simplify […]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[41556],"tags":[],"yoast_head":"\n
\nAnswer all questions<\/strong><\/p>\n
\n(a) From the logic circuit diagram given below, find the output \u2018F\u2019 and simplify it. [2]
\nAlso, state the law represented by the logic diagram.
\n
\n(b) Write the truth table for a 2-input conjunction and disjunction in a proposition. [2]
\n(c) Find the complement of XY’Z + XY + YZ’ [2]
\n(d) Convert the following expression into its canonical POS form: [2]
\nF(A, B) = (A + B).A’
\n(e) Minimize the following Boolean expression using the Karnaugh map: [2]
\n\\(\\mathrm{F}(\\mathrm{A}, \\mathrm{B}, \\mathrm{C})=\\overline{\\mathrm{A}} \\mathrm{B} \\overline{\\mathrm{C}}+\\overline{\\mathrm{A}} \\mathrm{BC}+\\mathrm{AB} \\overline{\\mathrm{C}}+\\mathrm{ABC}\\)
\nAnswer:
\n
\n<\/p>\n
\n(a) State two advantages of using the concept of inheritance in Java. [2]
\n(b) An array AR [-4…. 6, -2 ….. 12 ], stores elements in Row Major Wise, with the address AR[2] [3] as 4142 . If each element requires 2 bytes of storage, find the Base address. [2]
\n(c) State the sequence of traversing a binary tree in: [2]
\n(i) preorder
\n(ii) postorder
\n(d) Convert the following infix expression into its postfix form: [2]
\n(A\/B + C) * (D\/(E – F))
\n(e) State the difference between the functions int nextlnt() and boolean hasNextInt(). [2]
\nAnswer:
\n(a) (i) Existing code can be reused and functionality can be extended.
\n(ii) New members to the derived class can be added.
\n(iii) Implementation of existing methods can be replaced by overriding a method that already exists in the base class.<\/p>\n
\nRow- wise order,
\nAR[2] [3] = B + W(n(i-1)+(j-1))
\nGiven i = 2, j = 3, W = 2 bytes
\nB = ?
\nn = Uc – Lc + 1
\n= 12 – (-2) + 1
\n= 12 + 2 + 1
\n= 15
\nNow, 414 = B + 2 [15 (2 -(-2)) + (3-(-4))]
\nB + 2[60 + 7] = 4142
\nB + 134 = 4142 or B = 4008<\/p>\n
\n(ii) Postorder is Left, Right, Root<\/p>\n
\n= (A\/B + C) (D\/(E-F))*
\n= (AB\/+C) (D\/(EF-))*
\n= (AB\/C+) (DEF-\/)*
\n= AB\/C + DEF-\/*<\/p>\n
\n(a) The following functions are part of some class:<\/p>\nvoid fun 1 (char s[ ],int x)\r\n{\r\nSystem.out.println(s);\r\nchar temp;\r\nif(x<s.length\/2)\r\n{\r\ntemp=s[x];\r\ns[x]=s[s.length-x-1];\r\ns[s.length-x-1 ]=temp;\r\nfun1(s, x+1);\r\n}\r\n}\r\nvoid fun2(String n)\r\n{\r\nchar c[ ]=new char[n.length()];\r\nfor(int i=0;i<c.length; i++)\r\nc[i]=n.charAt(i);\r\nfun1(c,0);\r\n}<\/pre>\n
\n(ii) What will be the output of fun2( ) when the value of n = \u2018SCROLL\u201d?
\n(iii) State in one line what does the function fim1() do apart from recursion. [1]
\n(b) The following is a function of some class which sorts an integer array a[ ] in ascending order using selection sort technique. There are some places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which may be replaced by a statement\/expression so that the function works properly:<\/p>\nvoid selectsort(int [ ]a)\r\n{\r\nint i, j, t, min, minpos;\r\nfor(i=0;i {\r\nmin=a[i];\r\nminpos = i;\r\nfor(j=?2?;y<a.length;j++) { if(min>a[j])\r\n{\r\n?3?=j;\r\nmin = ?4?;\r\n}\r\n}\r\nt=a[minpos];\r\na[minpos]=a[i];\r\na[i]= ?5?;\r\n}\r\nfor(int k=0;k<a.length;k++)\r\nSystem. out.println(a[k]);\r\n}<\/pre>\n
\n(ii) What is the expression or statement at ?2? [1]
\n(in) What is the expression or statement at ?3? [1]
\n(iv) What is the expression or statement at ?4? [1]
\n(v) What is the expression or statement at ?5? [1]
\nAnswer:
\n(a) (i) JUNE
\nJNUE
\n(ii) SCROLL
\nLCROLS
\nLLROCS
\nLLORCS
\n(iii) Reverses the part of a string from a specified location.
\n(b) (i) a. length
\n(ii) i + 1
\n(iii) minpos=j
\n(iv) min = a [j]
\n(v) t<\/p>\n
\nAnswer any three questions<\/strong><\/p>\n
\n(a) Given the Boolean function F(A, B, C, D) = \u03a3 (0, 1, 2, 3, 5, 6, 7, 10, 13, 14, 15)
\n(i) Reduce the above expression by using, 4-variable Karnaugh map, showing the various groups (i.e., octal, quads and pairs). [4]
\n(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
\n(b) Given the Boolean function P(A, B, C, D) = \u03a0 (0, 1, 2, 3, 5, 6, 7, 10, 13, 14, 15)
\n(i) Reduce the above expression by using the 4-variable Karnaugh map, showing the various groups (i.e., octal, quads and pairs). [4]
\n(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
\nAnswer:
\n(a) (i) F(A, B, C, D) = \u03a3 (0, 1, 2, 3, 5, 6, 7, 10, 13, 14, 15)
\n
\n
\n
\n<\/p>\n
\nA school intends to select candidates for the Inter-School Athletic Meet, as per the criteria are given below:
\nThe candidate is from the Senior School and has participated in an Inter-School Athletic Meet earlier.
\nOR
\nThe candidate is not from the Senior School, but the height is between 5 ft. and 6 ft. and weight is between 50 kg. and 60 kg.
\nOR
\nThe candidate is from the Senior School and has a height between 5 ft. and 6 ft., but the weight is not between 50 kg. and 60 kg.
\nThe inputs are:<\/p>\n\n\n
\n Inputs<\/strong><\/td>\n <\/td>\n<\/tr>\n \n S<\/td>\n A student is from the Senior School<\/td>\n<\/tr>\n \n W<\/td>\n Weight is between 50 kg. and 60 kg.<\/td>\n<\/tr>\n \n H<\/td>\n Height is between 5 ft. and 6 ft.<\/td>\n<\/tr>\n \n A<\/td>\n Taken part in Inter-School Athletic Meet earlier<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nOutput: X – Denotes the selection criteria [1 indicates selected and 0 indicates rejected in all cases]
\n(a) Draw the truth table for the inputs and outputs given above and write the SOP expression for X (S, W, H, A). [5]
\n(b) Reduce X(S, W, H, A) using Karnaugh map. [5]
\nDraw the logic gate diagram for the reduced SOP expression for X(S, W, H, A) using AND and OR gate. You may use gates with two or more inputs. Assume that the variable and their complements are available as inputs.
\nAnswer:
\n(a) The truth table for given input and output is:
\n
\n
\n<\/p>\n
\n(a) With the help of a logic diagram and a truth table, explain a Decimal to Binary encoder. [4]
\n(b) Derive a Boolean expression for the logic diagram given below and simplify it. [3]
\n
\n(c) Reduce the following expression using Boolean laws: [3]
\nF (A, B, C, D) = (A’ + C) (A’ + C’) (A’ + B + C’ D)
\nAnswer:
\n(a) Decimal to binary encoder is used to convert decimal numbers into its equivalent binary form.
\n
\n
\n<\/p>\n
\n(a) Differentiate between XNOR and XOR gates. Draw the truth table and logic diagrams of 3 input XNOR gate. [4]
\n(b) Differentiate between a proposition and wff. [2]
\n(c) Define Half Adder. Construct the truth table and a logic diagram of a HalfAdder. [4]
\nAnswer:
\n(a) XOR gate produces output as 1 when odd no. of inputs are 1 otherwise it gives 0. Whereas XNOR gate produces output as 1 when even no. of inputs are 1 otherwise it returns 0.
\n<\/p>\n
\n
\n<\/p>\n
\nAnswer any two questions<\/strong><\/p>\n\n
\nA class Mixer has been defined to merge two sorted integer arrays in ascending order. Some of the members of the class are given below: [10]
\nClass name: Mixer
\nData members\/instance variables:
\nint arr[ ]: to store the elements of an array
\nint n: to store the size of the array
\nMember functions:
\nMixer(int nn): constructor to assign n=nn
\nvoid accept(): to accept the elements of the array in ascending order without any duplicates
\nMixer mix (Mixer A): to merge the current object array elements with the parameterized array elements and return the resultant object
\nvoid display(): to display the elements of the array
\nSpecify 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.
\nAnswer:<\/p>\nimport java.util.*;\r\nclass Mixer\r\n{\r\nintarr[];\r\nint n;\r\nstatic Scanner sc=new Scanner(System.in);\r\nMixer(int nn)\r\n{\r\nn=nn;\r\narr=new int[n];\r\n}\r\nvoid accept()\r\n{\r\nSystem.out.println(\"Enter\"+ n+ \" elements in ascending order\");\r\nfor(int i=0; i<n; i++)\r\narr[i]=sc.nextInt();\r\n}\r\nMixer mix(Mixer A)\r\n{\r\nMixer B=new Mixer(n+A.n);\r\nint x=0, y=0, z=0;\r\nwhile(xA.arr[y])\r\n{\r\nB.arr[z]=A.arr[y];\r\ny++;\r\n}\r\nelse\r\n{\r\nB.arr[y]=arr[x];\r\nx++;\r\n}\r\nz++;\r\n}\r\nwhile(x<n)\r\nB.arr[z++]=arr[x++];\r\nwhile(y<A.n)\r\nB.arr[z++]=A.arr[y++];\r\nreturn B;\r\n}\r\nvoid display()\r\n{\r\nfor(int i=0;i<n;i++)\r\nSystem.out.println(arr[i]);\r\n}\r\nstatic void main()\r\nR=P.mix(Q);\r\nR. display();\r\n}\r\n}<\/pre>\n
\nA class SeriesSum is designed to calculate the sum of the following series:
\n\\(\\mathrm{Sum}=\\frac{\\mathrm{x}^{2}}{1 !}+\\frac{\\mathrm{x}^{4}}{3 !}+\\frac{\\mathrm{x}^{6}}{5 !}+\\ldots \\frac{\\mathrm{x}^{\\mathrm{n}}}{(\\mathrm{n}-1) !}\\)
\nSome of the members of the class are given below:
\nClass name: SeriesSum
\nData members\/instance variables:
\nx: to store an integer number
\nn: to store the number of terms
\nsum: double variable to store the sum of the series
\nMember functions:
\nSeriesSum(int xx, int nn): constructor to assign x=xx and n=nn
\ndouble find fact(int m): to return the factorial of m using the recursive technique.
\ndouble find power(int x, int y): to return x raised to the power of y using the recursive technique.
\nvoid calculate(): to calculate the sum of the series by invoking the recursive functions respectively
\nvoid display(): to display the sum of the series
\n(a) Specify the class SeriesSum, giving details of the constructor(int, int), double find fact(int),
\ndouble 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. [8]
\n(b) State the two differences between iteration and recursion. [2]
\nAnswer:<\/p>\n(a) class SeriesSum\r\n{\r\nint x, n;\r\ndouble sum;\r\nSeriesSum(int xx, int nn)\r\n{\r\nx=xx;\r\nn=nn;\r\nsum=0.0;\r\n}\r\ndouble findfact(int a)\r\n{\r\nreturn (a<2)? 1:a*findfact(a-1);\r\n}\r\ndouble findpower(int a, int b)\r\n{\r\nreturn (b==0)? 1:a*findpower(a,b-1);\r\n}\r\nvoid calculate()\r\n{\r\nfor(int i=2;i<=n;i+=2)\r\nsum+= findpower(x, i)\/findfact(i-1);\r\n}\r\nvoid display()\r\n{\r\nSystem.out.println(\"sum=\"+ sum);\r\n}\r\nstatic void main()\r\n{\r\nSeriesSum obj = new SeriesSum(3, 8);\r\nobj.calculate();\r\nobj.display!);\r\n}\r\n}<\/pre>\n
\nRecursion: Slow process and more memory.<\/p>\n
\nA sequence of Fibonacci strings is generated as follows:
\nS0 = “a”, SF = “b”, Sn = S(n-1) + S(n-2) where ‘+’ denotes concatenation. Thus the sequence is:
\na, b, ba, bab, babba, babbabab,……. n terms. [10]
\nDesign a class FiboString to generate Fibonacci strings. Some of the members of the class are given below:
\nClass name: FiboString
\nData members\/instance variables:
\nx: to store the first string
\ny: to store the second string
\nz: to store the concatenation of the previous two strings
\nn: to store the number of terms
\nMember functions\/methods:
\nFiboString(): constructor to assign x=”a”, y=”b” and z=”ba”
\nvoid accept(): to accept the number of terms ‘n’
\nvoid generate(): to generate and print the Fibonacci strings. The sum of (‘+’ ie concatenation) first two strings is the third string. Eg. “a” is first string, “b” is second string then the third will be “ba”, and fourth will be “bab” and so on.
\nSpecify the class FiboString, giving details of the constructor(), void accept() and void generate(). Define the main() function to create an object and call the functions accordingly to enable the task.
\nAnswer:<\/p>\nimportjava.util.*;\r\nclass FiboString\r\n{\r\nString x,y,z;\r\nint n;\r\nFiboString()\r\n{\r\nx=\"a\";\r\ny=\"b\";\r\nz=\"ba\";\r\n}\r\nvoid accept()\r\n{\r\nScanner Sc = new Scanner (System.in);\r\nSystem. out.println (\"Enter number of terms\");\r\nn = Sc.nextInt();\r\n}\r\nvoid generate()\r\n{\r\nSystem. out.print(x+\",\"+y);\r\nfor(int i=0; i<=n-2; i++)\r\n{\r\nSystem.out.print(\",\"+z);\r\nx=y;\r\ny=z;\r\nz=y+x; OR z= y.concat(x);\r\n}\r\n}\r\nstatic void main()\r\n{ FiboString obj=new FiboString();\r\nobj.accept();\r\nobj.generate();\r\n}\r\n}<\/pre>\n
\nAnswer any two questions<\/strong><\/p>\n\n
\nA superclass Stock has been defined to store the details of the stock of a retail store. Define a subclass Purchase to store the details of the items purchased with the new rate and updates the stock. Some of the members of the classes are given below: [10]
\nClass name: Stock
\nData members\/instance variables:
\nitem: to store the name of the item
\nqt: to store the quantity of an item in stock
\nrate: to store the unit price of an item
\namt: to store the net value of the item in stock
\nMember functions:
\nStock (…): parameterized constructor to assign values to the data members
\nvoid display(): to display the stock details
\nClass name: Purchase
\nData members\/instance variables:
\npqty: to store the purchased quantity
\nprate: to store the unit price of the purchased item
\nMember functions\/ methods:
\nPurchase(…): parameterized constructor to assign values to the data members of both classes
\nvoid update (): to update stock by adding the previous quantity by the purchased quantity and replace the rate of the item if there is a difference in the purchase rate. Also, update the current stock value as (quantity * unit price)
\nvoid display(): to display the stock details before and after updation.
\nSpecify the class Stock, giving details of the constructor() and void display(). Using the concept of inheritance, specify the class Purchase, giving details of the constructor(), void update() and void display().
\nThe main function and algorithm need not be written.
\nAnswer:<\/p>\nclass Stock\r\n{\r\nString item; doubleqty,rate,amt;\r\nStock(String a, double b, double c)\r\n{\r\nitem=a;\r\nqty=b;\r\nrate=c;\r\namt=qty * rate;\r\n}\r\nvoid display()\r\n{\r\nSystem.out.println(\"Name of the item: \"+item);\r\nSystem.out.println(\"Quantity: \"+qty);\r\nSystem.out.println(\"Rate per unit: \"+rate);\r\nSystem.out.println(\"Net value: \"+amt);\r\n}\r\n}\r\nclass Purchase extends Stock\r\n{\r\nint pqty;\r\ndouble prate;\r\nPurchase(String a, double b, double c, int d, double e)\r\n{\r\nsuper(a, b, c);\r\npqty=d;\r\nprate=e;\r\n}\r\nvoid update()\r\n{\r\nqty += pqty;\r\nif(prate!=rate)\r\nrate=prate;\r\namt = qty * rate;\r\n}\r\nvoid display()\r\n{\r\nsuper.display();\r\nupdate();\r\nsuper.display();\r\n}\r\n}<\/pre>\n
\nA stack is a linear data structure which enables the user to add and remove integers from one end only, using the concept of LIFO(Last In First Out). An array containing the marks of 50 students in ascending order is to be pushed into the stack.
\nDefine a class Array_to_Stack with the following details: [10]
\nClass name: Array to Stack
\nData members\/instance variables:
\nm[]: to store the marks
\nst[ ]: to store the stack elements
\ncap: maximum capacity of the array and stack
\ntop: to point the index of the topmost element of the stack
\nMethods\/Member functions:
\nArray_to_Stack(int n): parameterized constructor to initialize cap = n and top = -1
\nvoid input_marks(): to input the marks from the user and store it in the array m[ ] in ascending order and simultaneously push the marks into the stack st[ ] by invoking the function pushmarks()
\nvoid pushmarks(int v): to push the marks into the stack at top location if possible, otherwise, display \u201cnot possible\u201d
\nintpopmarks(): to return marks from the stack if possible, otherwise, return-999
\nvoid display(): To display the stack elements
\nSpecify the class Array_to_Stack, giving the details of the constructor(int), void input_marks(), void pushmarks(int), int popmarks() and void display().
\nThe main function and the algorithm need not be written.
\nAnswer:<\/p>\nimportjava.util.*;\r\nclass Array to Stack\r\n{\r\nint m[], stD;\r\nint cap, top;\r\nstatic Scanner sc=new Scanner(System.in);\r\nArray_to_Stack(int n)\r\n{\r\ncap = n;\r\ntop = -1;\r\nm=newint[cap];\r\nst=new int[cap];\r\n}\r\nvoid input_marks()\r\n{\r\nSystem.out.println(\"Enter \"+cap+\" elements in ascending order\");\r\nfor(int i=0;i<cap;i++)\r\n{\r\nm[i]=sc.nextInt();\r\npushmarks(m[i]);\r\n}\r\n}\r\nvoid pushmarks(int v)\r\n{\r\nif (top<cap-1) \r\nst[++top]=v; \r\nelse System.out.println(\"stack is full\"); \r\n} \r\nint popmarks() \r\n{ \r\nif(top>=0)\r\nretumst[top--];\r\nelse\r\nreturn-999;\r\n}\r\nvoid display()\r\n{\r\nfor(int i=top;i>=0 ;i--)\r\nSystem.out.println(st[i]);\r\n}\r\n}<\/pre>\n
\n(a) A linked list is formed from the objects of the class: [4]<\/p>\nclass Node\r\n{\r\nint number,\r\nNode nextNode;\r\n}<\/pre>\n
\nvoid add node (Node start, int num)
\n(b) Define the terms complexity and big-O notation.
\n(c) Answer the following from the diagram of the Binary Tree given below: [2]
\n
\n(i) The root of the tree. [1]
\n(ii) Left subtree [1]
\n(iii) Inorder traversal of the tree [1]
\n(iv) Size of the tree. [1]
\nAnswer:
\n(a) Algorithm to add a node at the end of an existing linked list.
\nSteps:<\/p>\n\n
void add node (node start, int num)\r\n{\r\nNode A = new Node(start)\r\nwhile (A != null)\r\nA=A.nextNode;\r\nNode C = new node ();\r\nC. number = num;\r\nC.nextNode = null;\r\nA. next = C;\r\n}<\/pre>\n
\nBig \u2018O\u2019 notation: It is a unit of measurement of an algorithm or represents complexity.
\n(c) (i) A
\n(ii) B, C, F, D, G, E, H
\n(iii) C, D, E, B, G, H, F, A, K, L, J
\n(iv) 11<\/p>\nISC Class 12 Computer Science Previous Year Question Papers<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"