CLASS 10 ICSE JAVA COMPUTER APPLICATIONS BOARD PAPER 2023 - 8

Maximum Marks:100

Time allowed: Two hours

Answers to this Paper must be written on the paper provided separately.

You will not be allowed to write during the first 15 minutes.

This time is to be spent in reading the question paper.

The time given at the head of this Paper is the time allowed for writing the answers.
This Paper is divided into two Sections.

Attempt all questions from Section A and any four questions from Section B.

Answers to this Paper must be written on the paper provided separately.

The intended marks for questions or parts of questions are given in brackets[] .

SECTION A

(Attempt all questions from this Section.)



Question 1

(i) Wrapping up of data and methods together as one unit is termed as:
  1. Inheritance
  2. Polymorphism
  3. Encapsulation
  4. Abstraction


View Solution  

(ii) The datatype which is specified that the method does not return a value is:
  1. Void
  2. void
  3. VOID
  4. boolean


View Solution  

(iii) The logical operator which is an unary operator:
  1. &&
  2. ||
  3. !
  4. >>


View Solution  

(iv) The Scanner class is a _______ class.
  1. Primitive
  2. Derived
  3. Wrapper
  4. super class


View Solution  

(v) Math.pow(625, 1/2) + Math.sqrt(144)
  1. 17.0
  2. 13.0
  3. 37.0
  4. 13


View Solution  

(vi) The correct if statement for the following ternary operation statement is:

System.out.println(n%2 == 0? “true”:” false”);
  1. if(n%2==0)
    return true;
    else return false;
  2. if(n%2==0)
    return “true”;
    else
    return “false”;
  3. if(n%2==0)
    System.out.printIn(“true”);
    else
    System.out.println(“false”);
  4. if(n%2==0)
    return false;
    else
    return false;


View Solution  

(vii) Multiple branching statement of java is:
  1. For
  2. while
  3. do... while
  4. switch


View Solution  

(viii) The number of bytes occupied by the constant 45 are:
  1. Four bytes
  2. two bytes
  3. Eight bytes
  4. one byte


View Solution  

(ix) do.....while loop is an
  1. entry controlled loop
  2. infinite loop
  3. exit controlled loop
  4. Finite loop


View Solution  

(x) for(k=1;k<=2;k++)
{ for(m=1;m<=4;m++)
{ System.out.println(m*2);
}
}
How many times the inner loop is executed?
  1. 4 times
  2. 8 times
  3. 2 times
  4. 16 times


View Solution  

(xi) A method with the same name as of the class and with arguments and no return data type is termed as:
  1. parameterized constructor
  2. default constructor
  3. Non -parameterized constructor
  4. wrapper class method


View Solution  

(xii) int res=’A’; What is the value of res?
  1. A
  2. 66
  3. 65
  4. 97


View Solution  

(xiii) The style of expressing single line comment is:
  1. /* comment*/
  2. * comment
  3. // comment
  4. /* comment


View Solution  

(xiv) The method to check if a character is an alphabet or not is:
  1. isLetter(char)
  2. isAlpha(char)
  3. isUppercase(char)
  4. isLowercase(char)


View Solution  

(xv) The output of Double.parseDouble(‘71.25”) +0.75 is:
  1. 72
  2. 72.0
  3. 71.0
  4. 71.75


View Solution  

(xvi) The method to convert a string to upper case is:
  1. toUpperCase(char)
  2. toUPPERCASE(String)
  3. toUpperCase(String)
  4. touppercase(String)


View Solution  

(xvii) The output of the method “DETERMINATION” substring(2, 6) is:
  1. “TERM”
  2. term
  3. “Term”
  4. “TERMI”


View Solution  

(xviii) The array int x[10] occupies:
  1. 10 bytes
  2. 40 bytes
  3. 20 bytes
  4. 80 bytes


View Solution  

(xix) The element in x[4] of the array {3, 5, 7, 12, 16, 18, 20, 35, 42, 89} is:
  1. 16
  2. 12
  3. 7
  4. 18


View Solution  

(xx) Name the type of error that occurs for the following statement:

System.out.printIn(Math.sqrt(24 - 25));
  1. Syntax error
  2. runtime error
  3. logical error
  4. no error


View Solution  

(i) Evaluate the expression:

Z+= a++ + --b+ ++a+ --b;
where a= 10,b=5, Z=10


View Solution  

(iii) Rewrite the following using ternary operators:

if(x>y)
c=‘A’;
else
c=‘a’;


View Solution  

(iv) Rewrite the following while loop using for loop:

int x = 5;
while (x <= 5)
{
x++;
}
System.out.println(x);


View Solution  

(v) How many times the following loop will gets executed? What is the output of the same?

int counter=1;
do
{
System.out.printIn(counter);
} while ( counter ++ < 5 );


View Solution  

(vi) “MISSISSIPPI”.replace(‘S’, ‘t’).toLowerCase()


View Solution  

(vii) “REDUCE” .compareTo(“REVOLT”) + “ANTARTICA” lastIndexOf(‘A’)


View Solution  

(ix) Consider the following program and answer the questions given below:
class sample
{ int a, b;
sample(int x, int y)
{ a=x,b=y;
}
void calculate()
{ int Z;
Z=atb;
System.out.println(z);
}
}

(a) Name the global variables.

(b) What are the method variables?


View Solution  

(x) Consider the following array and answer the questions given below:

int x [ ] = {23, 45, 67, 12, 45, 89, 24, 12, 9, 7}

(a) What is the size of the array?
(b) What is the position of 89?


View Solution  

SECTION B

(Answer any four questions from this Section.)

The answers in this section should consist of the programs in either BlueJ environment or any program environment with java as the base.

Each program should be written using variable description / mnemonic codes so that the logic of the program is clearly depicted.

Flowcharts and algorithms are not required.




Question 3

Define a class with the following specifications: 
Class name: employee 
Member variables: 
eno — employee number 
ename — name of the employee 
age — age of the employee 
basic — basic salary 
[Declare the variables using appropriate data types] 
Member methods: 
void accept() — accept the details using scanner class 
void calculate ()— to calculate the net salary as per the given specifications: 
net = basic + hra + da — pf 
hra = 18.5% of basic 
da = 17.45% of basic 
pf = 8.10% of basic 
if the age of the employee is above 50 he/she gets an additional allowance of Rs.5000.
void print() — to print the details as per the following format 
eno    ename     age    basic    net 
void main() — to create an object of the class and invoke the methods

View Solution  


Question 4

Define a class to overload the method print as follows: 
void print () — to print the format  
1 
2  3
4  5  6
7  8  9  10
boolean print (int n) — to check whether the number is a Dudeney number ,a number is dudeney if the cube of the sum of the digits is equal to the number itself. 
Eg : 512 = (5+1+2)3 =(8)3 = 512 
void print (int a, char ch) — if ch = s or S print the square of the number else if ch =c or C print the cube of the number.

View Solution  

Question 5

Define a class to accept 10 integers and arrange them in descending order using bubble sort. Print the original array and the sorted array. 

View Solution  

Question 6

Define a class to accept values into a double array of size 20 and print the range of the array, range is the difference between the largest and the smallest elements of the array. 

View Solution  

Question 7

Define a class to accept a string and print the same in reverse, also print the number of vowels in the string.
Eg :S =“BEAUTIFUL”     
Output — “LUFITUAEB”
No. of vowels = 5 

View Solution  

Question 8

Define a class to accept the names of 10 students in an array and check for the existence of the given name in the array using linear search, if found print the position of the name, if not found print the appropriate message. Also print the names which begins with the word “SRI”. 

View Solution  

Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com