# ISC Practical Exam 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.)

Programs are solved in BlueJ mode.

INSTRUCTIONS
COMPUTER SCIENCE
Paper-2
(PRACTICAL)
(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 2011]
Question 1.
Write a progam to input a natural number less than 1000 and display it in words.Test your program on the sample data

INPUT:29
OUTPUT: TWENTY NINE
INPUT: 17001
OUTPUT: OUT OF RANGE
INPUT: 119
OUTPUT: ONE HUNDRED AND NINETEEN
INPUT:500
OUTPUT:FIVE HUNDRED

Question 2.
Encryption is a technique of coding messages to maintain thier secrecy.A string array of size ‘n’ where n is greater than 1 and less than 10,stores single sentences(each sentence ends ith a fullstop) in each row of the array.
Write a program to accept the size of array.Display an appropriate message if the size is not satisfying the given condition.Define a string array of the inputted size and fill it with sentences row-wise.Change the sentence of the odd rows with an encryption of two characters ahead of the original characters.Also change the sentence of the even rows by storing the sentence in the reverse order.Display the encrypted sentences as per the sample data given below:
Test your program for the sample data and some random data.
Example:
INPUT: n=4
IT IS CLOUDY.
IT MAY RAIN.
IT IS COOL.

OUTPUT:
KV KU ENQWFA.
RAIN MAY IT.
VJG YGCVJGT KU HKPG.
COOL IS IT.
Example:
INPUT: n=13
OUTYPUT: INVALID ENTRY

Question 3.
Design a program which accepts your date of birth in dd mm yyyy format.Check whether the date entered is a valid date or not.If it id valid,display “valid date”.Also compute and display the day number of the year for the date of birth.If it is invalid ,display “invalid date” and then terminate the program.
Test your program for the sample data and some random data.
Example 1:
INPUT: Enter your date of birth in dd mm yyyy format.
05
01
2010
OUTPUT : VALID DATE
5
Example 2:
INPUT: Enter your date of birth in dd mm yyyy format.
03
04
2010
OUTPUT : valid date
93
Example 3:
INPUT: Enter your date of birth in dd mm yyyy format.
34
06
2010
OUTPUT : invalid date