Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
54 views
ISC 2016 Computer Science Theory Class XII
Computer science therory paper
Uploaded by
Kushagra Saxena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ISC 2016 Computer Science Theory Class XII For Later
Download
Save
Save ISC 2016 Computer Science Theory Class XII For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
54 views
ISC 2016 Computer Science Theory Class XII
Computer science therory paper
Uploaded by
Kushagra Saxena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ISC 2016 Computer Science Theory Class XII For Later
Carousel Previous
Carousel Next
Save
Save ISC 2016 Computer Science Theory Class XII For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 9
Search
Fullscreen
COMPUTER SCIENCE PAPER 1 (THEORY) (Maximum Marks: 70) (Time allowed: Three hours) (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writ is ti “Answer all questions in Part I (compulsory) and six questions from Part-I, choosing two 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 brackes PART I (20 Marks) Answer all questions. While answering questions in this Part, indicate briefly your working and reasoning, wherever required, Question 1 (a) State Involution law and prove it with the help of a truth table. (1) (b) Show that X V ~(Y AX) is a tautology. (1) (©) Find the dual of: ti YX+X41=1 @ Write the maxterm and minterm, when the inputs are A=0, B=1, C=1 and D=0, (1) (©) Draw the logic circuit of a NAND gate using NOR gates only. tl Question 2 (a) Define the term fall through condition with reference to switch( ) case. 21 (b) Convert the following infix expression to postfix form: Ry} A+B/C*(D/E*F) (© A matrix A{m}[n] is stored with each element requiring 4 bytes of storage. ‘If the [2] base address at A[I][1] is 1500 and the address at A[4][5] is 1608, determine the number of rows of the matrix when the matrix is stored in Column Major Wise. ‘This Paper consists of 9 printed pages and 1 blank page, 1 1216-868 A © Copyright reserved. YEARS QUESTION PAPER.COM(4) _ From the class declaration given below, state the nature of the identifiers A,B,C [2] and D: class A extends B implements C, D (©) State one advantage and one disadvantage of using recursion over iteration. (2) Question 3 The following function Check( ) is a part of some class. What will the function Cheek() [5] - retum when the values of both ‘m’ and ‘n’ are equal to 5? Show the dry run / working. int Check (int m, int n) return ++m + Check (m, ——n); } PART - II (50 Marks) Answer six questions in this part, choosing two questions from Section A, two from Section B and two from Section C. SECTION - A Answer any two questions. Question 4 {@) Given the Boolean function F(A, B, C, D) = E (1,3,5,7,8,9,10,11,14,15). (i) Reduce the above expression by using 4-variable Kamaugh map, showing [4] the various groups (i.e. octal, quads and pairs). (ii) Draw the logic gate diagram for the reduced expression. Assume that the [1] variables and their complements are available as inputs. (b) _ Given the Boolean function: F(A, B, C, D) = 2(4,6,7,10,11,12,14,15). (@ Reduce the above expression by using 4-variable Kamaugh map, showing [4] the various groups (i.e. octal, quads and pairs). Gi) Draw the logic gate diagram for the reduced expression. Assume that the [1] variables and their complements are available as inputs. YEARS 1216-868A, QUESTION PAPER.COMQuestion 5 (@) What is adecoder? Draw the logic diagram for a binary to octal (3 to 8) decoder. [3] (®) How is a half adder different from a full adder? Draw the truth table and derive [4] the SUM and CARRY expression for a full adder. Also, draw the logic diagram for a full adder. (©) State whether the following expression is a Tautology, Contradiction or a {3} Contingency, with the help of a truth table: (XZ) V ~ [(K=Y) A (Y=>2)] Question 6 : (@) A passenger is allotted a window seat in an aircraft, if he/she satisfies the criteria [5] given below: © The passenger is below 15 years and is accompanied by an adult. OR © The passenger isa lady and is not accompanied by an adult, OR . The passenger is not below 15 years, but is travelling for the first time. The inputs are: INPUTS A The passenger is below 15 years age. C__| The passenger is accompanied by an adult, ; L The passenger is a lady, F The passenger is travelling for the first time. (Inall the above cases | indicates yes and 0 indicates no). Output: ~W — Denotes the passenger is allotted a window seat (1 indicates yes and 0 indicates no) Draw the truth table for the inputs and outputs given above and write the SOP expression for W(A,C,L,F), (b) State the complement properties. Find the complement of the following Boolean [3] expression using De Morgan’s law: AB'+ A'+BC (©) _ Differentiate between Canonical form and Cardinal form of expression. 2 3 YEARS. 1216-868A QUESTION PAPER.COMSECTION -B Answer any two questions. Each program should be written in such a way that it clearly depicts the logic of the problem. This can be achieved by using mnemonic names and comments in the program. (Flowcharts and Algorithms are not required.) The programs must be written in Java. Question 7 A disarium number is a number in which the sum of the digits to the power of their [10] respective position is equal to the number itself. Example: 135=1'+37+5? Hence, 135 is a disarium number. Design a class Disarium to check if a given number is a disarium number or not. Some of the members of the class are given below: Class name Disarium Data members/instance variables: int num : stores the number int size + stores the size of the number Methods/Member functions: Disarium(int nn) : parameterized constructor to initialize the data members n= nn and size = 0 void countDigit() : counts the total number of digits and assigns it to size int sumofDigits(int n, intp) : returns the sum of the digits of the number(n) to the power of their respective positions(p) using recursive technique void check( ) : checks whether the number is a disarium number and displays the result with an appropriate message Specify the class Disarium giving the details of the constructor( ), void countDigit( ), int sumofDigits(int, int) and void check(). Define the main( ) function to create an object and cail the functions accordingly to enable the task. a YEARS. 1216-868 QUESTION PAPER.COMQuestion 8 A class Shift contains a two dimensional integer array of order (mxn) where the maximum [10] values of both m and n is 5. Design the class Shift to shuffle the matrix (i.e. the first row becomes the last, the second row becomes the first and so on). The details of the members of the class are given below: Class name Data member/instance variable: mat{ JE] m a Member functions/methods: Shift(int mm, int nn ) void input( ) void cyclic(Shift P) void display( ) Shift stores the array element integer to. store the number of rows integer to store the number of columns parameterized constructor to initialize the data members m= mm and n = nn enters the elements of the array enables the matrix of the object(P) to shift each row upwards in a cyclic manner and store the resultant matrix in the current object displays the matrix elements Specify the class Shift giving details of the constructor( ), void input( ), void cyelic(Shift) and void display( ). Define the main( ) function to create an object and call the methods accordingly to enable the task of shifting the array elements. 1216-8684 10 YEARS QUESTION PAPER.COMQuestion 9 A class ConsChange has been defined with the following details: {10] Class name : ConsChange Data members/instance variables: . word : stores the word Jen : stores the length of the word Member functions/methods: . ConsChange( ) : default constructor void readword( ) : accepts the word in lowercase void shiftcons( ) : shifts all the consonants of the word at the beginning followed by the vowels (e.g. spoon becomes spnoo) changes the case of all occurring consonants of the shifted word to uppercase, for e.g. (spnoo becomes SPNoo) void show( ) : displays the original word, shifted word and the changed word void changeword( ) Specify the class ConsChange giving the details of the constructor( ), void readword( ), void shifteons( ), void changeword( ) and void show( ). Define the main( ) function to create an object and call the functions accordingly to enable the task. 10 YEARS 1216-868A QUESTION PAPER.COMSECTION-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 10 A super class Bank has been defined to store the details of a customer. Define a sub-class Account that enables transactions for the customer with the bank. The details of both the classes are given below: Class name Bank Data member/instance variable: name stores the name of the customer aceno stores the account number P stores the principal amount in decimals Member functions/methods: Bank(...) parameterized constructor to assign values to the instance variables void display( ) displays the details of the customer Class name: Account Data member/instance variable: amt stores the transaction amount in decimals Member functions/methods: Account(...) parameterized constructor to assign values to the instance variables of both the classes void deposit( ) accepts the amount and updates the principal as void withdraw( ) void display() p=p+amt accepts the amount and updates the principal as p=p-amt If the withdrawal amount is more than the principal amount, then display the message “INSUFFICIENT BALANCE”. If the principal amount after withdrawal is less than 500, then a penalty is imposed by using the formula p=p-(500-py/10 displays the details of the customer Assume that the super class Bank has been defined. Using the concept of Inheritance, specify the class Account giving details of the constructor(...), void deposit( ), void withdraw( ) and void display(). The super class and the main function need not be written. 1216-868A 10 YEARS QUESTION PAPER.COMQuestion 11 A bookshelf is designed to store the books in a stack with LIFO(Last In First Out) 65) operation. Define a class Book with the following specifications: Class name < Book Data members/instance variables: namef ] : stores the names of the books point : stores the index of the topmost book max : stores'the maximum capacity of the bookshelf Methods/Member functions: Book(int cap) : constructor to initialise the data members max = cap and point = —1 void tell( ) : displays the name of the book which was last . entered in the shelf. If there is no book left in the shelf, displays the message “SHELF EMPTY” void add(String v) : adds the name of the book to the shelf if possible, otherwise displays the message “SHELF FULL” void display( ) : displays all the names of the books availablé in the shelf Specify the class Book giving the details of ONLY the functions void tell( ) and void add(String), Assume that the other functions have been defined. The main function need not be written. Question 12 . (@) A linked list is formed from the objects of the class Node. The class structure of [2] the Node is given below: class Node £ String name; Node next; } Write an Algorithm OR a Method to search for a given name in the linked list, The method of declaration is given below: boolean searchName(Node start, String v) YEARS 1216-8684 QUESTION PAPER.COM(b) Answer the following questions from the diagram of a Binary Tree given below: G) Write the inorder traversal of the above tree structure. fy) (ii) Name the parent of the nodes B and G. Tl (iii) Name the leaves of the right sub-tree. rea 9 YEARS 1216-868A QUESTION PAPER.COM
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6129)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (935)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8215)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2923)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2544)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)