Three BlueJ programs in ISC 2013 Computer Science
practical examination are as follows: Solution of the practical paper programs are posted here.
Question number 1:
An ISBN (International Standard Book Number) is a ten
digit code which uniquely identifies a book.
The first nine digits represent the group, publisher and
title of the book and the last digit is used to check whether ISBN is correct
or not.
Each of the first none digits of the code can take a
value between 0 to 9. Sometimes it is necessary to make the last digit equal to
ten. This is done by writing the last digit of the code as X.
To verify an ISBN, calculate 10 times the first digit,
plus 9 times the second digit, plus 8 times the third digit and so on until we
add 1 time the last digit. If the final number leaves no remainder while
divided by 11, the code is a valid ISBN
For example:
0201103311=10*0+9*2+8*0+7*1+6*1+5*0+4*3+3*3+2*1+1*1=55
This is a valid ISBN
007462542X=10*0+9*0+8*7+7*4+6*6+5*2+4*5+3*4+2*2+1*10=176
Similarly 0112112425 is not a valid ISBN.
Sample input-output:
Input code: 0201530821
Output: Sum=99
Leaves no remainder – valid ISBN
Input code: 356680324
Output: Sum=invalid input
Input code: 0231428031
Output: Sum=122
Question number 2:
Write a program to declare a square matrix A[][] of order
(MXN) where ‘M’ is the number of rows and the number of columns. ‘M’ should be
greater than 2 and less than 20. Allow user to enter integers into this matrix.
Display appropriate error message for an invalid input. Perform the following
tasks.
1. Display
the input matrix
2. Create
a mirror image of the inputted matrix.
3. Display
the mirror image matrix
Sample:
Input: M=3
4 16 12
8 2 14
6 1 3
Output:
Original matrix
4 16 12
8 2 14
6 1 3
Mirror image matrix:
12 16 4
14 2 8
3 1 6
Sample 2:
Input M=22
Output: Size out of range
A palindrome is a word that may be read the same in
either direction.
Accept a sentence in upper case which is terminated by
either ‘.’,’,’, ‘?’, ‘!’. Each word in the sentence is separated by a blank
space.
Perform the following tasks:
1. Display
the count of palindromic words in the sentence
2. Display
the palindromic words in the sentence.
Example 1:
Input: MOM AND DAD ARE COMING AT NOON.
Output: MOM DAD NOON
Number of palindromic words: 3
Example 2:
Input: HOW ARE YOU?
Output: No palindromic words
For the complete solution along with variable description and algorithm: CLICK HERE
2010 To 2018 Complete 9 Years Papers With Solutions: CLICK HERE
2010 To 2018 Complete 9 Years Papers With Solutions: CLICK HERE
In the first one (that is what i did) don't u think the output for 0Y12345678 shud be invalid input and not the sum with invalid isbn message?? atleast my program showed them as invalid input...
ReplyDeleteYou are correct. This type of checking is also necessary - if any invalid character is entered and location of the character etc.
Deletesir help in giving variable description
ReplyDeleteRight now I am busy with other jobs. Please wait for 10-12 days.
DeleteThank u Sir
ReplyDeletesir please explain what is algorithm and pls tell how to write it..pls only 4 days r left for my boards
ReplyDeletePlease go through http://schooljava.blogspot.com/2012/05/few-words-about-algorithm-on-data.html
DeleteSir,day after tomorrow I have my CS paper 2.Our school teacher has not given us proper information regarding java programming.She just gave assignments containing class X programs,but when we checked out previous year papers we got confused as we are unable to solve them.Kindly give your suggestions so that we can perform well at exam.Waiting for your response....
ReplyDeleteIt's too late. Anyway you are from which school?
DeleteSir,please can you tell what kind of questions are expected to come in ISC-2014 computer science paper 2..kindly,also tell me about what type of viva questions may be asked..
ReplyDeleteAlready posted in this site.
Deletein the first program,
ReplyDeleteelse
digit=ch-48;
x=x+digit*c;
c++;
digit= ch - 48...why 48?
Ascii value of '0' to '9' is 48 to 57. So if we want to convert '0' ( character value of 0) to numeric zero (0), subtract 48 from the character value.
DeleteCan we use (int)ch instead of subtracting 48 to convert char into integer?
DeleteYou can
DeleteWelcome
DeleteSir, last minute suggestions for 2014??
ReplyDeleteDon't worry. You can expect easy programs like last year.
DeleteSir please help me with output based questions
ReplyDeleteI will post such questions very soon.
DeleteCant we make program using scanner class??
ReplyDeleteIf not specified that BufferedReader is to be used, you can use Scanner class.
Deletesir some tips for isc 2015 exam???
ReplyDeleteAlready posted: visit http://schooljava.blogspot.com/2014/07/guess-computer-application-2015.html
DeleteSir some tips for isc 2019 exam?
ReplyDeleteGiven
Delete