ISC 2024 Computer Science Practical Question
ISC 2024 Computer Science Practical Question
Question 1
Write a program in JAVA to accept day number (between 1 and 366) and year (yyyy) from the
user and display the corresponding date. Also accept ‘N’ from the user where (1<=N<=100) to
compute and display the future date ‘N’ days after the given date. Display error message if the
value of the day number or ‘N’ are not within the limit. Day number is calculated taking 1st
January of the given year as 1.
Test your program with given set of data and some random data
Example 1
INPUT: DAY NUMBER: 50
YEAR: 2023
N: 25
OUTPUT: ENTERED DATE: FEBRUARY 19, 2023
25 DAYS LATER: MARCH 16, 2023
Example 2
INPUT: DAY NUMBER: 321
YEAR: 2023
N: 77
OUTPUT: ENTERED DATE: NOVEMBER 17, 2023
77 DAYS LATER: FEBRUARY 2, 2024
Example 3
INPUT: DAY NUMBER: 400
YEAR: 2023
N: 125
OUTPUT: INCORRECT DAY NUMBER
INCORRECT VALUE OF ‘N’
Question 2
Write a program to accept a sentence which may be terminated by either ‘.’ , ‘?’ or ‘!’ only. The
words may be separated by a single blank spaces and are in UPPER CASE.
Perform the following tasks:
(a) Count number of vowels and consonants present in each word
(b) Generate the output of the frequency in form of a bar graph, where V denotes vowels and C
consonants as shown below:
Test your program for the following data and some random data:
Example 1
HOW V
CC
ARE VV
C
YOU VV
C
Example 2
GOOD VV
CC
DAY V
CC
Example 3
Test your program for the following data and some random data:
Example 1
INPUT: M=3
N=4
ENTER ELEMENTS: 8, 7, 9, 3,-2, 0, 4, 5, 1, 3, 6, -4
OUTPUT: ORIGINALMATRIX
8 7 9 3
-2 0 4 5
1 3 6 -4
ROTATED MATRIX ( 2700 ANTI CLOCK WISE )
1 -2 8
3 0 7
6 4 9
-4 5 3
SUM OF THE ODD ELEMENTS = 28
Example 2
INPUT: M=3
N=2
ENTER ELEMENTS: 9, 13, 41, 5, 6, -5
OUTPUT: ORIGINALMATRIX
9 13 41
5 6 -5
ROTATED MATRIX ( 2700 ANTI CLOCK WISE )
5 9
6 13
-5 41
SUM OF THE ODD ELEMENTS = 63
Example 3
INPUT: M=2
N = 10
OUTPUT: INVALID INPUT