ISC 2010 Practical Paper

ISC 2010 Practical Paper Question

(Note: All programs codes are Tested. The logic used in those programs may or may not be understand by you. Just identify the technique used to solve the program, then apply your own concepts.)

Some programs are solved in C++ and Java / BlueJ mode. For rest of programs stay tuned.

INSTRUCTIONS
COMPUTER SCIENCE
Paper-2
(PRACTICAL)
(Reading Time : 15 minutes)
(Planning Session AND Examination Session : Three Hours)
——————– ——————- ———————- ——————— ———————– ——————– —————-
The total time to be spent on the Planning Session and the Examination Session is Three Hours. After completing the Planning Session, the candidates may begin with the Examination Session. A maximum of 90 minutes is permitted for the Planning Session. However, if candidates finish earlier, they are to be permitted to begin the Examination Session.
(Maximum Marks : 80)
———————- —————————— ————————– ————————————– ————————-
INSTRUCTIONS
As it is a practical examination the candidate is expected to do the following:
(a) Write an algorithm for the selected problem.
(b) Write a program in C++ or Java. Document your program by using mnemonic names and comments.
(c) Test run the program on the computer using the given test data and get a print out (hard copy) in the format specified in the problem along with the program listing.
Solve any one of the following problems

[YEAR 2010]
Question 1.
A bank intends to design a program to display the denomination of an input amount, upto 5 digits.The available denomination with the bank are of ripees 1000, 500, 100, 50, 20, 10, 5, 2 and 1.
Design a program to accept the amount from the user and display the break-up in descending order of denomination. (i.e. preference should be given to the highest denomination available) along with the total number of notes.[Note: Only the denomination used should be displayed]. Also print the amount in words according to the digits.

1. Example:
INPUT:
14856
OUTPUT:
ONE FOUR EIGHT FIVE SIX
DENOMINATION :
1000 * 14 = 14000
500 * 1 = 500
100 * 3 = 300
50 * 1 = 50
5 * 1=5
1*1=1
TOTAL =14856
TOTAL NUMBER OF NOTES=21

2. Example:
INPUT:
6043

OUTPUT:
SIX ZERO FOUR THREE
DENOMINATION :
1000*6=6000
20*2=40
2*1=2
1*1=1
TOTAL=6043
TOTAL NUMBER OF NOTES=10
3. Example
INPUT:
235001
OUTPUT:
INVALID AMOUNT

Question 2.
Write a program to declare a Matrix A[][] of order (m x n) where ‘m’ is the number of rows and ‘n’ is the number of columns such that both m and n must be greater then 2 and less then 20. Allow the user to input positive integers into this matrix. perform the following tasks on the matrix:
(a) Sort the elements of the outer row and columns elements in ascending order using any standard sorting technique and arrange them in array.
(b) Calculate the sum of the row and column elements.
(c) Output the original matrix, rearrange matrix and only the boundary elements of the rearrange array with their sum.
Test you program for the following data and some random data.

1. Example:
INPUT:
M = 3
N = 3
1 7 4
8 2 5
6 3 9

OUTPUT:
ORIGINAL MATRIX
1 7 4
8 2 5
6 3 9
REARRANGE MATRIX
1 3 4
9 2 5
8 7 6
BOUNDARY ELEMENTS
1 3 4
9    5
8 7 6
SUM OF THE OUTER ROW AND COLUMN ELEMENTS = 43

2. Example:
INPUT:
M = 2
N = 3
7 1 6
8 9 2

OUTPUT:
ORIGINAL MATRIX
7 1 6
8 9 2
REARRANGE MATRIX
1 2 6
9 8 7
BOUNDARY ELEMENTS
1 2 6
9 8 7
SUM OF THE OUTER ROW AND COLUMN ELEMENTS = 33

3. Example:
INPUT:
M = 4
N = 4
9    2    1    5
8   13   8    4
15  6    3   11
7   12   23  8

OUTPUT:
ORIGINAL MATRIX
9    2    1    5
8   13   8    4
15  6    3   11
7   12   23  8
REARRANGE MATRIX
1    2    4    5
23  13  8    7
15  6    3    8
12  11  9    8
BOUNDARY ELEMENTS
1    2    4    5
23              7
15              8
12  11  9    8
SUM OF THE OUTER ROW AND COLUMN ELEMENTS = 105

Question 3.
Read a single sentence which terminates with a full stop(.). The words are to be separated with a single blank space and are in lower case. Arrange the words contained in the sentence according to the length of the words in ascending order. if the words are of same length then the word occurring first in the sentence should come first. For both, input and output the sentence must be begins in upper case.
Test you program for the following data and some random data.
INPUT      : The lines are printed in reverse order.
OUTPUT   : In the are lines order printed reverse.
INPUT      : Print the sentence in ascending order.
OUTPUT   : In the print order sentence ascending.
INPUT      : I love my country.
OUTPUT   : I my love country.

Leave a Comment