Trending ▼   ResFinder  

ICSE Class X Sample / Model Paper 2025 : Computer Science

4 pages, 23 questions, 0 questions with responses, 0 total responses,    0    0
Rakesh Sarkar
  
+Fave Message
 Home > sarkar1979 >

Formatting page ...

ICSE 2023 EXAMINATION 2nd MOCK TEST QUESTION PAPER COMPUTER APPLICATIONS 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. The intended marks for questions or parts of questions are given in brackets[]. SECTION A (Attempt all questions from this Section.) Question 1 Choose the correct answer and write the correct option. [20] i) Wrapping up of data and methods together as one unit is termed as: a) Inheritance b) Polymorphism c) Encapsulation d) Abstraction ii)A method with the same name as of the class and with arguments and no return data type is termed as constructor a) parameterized b) default c) Non - parameterized d) wrapper class method iii)The element in x[4] of the array {3, 5, 7, 12, 16, 18, 20, 35, 42, 89} is: a)16 b) 12 c) 7 d) 18 iv)Name the type of error that occurs for the following statement:System.out.println(Math.sqrt(24 25)); a)Syntax error (b) run time error (c) logical error (d) no error v) The output of the method "DETERMINATION".substring(2, 6) is: a) "TERM" b) termn c) "Term" d) "TERMI" vi)variable is visible/usable within the method that it has been declared in. (a) A class b) A local (c) A primitive (d) An object vii)For the below code, give the output. String str = "It is need of the hour"; System. Out .println ("substring "hour\ ":" + str.indexof ("hour") ) ; (a) 18 (b) 19 (c) 20 (d) 21 viii)Find the output of the following code: String x[] SAMSUNG". "NOKIA", "SONY", "MICROMAX ", BLACKBERRY"}; System.out.println (x [1]); System.out.println (x [3].length () ); (a) NOKIA (b) SONY (c) BLACKBERRYY (d) MICROMAX ix)An arithmetic expression can contain a mix of: (a) Literals(b) Variables(c) Subscripted variables(d) All of these x)What does {} signifies? (a) Scope of the instance variable (b) Scope of the class variables (c) Both (a) and (b) (d) None of these xi)Which of the following is NOT a visibility mode used in the class? (a) private (b) protected (c) public (d) static xii)What is the return type of the method 'x.endsWith(String suffix)? (a) int (b) String (c) char (d) boolean xiii) What would the following code do? int index = 0; index = text.indexof ( "a'); (a) Find first index position containing *a' (b) Find last index position containing 'a' Rakesh Sir _ MOCK TEST PART 2/4 (c) Find first index position of any character (d) Find last index position of any character xiv)Which of the following is NOT a part of the method header? (a) Access specifier (b) Method body (C) return statement (d) Either (b) or (c) xv)How many elements does the following array contains?int data[]={1,2,3,4} (a) 3 (b) 4 (c) 5 (d) 6 xvi)Which of the following is/are the correct way of declaring an array? (a) String[] difficultWords; (b) int temps[ ];(c) both (a) and (b) (d) none of these xv)In the below two lines of Java, what is the length of the array lastNames? String[] firstNames = {"Amir", "Amir", "Amir", "Amir"]; String[] lastNames = new String|firstNames.length); (a) 3 (b) 4 (c) 1 (d) None of these xvi) For the below code snippet, answer the given question. String str = new String ("ABCDEF") ; System.out.println (str.indexof ("TTT") ); What is the output of the code? (a)0 (b) 1 (c) 2 (d) -1 xvii)Write the function prototype for the function "sum" that takes an integer variable (x) as its argument and returns a value of float data type. (a) public float sum int x) (c) public double sum(int x) (b) public int sum(int x) (d) public String sum(int x) xviii)What is the significance of the keyword protected in a method declaration? (a) Means it is accessible by the package classes and any subclasses that are in other packages (b) Accessible by any other class anywhere (c) Accessible to only one class (d) None of these xix)What is the role of access specifier? (a) Used in loops (b) Used in functions (c) Used in data variables and functions to denote the usability from inside and outside of class (d) None of these xx)Find the odd one out. (a) Syntax error (b) Logical error (c) Runtime error (d) Static error Question 2 i) Evaluate the expression: z +=a++ + --b + ++a + --b; where a= 10, b = 5, z = 100 [2] ii) 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= a+b; System.out.println (z); } a)Name the global variables. b) What are the method variables? [2] iii) Consider the following array and answer the questions given below: int x [ ]= {23, 45, 67, 12, 45, 89, 24, 12, 9, 7} [2] (a) What is the size of the array? iv) (b)What is the position of 89? What is the difference between the String and Array classes? Rakesh Sir _ MOCK TEST PART 2/4 [2] ABC v) Evaluate the following Java line: vi) If int ntl = (1,2,3,5,7, 9, 13, 16), what are the values of x andy? DEF".trim () [2] [2] x = Math.pow (n [4], n[2]) Y = Math. sqrt (n [5] +n [71); vii) If the integer values stored in a=25and b=25 find the value in c? String str = value0f (a) +value0f (b) ;int c= Integer.parse Int (str); [2] viii) i)Between a constructor and a method, which is necessarily called in a Java program. ii)Name the kind of constructor called in the statement below. Caller a =new Caller (2, 3); [2] ix) What kind of statement is left blank in the below correct function definition? public int add(int a, int b) { __________ [2] } x) Assuming there are no zeroes in the array, what will the sign be of each element of the array y, after the function executes? void process (int [] x) { [2] int[] Y=new int[10]; for(int i=0;i<x.length;i++) { if(x[i]<0) { Y[i]=x[i]*x[i]*x[i]; } else { Y[i]=-2*x[i]; } } } 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 OfficeEmployee having the following description: Data members/instance variables: int AcNo: to store account number. String name: to store name. double taxIncome: to store annual taxable income. double tax: to store tax that is calculated. Member functions: input(): store the Account number, name, taxable income. calc(): calculate tax for an employee. display(): output details of an employee tabular format. Rakesh Sir _ MOCK TEST PART 2/4 [15] Write a program to compute the tax according to the given conditions and display the output as per given format. Total Annual Taxable Income Tax Rate Up to Rs. 7,00,000 No tax From 7,00,001 to 1,00,000 10% of the income exceeding Rs. 1,00,000 From 1,00,001 to 2,50,000 Rs. 5000 + 15% of the income exceeding Rs. 1,50,000 Above Rs. 2,50,000 Rs. 25,000 + 30% of the income exceeding Rs. 2,50,000. Question 4: Design a class to overload a function SumSeries() as follows: [15] (i) void SumSeries(int n, double x) with one integer argument and one double argument to find and display the sum of the series given below: s = (x/1) (x/2) + (x/3) (x/4) + (x/5) to n terms (ii) void SumSeries() To find and display the sum of the following series: s = 1 + (1 x 2) + (1 x 2 x 3) + + (1 x 2 x 3 x 4 x 20) Question 5: Write a program to accept a String and convert each letter lowercase if it is in uppercase, convert each letter uppercase if it is in lowercase and display the new string by replacing only the vowels with the character following it(only First Word). [15] Example Sample Input : Java iS ProGraming LanGuage Sample Output : jBVB Is pROgRAMING lANgUAGE Question 6: Write a menu-driven program to accept 2 numbers from the user and print the LCM and GCD of them. [15] a) LCM (Longest Common Multiple) b) GCD (Greatest Common Divisor) of two integers is calculated by continued division method. Divide the larger number by the smaller; the remainder then divides the previous divisor. The process is repeated until the remainder is zero. The divisor then results the GCD. Question 7. [15] Write a program to perform binary search on a list of integers given below, to search for an element input by the user. If it is found display the element along with its position, otherwise display the message Search element not found . 5,7,9,11,15,20,30,45,89,97 Question 8. Design a class to overload a function compare ( ) as follows: [15] (a) void compare (int, int) to compare two integer values and print the greater of the two integers. (b) void compare (char, char) to compare the numeric value of two character with higher numeric value (c) void compare (String, String) to compare the length of the two strings and print the longer of the two. Rakesh Sir _ MOCK TEST PART 2/4

Formatting page ...

Related ResPapers
ICSE Class X Sample / Model Paper 2025 : Computer Science
by sarkar1979 
ICSE Class X Sample / Model Paper 2023 : Computer Science
by chandasahu 
ICSE Class X Sample / Model Paper 2025 : Computer Science
by sarkar1979 

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 


© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

sarkar1979 chat