Category - PopChar. PopChar. PopChar 8. PopChar 8 Key. PopChar 8 Serial. PopChar 8.5. PopChar 8.5 Cracked. PopChar 8.5 Full. PopChar 8.5 Key. PopChar 8.5 K. PopChar Win, descargar gratis. PopChar Win 8.6: PopChar is an invaluable utility application that lets you insert special characters, accented and foreign letters etc. From all installed fonts into your documents. You never need to search for or remember complex keystrokes again!
ergonis software – 1.7MB – Shareware – Windows
PopChar 8.5 with Key CRACKSurl 1 Comment. Categories PopChar. PopChar is a software utility whose main window is developed specifically to aid people in inserting special characters into all their text documents and more. PopChar makes “typing” of unusual characters easy without having to remember keyboard combinations. PopChar 8 10download, 17856 records found, first 100 of them are: Popchar 2.3 patch. Getflv Pro 8.9.0.8 serial keygen: Nero 8 Ultra Edition 8.0.3.1 serials key. Imazing 2 1 1.
Popchar 8.9 Crack Mac With Full License Key Free 2022 PopChar Crack MAC With Full License Key 2022 PopChar eight.9 Crack Mac helps you get primarily essentially the most out of Continue Reading.
PopChar is an invaluable utility application that lets you insert special characters, accented and foreign letters etc. from all installed fonts into your documents. You never need to search for or remember complex keystrokes again! Just pop up the PopChar window, click the desired character, and the character is inserted into your current document. PopChar Win is the Windows sibling of the famous PopChar utility, which has been available on the Macintosh for many years. Now you can enjoy the ease of use of these award-wining Macintosh utilities on the Windows platforms. If a font contains Unicode characters, you can check 'Unicode' in the Settings menu to see all of them, neatly arranged in the standard Unicode categories. Features: simple to use, click and select, inserts accented characters, foreign letters and any other characters from all installed fonts, full Unicode support, inserts HTML symbols, remembers and highlights the most recently selected characters, exclude common characters (letters, digits and accents), inserts characters in 'styled' or 'unstyled' mode, displays the keystrokes needed to create selected characters, hot key activation, automatically starts at login and more.
Overview
PopChar Win is a Shareware software in the category Graphics Applications developed by ergonis software.
It was checked for updates 31 times by the users of our client application UpdateStar during the last month.
The latest version of PopChar Win is 8.6, released on 06/16/2020. It was initially added to our database on 08/27/2007.
PopChar Win runs on the following operating systems: Windows. The download file has a size of 1.7MB.
PopChar Win has not been rated by our users yet.
Write a review for PopChar Win!
31 users of UpdateStar had PopChar Win installed last month.
10/26/2020 | IHMC CmapTools 6.04 |
10/26/2020 | Glary Utilities 5.153.0.179 |
10/26/2020 | W10Privacy 3.5.1.0 |
10/26/2020 | MPC-HC 1.9.8 |
10/26/2020 | AllDup 4.4.40 |
Secure and free downloads checked by UpdateStar
Stay up-to-date
with UpdateStar freeware.
with UpdateStar freeware.
10/21/2020 | Adobe closes critical vulnerabilities in Photoshop and Illustrator |
10/21/2020 | Security update for Chrome 86 available |
10/20/2020 | New Firefox 82 available |
10/16/2020 | Thunderbird 78.3.3 is available |
10/16/2020 | Free UpdateStar Packs to setup your computer software |
- » popchar win
ISC Computer Science Previous Year Question Paper 2015 Solved for Class 12
Popchar 8 9 12 Times
Maximum Marks: 70
Time allowed: 3 hours
Time allowed: 3 hours
- Candidates are allowed additional. 15 minutes for only reading the paper.
- They must NOT start writing during this time.
- 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
Answer all questions
While answering questions in this Part, indicate briefly your working and reasoning, wherever required.
Question 1.
(a) Simplify: (A + C). (A + A.D) + A.C + C [2]
(b) Draw a logic circuit for (A + B).(C + D). C [2]
(c) Verify the following proposition with the help of a truth table: [2]
P ∨ (~P ∧ Q) = P ∨ Q
(d) State De Morgan’s law and verify it, using a truth table. [2]
(e) Answer the questions related to the circuit given below: [2]
(i) Give the output if, X = 1 and Y = 0
(ii) Name the basic gate represented by the above diagram.
Answer:
(a) (A + C). (A + A.D) + A.C + C
= (A + C).(1 + D).A + C(1 + A) [∵ 1 + D = 1]
= (A + C).A + C [∵ 1 + A = 1]
= A.A + A.C + C [∵ A.A = A]
= A + C(A + 1)
= A + C [∵ A + 1 = 1]
(a) Simplify: (A + C). (A + A.D) + A.C + C [2]
(b) Draw a logic circuit for (A + B).(C + D). C [2]
(c) Verify the following proposition with the help of a truth table: [2]
P ∨ (~P ∧ Q) = P ∨ Q
(d) State De Morgan’s law and verify it, using a truth table. [2]
(e) Answer the questions related to the circuit given below: [2]
(i) Give the output if, X = 1 and Y = 0
(ii) Name the basic gate represented by the above diagram.
Answer:
(a) (A + C). (A + A.D) + A.C + C
= (A + C).(1 + D).A + C(1 + A) [∵ 1 + D = 1]
= (A + C).A + C [∵ 1 + A = 1]
= A.A + A.C + C [∵ A.A = A]
= A + C(A + 1)
= A + C [∵ A + 1 = 1]
(b) Logic circuit for (A + B). (C + D). C
Popchar 8 95
(d) The two theorems suggested by De Morgan which are extremely useful in Boolean Algebra are as following:
Theorem 1
NAND = Bubbled OR
Table showing verification of the De Morgans’s first theorem
Theorem 2
NOR = Bubbled AND
Table showing verification of the De Morgans’s second theorem
(i) when X = 1 and Y = 0
the output will be 0.
(ii) NOR gate
Theorem 1
NAND = Bubbled OR
Table showing verification of the De Morgans’s first theorem
Theorem 2
NOR = Bubbled AND
Table showing verification of the De Morgans’s second theorem
(i) when X = 1 and Y = 0
the output will be 0.
(ii) NOR gate
Question 2.
(a) Define computational complexity. Calculate the complexity using Big ‘O’ notation for the following code segment: [2]
for(int k=0; k < n; k++)
s+ = k;
(b) Convert the following infix notation into postfix form: [2]
X + (Y – Z) + ((W+E)*F)/J
(c) Differentiate between this keyword and the super keyword. [2]
(d) The array D [-2…10][3…8] contains double type elements. If the base address is 4110, find the address of D [4] [5], when the array is stored in Column Major Wise. [2]
(e) State any two characteristics of a Binary tree. [2]
Answer:
(a) Computational complexity theory focuses on classifying computational problems according to their difficulty. A problem is considered difficult if large amounts of resources (time, storage, communications, circuit gates, processors, etc.) are required to solve it, regardless of the algorithm used. A subset of computational complexity theory, known as analysis of algorithms, provides theoretical estimates for the resources needed for specific algorithms. These estimates are frequently expressed in Big O (or Big-Oh) notation, written as functions of the size of the input passed to the algorithm. For example, binary search is estimated to require a number of steps proportional to the logarithm of the length of the list being searched. In Big O notation, the estimate is written as 0(log (n)), where n = length of the list. O(N)
O(N) describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set.
(a) Define computational complexity. Calculate the complexity using Big ‘O’ notation for the following code segment: [2]
for(int k=0; k < n; k++)
s+ = k;
(b) Convert the following infix notation into postfix form: [2]
X + (Y – Z) + ((W+E)*F)/J
(c) Differentiate between this keyword and the super keyword. [2]
(d) The array D [-2…10][3…8] contains double type elements. If the base address is 4110, find the address of D [4] [5], when the array is stored in Column Major Wise. [2]
(e) State any two characteristics of a Binary tree. [2]
Answer:
(a) Computational complexity theory focuses on classifying computational problems according to their difficulty. A problem is considered difficult if large amounts of resources (time, storage, communications, circuit gates, processors, etc.) are required to solve it, regardless of the algorithm used. A subset of computational complexity theory, known as analysis of algorithms, provides theoretical estimates for the resources needed for specific algorithms. These estimates are frequently expressed in Big O (or Big-Oh) notation, written as functions of the size of the input passed to the algorithm. For example, binary search is estimated to require a number of steps proportional to the logarithm of the length of the list being searched. In Big O notation, the estimate is written as 0(log (n)), where n = length of the list. O(N)
O(N) describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set.
(b) = X + (Y – Z) + ((W + E) * F)/J
= X + (YZ-) + ((WE+) * F)/J
= X + (YZ-) + ((WE + F*))/J
= X + (YZ-) + (WE + F*)/J
= X + (YZ-) + (WEF*+)/J
= X + (YZ -) + (WEF * + J/)
= XYZ- + WEF* + J/+
= X + (YZ-) + ((WE+) * F)/J
= X + (YZ-) + ((WE + F*))/J
= X + (YZ-) + (WE + F*)/J
= X + (YZ-) + (WEF*+)/J
= X + (YZ -) + (WEF * + J/)
= XYZ- + WEF* + J/+
Popchar 8 9 Cm
(c) This refers to an object, that too, a current object or current class whereas super refers directly to its immediate above superclass. private variables cannot be accessed in an inherited class by using this, whereas by using “super” we can easily access the private variables in its superclass.
![Popchar 8 9 Popchar 8 9](https://screenshots.macupdate.com/JPG/7813/7813_1578408555_scr.jpg)
(d) D [-2… 10] [3 …8]
BaseAddress B = 4110
I = 4, J = 5
D [4] [5] = ?
W = 8 bytes
M = 10
Columnwise
D[I, J] = B + ((J – 1) * M + (I – 1)) * W
D [4] [5] = 4110 + ((5 – 1) + 10 + (4 – 1)) * 8
= 4110+ (40 + 3) × 8
= 4110 + 344
= 4454
BaseAddress B = 4110
I = 4, J = 5
D [4] [5] = ?
W = 8 bytes
M = 10
Columnwise
D[I, J] = B + ((J – 1) * M + (I – 1)) * W
D [4] [5] = 4110 + ((5 – 1) + 10 + (4 – 1)) * 8
= 4110+ (40 + 3) × 8
= 4110 + 344
= 4454
(e) A binary tree is an important type of structure which occurs very often.
- It is characterized by the fact that any node can have at most two branches, i. e., there is no node with degree greater than two.
- For binary trees, we distinguish between the subtree on the left and on the right.
- A binary tree may have zero nodes.
Question 3.
(a) The following function is a part of some class. Assume ‘x’ and ‘y’ are positive integers, greater than 0. Answer the given questions along with dry run/working.
(a) The following function is a part of some class. Assume ‘x’ and ‘y’ are positive integers, greater than 0. Answer the given questions along with dry run/working.
(i) What will be returned by someFun(24, 2)? [2]
(ii) What will be returned by someFun(84, 2)? [2]
(iii) State in one line what does the function someFun() do, apart from recursion? [1]
(b) The following is a function of some class which checks if a positive integer is an Armstrong number by returning true or false. (A number is said to be Armstrong of the sum of the cubes of all its digits is equal to the original number.) The function does not use modulus (%) operator to extract digit. 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.
(ii) What will be returned by someFun(84, 2)? [2]
(iii) State in one line what does the function someFun() do, apart from recursion? [1]
(b) The following is a function of some class which checks if a positive integer is an Armstrong number by returning true or false. (A number is said to be Armstrong of the sum of the cubes of all its digits is equal to the original number.) The function does not use modulus (%) operator to extract digit. 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.
(i) What is the statement or expression at ?1? [1]
(ii) What is the statement or expression at ?2? [1]
(iii) What is the statement or expression at ?3? [1]
(iv) What is the statement or expression at ?4? [1]
(v) What is the statement or expression at ?5? [1]
Answer:
(a) (i) 2 2 2 3 24, 2
(ii) 2 2 3 7 84, 2
(iii) someFunOcalculates the L.C.M (Lowest Common Multiple).
(b) (i) 0
(ii) 0
(iii) (f * f * f);
(iv) num/10;
(v) s num
(ii) What is the statement or expression at ?2? [1]
(iii) What is the statement or expression at ?3? [1]
(iv) What is the statement or expression at ?4? [1]
(v) What is the statement or expression at ?5? [1]
Answer:
(a) (i) 2 2 2 3 24, 2
(ii) 2 2 3 7 84, 2
(iii) someFunOcalculates the L.C.M (Lowest Common Multiple).
(b) (i) 0
(ii) 0
(iii) (f * f * f);
(iv) num/10;
(v) s num
Part – II
Answer seven questions in this part, choosing three questions from Section-A, two from Section-B and two from Section-C
Popchar 8 9 =
Section – A
Answer any three questions
Answer any three questions
Question 4.
(a) Given the Boolean function F (A, B, C, D) = Π (0, 1, 2, 3, 5, 7, 8, 9, 10, 11).
(i) Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). [4]
(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
(b) Given the Boolean function:
P (A, B, C, D) = ABC’D’ + A’BC’D’ + ABC’D + ABC’D + ABCD + ABCD
(i) Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e., octal, quads and pairs). [4]
(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
Answer:
(a) (i) F (A, B, C, D) = Π (0, 1, 2, 3, 5, 7, 8, 9, 10, 11)
(a) Given the Boolean function F (A, B, C, D) = Π (0, 1, 2, 3, 5, 7, 8, 9, 10, 11).
(i) Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). [4]
(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
(b) Given the Boolean function:
P (A, B, C, D) = ABC’D’ + A’BC’D’ + ABC’D + ABC’D + ABCD + ABCD
(i) Reduce the above expression by using 4-variable Karnaugh map, showing the various groups (i.e., octal, quads and pairs). [4]
(ii) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
Answer:
(a) (i) F (A, B, C, D) = Π (0, 1, 2, 3, 5, 7, 8, 9, 10, 11)
Question 5.
A person is allowed to travel in a reserved coach of the train if he/she satisfies the criteria given below:
The person has a valid reservation ticket and a valid ID proof.
OR
The person does not have a valid reservation ticket but holds a valid pass issued by the Railway department with a valid ID proof.
OR
The person is a disabled person and holds a valid pass issued by the Railway department along with a valid ID proof.
The inputs are:
A person is allowed to travel in a reserved coach of the train if he/she satisfies the criteria given below:
The person has a valid reservation ticket and a valid ID proof.
OR
The person does not have a valid reservation ticket but holds a valid pass issued by the Railway department with a valid ID proof.
OR
The person is a disabled person and holds a valid pass issued by the Railway department along with a valid ID proof.
The inputs are:
INPUTS | |
R | The person has a valid reservation ticket. |
P | The person holds a valid pass issued by the Railway department. |
D | The person has valid ID proof. |
H | A person is a disabled person. |
(In all the above cases, 1 indicates yes and 0 indicates no).
Output: T – Denotes allowed to travel (1 indicates yes and 0 indicates no in all the cases)
(a) Draw the truth table for the inputs and outputs given above and write the POS expression for T(R, P, D, H). [5]
(b) Reduce T(R, P, D, H) using the Karnaugh map.
Draw the logic gate diagram for the reduced POS expression for T (R, P, D, H) using only NOR gates. You may use gates with two or more inputs, assume that the variable and their complements are available as inputs. [5]
Answer:
(a) Truth Table
Output: T – Denotes allowed to travel (1 indicates yes and 0 indicates no in all the cases)
(a) Draw the truth table for the inputs and outputs given above and write the POS expression for T(R, P, D, H). [5]
(b) Reduce T(R, P, D, H) using the Karnaugh map.
Draw the logic gate diagram for the reduced POS expression for T (R, P, D, H) using only NOR gates. You may use gates with two or more inputs, assume that the variable and their complements are available as inputs. [5]
Answer:
(a) Truth Table
Question 6.
(a) Draw the truth table and logic gate diagram for an Octal to Binary encoder. [4]
(b) What is Multiplexer? State an application of a Multiplexer. Also, draw the logic diagram of a 4 : 1 Multiplexer. [4]
(c) Verify the following expression using Boolean laws. Also, mention the law used at each step of simplification. [2]
X.Y.Z + X.Y’.Z + X.Y.Z = X.(Y + Z)
Answer:
(a) An encoder has 2n or fewer input lines, only one of which is in the “1” state at a particular time and an n-bit code is generated on “n” output lines depending upon which of the input is excited. In other words, an encoder is a circuit in which output lines generate the binary code corresponding to the input value.
Octal To Binary Encoder
Octal to binary encoder has 23 = 8 input lines D0 to D7 and 3 output lines Y0 to Y2. Below is the truth table for octal to the binary encoder.
From the truth table, the outputs can be expressed by following Boolean Function.
Y0 = D1 + D3 + D5 + D7
Y1 = D2 + D3 + D6 + D7
Y2 = D4 + D5 + D6 + D7
Note: Above boolean functions are formed by OR ing all the input lines for which output is 1. For instance Y0 is 1 for D1, D3, D5, D7 input lines.
The encoder can, therefore, be implemented with OR gates whose inputs are determined directly from the truth table as shown in the image below:
(b) The Multiplexer acts as a multiple-input and single-output switch.
Multiplexers switch two or more input signals to an output port. This allows multiple information streams to be sent over one transmission channel. Since the multiplexer spends some time on each input, the time is divided between the inputs.
Applications are cellphone systems, instrumentation, and any other function where only one transmission channel (e.g., a radio transmitter) is available, yet information from several sources must be sent.
(a) Draw the truth table and logic gate diagram for an Octal to Binary encoder. [4]
(b) What is Multiplexer? State an application of a Multiplexer. Also, draw the logic diagram of a 4 : 1 Multiplexer. [4]
(c) Verify the following expression using Boolean laws. Also, mention the law used at each step of simplification. [2]
X.Y.Z + X.Y’.Z + X.Y.Z = X.(Y + Z)
Answer:
(a) An encoder has 2n or fewer input lines, only one of which is in the “1” state at a particular time and an n-bit code is generated on “n” output lines depending upon which of the input is excited. In other words, an encoder is a circuit in which output lines generate the binary code corresponding to the input value.
Octal To Binary Encoder
Octal to binary encoder has 23 = 8 input lines D0 to D7 and 3 output lines Y0 to Y2. Below is the truth table for octal to the binary encoder.
From the truth table, the outputs can be expressed by following Boolean Function.
Y0 = D1 + D3 + D5 + D7
Y1 = D2 + D3 + D6 + D7
Y2 = D4 + D5 + D6 + D7
Note: Above boolean functions are formed by OR ing all the input lines for which output is 1. For instance Y0 is 1 for D1, D3, D5, D7 input lines.
The encoder can, therefore, be implemented with OR gates whose inputs are determined directly from the truth table as shown in the image below:
(b) The Multiplexer acts as a multiple-input and single-output switch.
Multiplexers switch two or more input signals to an output port. This allows multiple information streams to be sent over one transmission channel. Since the multiplexer spends some time on each input, the time is divided between the inputs.
Applications are cellphone systems, instrumentation, and any other function where only one transmission channel (e.g., a radio transmitter) is available, yet information from several sources must be sent.
Question 7.
(a) Derive a Boolean expression for the logic circuit given below and reduce the derived expression, using Boolean laws: [3]
(b) What are the universal gates? Construct a logic circuit using NAND gates only for the expression: [3]
(c) Define Half Adders. Draw the circuit diagram and the truth table for a Half Adder. [4]
Answer:
Boolean Expression for the above circuit is
A.B.C.C + A.B.C
To simplify this expression,
F = A.B.C.C + A.B.C
= A.B.C + A.B.C (∵C.C = C)
= A.B.C [∵a + a = a]
(b) NOR and NAND gates have the particular property that any one of them can create any logical Boolean expression if designed in a proper way.
(c) The half adder is an example of a simple, functional digital circuit built from two logic gates. The half adder adds to one-bit binary numbers (AB). The output is the sum of the two bits (S) and the cany (C)
(a) Derive a Boolean expression for the logic circuit given below and reduce the derived expression, using Boolean laws: [3]
(b) What are the universal gates? Construct a logic circuit using NAND gates only for the expression: [3]
(c) Define Half Adders. Draw the circuit diagram and the truth table for a Half Adder. [4]
Answer:
Boolean Expression for the above circuit is
A.B.C.C + A.B.C
To simplify this expression,
F = A.B.C.C + A.B.C
= A.B.C + A.B.C (∵C.C = C)
= A.B.C [∵a + a = a]
(b) NOR and NAND gates have the particular property that any one of them can create any logical Boolean expression if designed in a proper way.
(c) The half adder is an example of a simple, functional digital circuit built from two logic gates. The half adder adds to one-bit binary numbers (AB). The output is the sum of the two bits (S) and the cany (C)
Section – B
Answer any two questions
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.
![Popchar Popchar](https://s3-ap-northeast-1.amazonaws.com/peatix-files/pod/7359311/logo-PopChar-80.gif)
Popchar 8.9
Question 8.
A class Admission contains the admission numbers of 100 students. Some of the data members/member functions are given below: [10]
Class name: Admission
Data member/instance variable:
Adno[]: integer array to store admission numbers
Member functions/methods:
Admission(): constructor to initialize the array elements
void fill Array(): to accept the elements of the array in ascending order
int binSearch(int 1, int u, int v): to search for a particular admission number (v) using binary search and recursive technique and returns 1 if found otherwise returns -1
Specify the class Admission giving details of the constructor, void fill Array() and int binSearch(int, int, int). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
A class Admission contains the admission numbers of 100 students. Some of the data members/member functions are given below: [10]
Class name: Admission
Data member/instance variable:
Adno[]: integer array to store admission numbers
Member functions/methods:
Admission(): constructor to initialize the array elements
void fill Array(): to accept the elements of the array in ascending order
int binSearch(int 1, int u, int v): to search for a particular admission number (v) using binary search and recursive technique and returns 1 if found otherwise returns -1
Specify the class Admission giving details of the constructor, void fill Array() and int binSearch(int, int, int). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
Question 9.
A class Merger concatenates two positive integers that are greater than 0 and produces a newly merged integer. [10]
Example: If the first number is 23 and the second is 764, then the concatenated number will be 23764.
Some of the members of the class are given below:
Class name: Merger
Data members/instance variables:
n1: long integer to store the first number
n2: long integer to store the second number
mergNum: long integer to store the merged number
Member functions:
Merger(): constructor to initialize the data members
void readNum(): to accept the values of the data members n1 and n2
voidjoinNum(): to concatenate the numbers n1 and n2 and store it in
mergNum
void show(): to display the original numbers and the merged number with appropriate messages
Specify the class Merger giving the details of the constructor, void readNum(), void joinNum() and void show(). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
A class Merger concatenates two positive integers that are greater than 0 and produces a newly merged integer. [10]
Example: If the first number is 23 and the second is 764, then the concatenated number will be 23764.
Some of the members of the class are given below:
Class name: Merger
Data members/instance variables:
n1: long integer to store the first number
n2: long integer to store the second number
mergNum: long integer to store the merged number
Member functions:
Merger(): constructor to initialize the data members
void readNum(): to accept the values of the data members n1 and n2
voidjoinNum(): to concatenate the numbers n1 and n2 and store it in
mergNum
void show(): to display the original numbers and the merged number with appropriate messages
Specify the class Merger giving the details of the constructor, void readNum(), void joinNum() and void show(). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
Question 10.
A class TheString accepts a string of a maximum of 100 characters with only one blank space between the words. [10]
Some of the members of the class are as follows:
Class name: TheString
Data members/instance variables:
str: to store a string
len: integer to store the length of the string
wordCount: integer to store the number of words
cons: integer to store the number of consonants
Member functions/methods:
TheString(): default constructor to initialize the data members
TheString(String ds): parameterized constructor to assign str=ds
void countFreq(): to count the number of words and the number of consonants and store them in wordCount and cons respectively
void display(): to display the original string, along with the number of words and the number of consonants
Specify the class TheString giving the details of the constructors, void countFreq() and void display(). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
A class TheString accepts a string of a maximum of 100 characters with only one blank space between the words. [10]
Some of the members of the class are as follows:
Class name: TheString
Data members/instance variables:
str: to store a string
len: integer to store the length of the string
wordCount: integer to store the number of words
cons: integer to store the number of consonants
Member functions/methods:
TheString(): default constructor to initialize the data members
TheString(String ds): parameterized constructor to assign str=ds
void countFreq(): to count the number of words and the number of consonants and store them in wordCount and cons respectively
void display(): to display the original string, along with the number of words and the number of consonants
Specify the class TheString giving the details of the constructors, void countFreq() and void display(). Define the main() function to create an object and call the functions accordingly to enable the task.
Answer:
Section – C
Answer any two questions
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 11.
WordPile is an entity which can hold a maximum of 20 characters. The restriction is that a character can be added or removed from one end only.
Some of the members of classes are given below:
Class name: WordPile
Data members/instance variables:
ch[]: character array to hold the character elements
capacity: integer variable to store the maximum capacity
top: to point to the index of the topmost element
Member functions/methods:
WordPile (int cap): constructor to initialise the data member
capacity = cap, top = -1 and create the WordPile
void pushChar(char v): adds the character to the top of WordPile if possible, otherwise output a message “WordPile is full”
charpopChar(): returns the deleted character from the top of the WordPile if possible, otherwise it returns ‘’
(a) Specify the class WordPile giving the details of the constructor, void pushChar(char) and char popChar(). [8]
The main function and algorithm need not be written.
(b) What is the name of the entity described above and state one of its applications? [2]
Answer:
WordPile is an entity which can hold a maximum of 20 characters. The restriction is that a character can be added or removed from one end only.
Some of the members of classes are given below:
Class name: WordPile
Data members/instance variables:
ch[]: character array to hold the character elements
capacity: integer variable to store the maximum capacity
top: to point to the index of the topmost element
Member functions/methods:
WordPile (int cap): constructor to initialise the data member
capacity = cap, top = -1 and create the WordPile
void pushChar(char v): adds the character to the top of WordPile if possible, otherwise output a message “WordPile is full”
charpopChar(): returns the deleted character from the top of the WordPile if possible, otherwise it returns ‘’
(a) Specify the class WordPile giving the details of the constructor, void pushChar(char) and char popChar(). [8]
The main function and algorithm need not be written.
(b) What is the name of the entity described above and state one of its applications? [2]
Answer:
(b) The name of the entity described above is ‘Stack’. One of its applications is to reverse a string.
Question 12.
A line on a plane can be represented by coordinates of the two-end points p1 and p2 as p1(x1, y1) and p2(x2, y2).
A superclass Plane is defined to represent a line and a subclass Circle to find the length of the radius and the area of the circle by using the required data members of the superclass. [10]
Some of the members of both classes are given below:
Class name: Plane
Data members/instance variables:
x1: to store the x-coordinate of the first endpoint
y1: to store the y-coordinate of the first endpoint
Member functions/methods:
Plane (int nx, int ny): parameterized constructor to assign the data members x1 = nx and y1 = ny
void show(): to display the coordinates
Class name: Circle
Data members /instance variables:
x2: to store the x-coordinate of the second endpoint
y2: to store the y-coordinate of the second endpoint
radius: double variable to store the radius of the circle
area: double variable to store the area of the circle
Member functions/methods:
Circle(…): parameterized constructor to assign values to data members of both the classes
void findRadius(): to calculate the length of the radius using the formula:
assuming that x1, x2, y1, y2 are the coordinates of the two ends of the diameter of a circle
voidfindArea(): to find the area of a circle using the formula: πr2. The value of pie(π) is 22/7 or 3.14
void show(): to display both the coordinates along with the length of the radius and area of the circle
Specify the class Plane giving details of the constructor and void show() Using the concept of inheritance, specify the class Circle giving details of the constructor, void findRadius(), void find Area() and voidShow()
The main function and algorithm need not be written.
Answer:
A line on a plane can be represented by coordinates of the two-end points p1 and p2 as p1(x1, y1) and p2(x2, y2).
A superclass Plane is defined to represent a line and a subclass Circle to find the length of the radius and the area of the circle by using the required data members of the superclass. [10]
Some of the members of both classes are given below:
Class name: Plane
Data members/instance variables:
x1: to store the x-coordinate of the first endpoint
y1: to store the y-coordinate of the first endpoint
Member functions/methods:
Plane (int nx, int ny): parameterized constructor to assign the data members x1 = nx and y1 = ny
void show(): to display the coordinates
Class name: Circle
Data members /instance variables:
x2: to store the x-coordinate of the second endpoint
y2: to store the y-coordinate of the second endpoint
radius: double variable to store the radius of the circle
area: double variable to store the area of the circle
Member functions/methods:
Circle(…): parameterized constructor to assign values to data members of both the classes
void findRadius(): to calculate the length of the radius using the formula:
assuming that x1, x2, y1, y2 are the coordinates of the two ends of the diameter of a circle
voidfindArea(): to find the area of a circle using the formula: πr2. The value of pie(π) is 22/7 or 3.14
void show(): to display both the coordinates along with the length of the radius and area of the circle
Specify the class Plane giving details of the constructor and void show() Using the concept of inheritance, specify the class Circle giving details of the constructor, void findRadius(), void find Area() and voidShow()
The main function and algorithm need not be written.
Answer:
Question 13.
(a) A linked list is formed from the objects of the class: [4]
(a) A linked list is formed from the objects of the class: [4]
Write an Algorithm OR a Method to print the sum of nodes that contains only odd integers of an existing linked list.
The method declaration is as follows:
void NodesCount (Nodes starPtr)
(b) (i) Give the meaning of the following common expression in Big O notation: [1]
O(N)
O(N2)
(ii) List any two cases to analyse algorithm complexities. [1]
(c) Answer the following from the diagram of a Binary Tree given below:
(i) Name the leaf nodes of the right sub-tree. [1]
(ii) Write postorder traversal of the left subtree of node B including itself. [1]
(iii) State the level number of nodes R and M when the root is at level 0. [1]
(iv) Name the internal nodes of the tree. [1]
Answer:
The method declaration is as follows:
void NodesCount (Nodes starPtr)
(b) (i) Give the meaning of the following common expression in Big O notation: [1]
O(N)
O(N2)
(ii) List any two cases to analyse algorithm complexities. [1]
(c) Answer the following from the diagram of a Binary Tree given below:
(i) Name the leaf nodes of the right sub-tree. [1]
(ii) Write postorder traversal of the left subtree of node B including itself. [1]
(iii) State the level number of nodes R and M when the root is at level 0. [1]
(iv) Name the internal nodes of the tree. [1]
Answer:
(b)
(i) O(N) is a computational complexity which is Linear in nature.
O(N2) is a computational complexity which is Quadratic in nature.
(ii) Two cases to analyze algorithm complexities: Worst Case, Best Case.
(c)
(i) Nodes P and E are the leaf nodes of the right sub-tree.
(ii) R, N, M, C, B is the required post-order traversal.
(iii) 2
(iv) C, F, M, H are the internal nodes.
(i) O(N) is a computational complexity which is Linear in nature.
O(N2) is a computational complexity which is Quadratic in nature.
(ii) Two cases to analyze algorithm complexities: Worst Case, Best Case.
(c)
(i) Nodes P and E are the leaf nodes of the right sub-tree.
(ii) R, N, M, C, B is the required post-order traversal.
(iii) 2
(iv) C, F, M, H are the internal nodes.