Solving ICSE Class 10 Computer Applications Previous Year Question Papers ICSE Class 10 Computer Applications Question Paper 2019 is the best way to boost your preparation for the board exams.

ICSE Class 10 Computer Applications Question Paper 2019 Solved

Maximum Marks: 100
Time allowed: 2 hours

General Instructions:

  • 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.
  • The intended marks for questions or parts of questions are given in brackets [].

(Section – A (40 Marks))
(Attempt All Questions)

Question 1.
(a) Name any two basic principles of Object-oriented Programming. [2]
Answer:
Abstraction and encapsulation are the basic principles of Object-oriented Programming.

(b) Write a difference between unary and binary operator. [2]
Answer:

Unary Operators Binary Operators
(i) The operators which act upon a single operand are called unary operators. (i) The operators which require two operands for their action are called binary operators.
(ii) They are pre-increment and post increment (++) (ii) They are mathematical operators and relational operators.

(c) Name the keyword which : [2]
(i) indicates that a method has no return type.
(ii) makes the variable as a class variable.
Answer:
(i) void
(ii) static

ICSE 2019 Computer Applications Question Paper Solved for Class 10

(d) Write the memory capacity (storage size) of short and float data type in bytes. [2]
Answer:
(i) short: 2 bytes
(ii) float: 4 bytes

(e) Identify and name the following tokens : [2]
(i) public
(ii) ‘a’
(iii) ==
(iv) { }
Answer:
(i) keyword
(ii) literal
(iii) operator
(iv) separator

Question 2.
(a) Differentiate between if else if and switch-case statements. [2]
Answer:

if else if Switch-case
(i) It evaluates integer, character, pointer or floating-point type or boolean type. (i) It evaluates only character or integer value.
(ii) Which statement will be executed depend upon the output of the expression inside if statement. (ii) Which statement will be executed is decided by user.

(b) Give the output of the following code : [2]
String P = “20”, Q = “19”,
int a = Integer.parselnt(P);
int b = Integer.valueOf(Q);
System.out.println(a+” “+b);
Answer:
2019

(c) What are the various types of errors in Java ? [2]
Answer:
Syntax error, Runtime error, Logical error

(d) State the data type and value of res after the following is executed: [2]
char ch = ‘9’;
res= Character.isDigit(ch);
Answer:
boolean True

ICSE 2019 Computer Applications Question Paper Solved for Class 10

(e) What is the difference between the linear search and the binary search technique? [2]
Answer:

Linear Search Binary Search
(i) Linear search works both for sorted and unsorted data. (i) Binary search works on sorted data (either in ascending order or in descending order).
(ii) Linear search begins at the start of an array i.e. at 0lh position. (ii) This technique divides the array in two halves, and the desired data item is searched in the halves.

Question 3.
(a) Write a Java expression for the following: [2]
|x2 + 2xy|
Answer:
Math.abs((x * x) + (2 * x * y);

(b) Write the return data type of the following functions: [2]
(i) startsWith()
(ii) random()
Answer:
(i) boolean
(ii) double

(c) If the value of basic = 1500, what will be the value of tax after the following statement is executed? [2]
tax = basic>1200 ? 200:100;
Answer:
200

(d) Give the output of following code and mention how many times the loop will execute ? [2]
int i;
for(i = 5; i >= 1; i)
{
if (i%2 ==1)
continue;
System.out.print(i+ ” “);
}
Answer:
4 2
Loop will execute 5 times.

(e) State a difference between call by value and call by reference. [2]
Answer:

Call by Value Call by Reference ;
(i) In call by value the meth­od creates its new set of variables (formal param­eters) to copy the value of actual parameters and works with them. (i) In call by reference, reference of the actual parameters is passed on to the method. No new set of variables is creat­ed.
(ii) Any change made in the formal parameter is not reflected in the actual pa­rameter. (ii) Any change made in the formal parameter is always reflected in the actual parameters.
(iii) Primitive data types are passed by call by value. (iii) Reference types like (objects, array etc.) are passed by call by refer­ence.

(f) Give the output of the following: [2]
Math.sqrt(Math.max(9, 16))
Answer:
4.0

(g) Write the output for the following: [2]
Strings1 = “phoenix”; Strings2 = “island”;
System.out.println (s1.substring(0).concat (s2.substring(2) ));
System, out.println (s2. to UpperCase());
Answer:
phoenix land
ISLAND

(h) Evaluate the following expression if the value of x = 2, y = 3 and z = 1. [2]
v = x + – – z + y + + + y
Answer:
= 2 + 0 + 3 + 4
= 9

ICSE 2019 Computer Applications Question Paper Solved for Class 10

(i) String x[] = {“Artificial intelligence”, “IOT”; “Machine learning”, “Big data”}; [2]
Give the output of the following statements:
(i) System.out.println(x[3]);
(ii) System. out.println(x. length);
Answer:
(i) Big data
(ii) 4

(j) What is meant by a package? Give an example. [2]
Answer:
A package is an organized collection of classes which is included in the program as per the requirement of the program. For example java.io package is included for input and output operations in a program.

Section – B (60 Marks)

General Instructions:

  • Attempt any four questions from this Section
  • The answers in this Section should consist of the Programs in either Blue J environment or any program
  • environment with Java as the base.
  • Each program should be written using Variable descriptions/Mnemonic Codes so that the logic of the program is clearly depicted.
  • Flow-Charts and Algorithms are not required.

Question 4.
Design a class name ShowRoom with the following description : [15]
Instance variables/ Data members :
String name – To store the name of the customer
long mobno – To store the mobile number of the customer
double cost – To store the cost of the items purchased
double dis – To store the discount amount
double amount – To store the amount to be paid after discount

Member methods:
ShowRoom() – default constructor to initialize data members
void input() – To input customer name, mobile number, cost
void calculate() -To calculate discount on the cost of purchased items, based on following criteria

Cost Discount (in percentage)
Less than or equal to ₹ 10000 5%
More than ₹ 10000 and less than or equal to ₹ 20000 10%
More than ₹ 20000 and less than or equal to ₹ 35000 15%
More than ₹ 35000 20%

void display() – To display customer name, mobile number, amount to be paid after discount
Write a main method to create an object of the class and call the above member methods.
Answer:

import javaio.*; 
import java.util.*;
class ShowRoom { 
String name; 
long mobno; 
double cost; 
double dis; 
double amount; 
ShowRoom() { 
name = " ";
mobno = 0; 
cost = 0; 
dis = 0; 
amount 0; 
} 
void input() { 
Scanner sc = new Scanner(System.in); 
System.out.println("EnterName:"); 
name = sc.nextLine(); 
System.out.println("Enter Mobile number:"); 
mobno = sc.nextLong(); 
System.out.println("Enter cost:"); 
cost = sc.nextDouble(); 
} 
void calculate() { 
if (cost <= 10000){ 
dis = cost*5/100; 
amount = cost - dis; 
} 
else 
if (cost > 10000 && cost <= 20000) { 
dis = cost* 10/100; 
amount = cost - dis; 
} 
else 
if (cost > 20000 && cost <= 35000) { 
dis = cost* 15/100; 
amount = cost - dis; 
} 
else 
if (cost > 35000) { 
dis = cost*20/100; 
amount = cost - dis;
} 
} 
void display() { 
System. out.println("Name::" +name); 
System.out.println("Mobile No.::" +mobno); 
System.out.println(" Amount::" +amount); 
} 
public static void main(String args[]) { 
ShowRoom ob = new ShowRoom(); 
ob.input(); 
ob.calculate(); 
ob.display(); } 
}

ICSE 2019 Computer Applications Question Paper Solved for Class 10

Question 5.
Using the switch-case statement, write a menu driven program to do the following : [15]
(a) To generate and print Letters from A to Z and their Unicode
ICSE 2019 Computer Applications Question Paper Solved for Class 10 1
(b) Display the following pattern using iteration (looping) statement:
ICSE 2019 Computer Applications Question Paper Solved for Class 10 2
Answer:

import java.io.*;
import java.util.*;
class SwitchCase {
public static void main(String args[]) {
Scanner sc = new Scanner (System, in);
System.out.println(" 1. Enter 1 for Unicode:");
System.out.println(" 2. Enter 2 for Pattern:");
System.out.println("Enter your choice:");
int choice = sc.nextlnt();
switch(choice){
case 1:
char ch;
System.out.println("Letters \t Unicode");
for (ch = ’A’; ch <= 'Z'; ch++) {
System.out.println(ch +"\t" + (int)ch);
}
break;
case 2:
int i, j;
for (i = 1.; i <= 5; i++) {
for(j = 1; j <= i; j++)
{
System.out.print(j + " ");
}
System.out.println();
}
break;
default:
System.out.println("Wrong choice entered:");
}
}
}

Question 6.
Write a program to input IS integer elements in an array and sort them in ascending order using the bubble sort technique. [15]
Answer:

import java.io.*;
import java.util.*;
class AscendingOrder {
public static void main(String args[]) {
int i, j, temp;
Scanner sc = new Scanner(System. in);
int arr[] = new int[15];
System.out.println("Enter 15 integers:");
for (i = 0; i <= 15; i++) {
arr[i] = sc.nextlnt();
for(i = 0; i < 14; i++){
for(j = 0; j < 14 - i; j++){ if[arr[j] > arr[j + 1]){
temp = arr[j];
arr[j] = arr [j + 1];
arr[j + 1] = temp;
}
}
}
System.out.printIn("Elements in ascending order are::");
for (i = 0; i < 15; i++) {
System.out.println(arr[i]);
}
}
}
}

ICSE 2019 Computer Applications Question Paper Solved for Class 10

Question 7.
Design a class to overload aJunction series() as follows: [15]
(a) void series (int x, int n) – To display the sum of the series given below:
x1 + x2 + x3 + ……………………… xn terms
(b) void series (int p)-To display the following series:
0, 7, 26, 63 …………………… p terms.
(c) void series () – To display the sum of the series given below:
\(\frac{1}{2}+\frac{1}{3}+\frac{1}{4} \ldots \ldots \cdots \cdots \cdots \cdots \frac{1}{10}\)
Answer:

import java.io.*;
import java.util.*;
class OverloadSeries {
void series( int x, int n) {
int i;
double a;
double sum = 0;
for (i = 1; i <= n; i++) {
a = Math.pow(x, i);
sum = sum + a;
}
System.out.println("Sum::" +sum);
}
void series(int p) {
int i;
for (i = 1; i <= p; i++) {
System.out.println((i * i * i) - 1 + " ");
}
}
void series() {
double i;
double s = 0;
for (i = 2; i <= 10; i++) {
s = s + 1/i;
}
System.out.println("Sum:" +s);
}
}

Question 8.
Write a program to input a sentence and convert it into uppercase and count and display the total number of words starting with a letter ‘A’. [15]
Example:
Sample Output: Total number of words starting with letter ‘A’ = 4.
Answer:

import java.io.*;
import java.util.*;
class UpperCount {
public static void main(String args[]) {
int i, a;
Scanner sc = new Scanner(System. in);
String str, strl, str2;
System.out.println("Enter sentence::");
str = sc.nextLine();
str1 = str.toUpperCase();
str2 = " " + str1;
a = 0;
for (i = 0; i <= str2.1ength(); i++) {
if(str2.charAt(i) =='')
if(str2.charAt(i + 1) = 'A');
a++;
}
System.out.println("Total number of words starting with letter 'A'::" +a);
}
}

ICSE 2019 Computer Applications Question Paper Solved for Class 10

Question 9.
A tech number has even number ofdigits. If the number is split in two equal halves, then the square ofsum of these halves is equal to the number itself. Write a program to generate and print all four diet tech numbers. [15]

Example:
Consider the number 3025
Square of sum of the halves of 3025
= (30 + 25)2
= (55)2
= 3025 is a tech number.

Answer:

import java.io.*;
import java.util.*;
class TechNumber {
public static void main(String args[]) {
int i, a, b, sum;
String n;
System.out.println("Four Digits Tech Numbers are::");
for(i = 1000; i < 1000; i++) {
n = i + "";
a = lnteger.parselnt(n.substring(0,2));
b = Integer.parselnt(n. substring(2));
sum = (int)Math.pow((a + b), 2);
if (sum == i)
System.out.println(i);
}
}
}