Trending ▼   ResFinder  

ICSE Class X Prelims 2021 : Computer Applications (Kimmins High School, Panchgani)

3 pages, 25 questions, 20 questions with responses, 20 total responses,    3    0
Hitesh Dave
  
+Fave Message
 Home > dhl163 >   F Also featured on: School Page icse and 1 more

Formatting page ...

Class : X Date- 30 /11/ 2020 Kimmins High School, Panchgani. Sub: Computer Applications MOCK EXAMINATION Time: 2 Hrs. Marks: 100 Attempt all questions of Section A and any 4 questions of Section B. Section A (40 Marks) Q.1 ] a) What is meant by dynamic initialization? Give an example. [10] b) Name the keyword: (i) is used to provide a block of code that is always performed regardless of whether an exception is signaled or not. (ii) means anyone can call this method. c) Differentiate between keywords and identifiers. d) Differentiate between equals( ) and compareTo( ) . e) Differentiate between default and parameterized constructor . Q.2 ] a) Write a code to check whether a number is odd or even using switch case. b) Write the java expression for: ( x ) b + x b c) State the output of the following: Given int a = 10, b=20; System.out.println( + a + b); System.out.println( a + b); d) (i) What is the return value of hasNext( ) function? [10] (ii) Name the default delimiter used to separate tokens in a scanner object. e) Arrange the following data types in descending order of their size: int, char, boolean and double . Q.3] a) Differentiate between base type and subscript type of an array. [2] b) Rewrite the following using if else switch( b ) { case 8: case 12: H = 4; break; case 11: case 77: H = 7; break; default: H = 1; } c) State the output : int y[ ] = {2, 4, 5, 8}; [2] for( int j= 0; j<y.length; j++) { int p= y[ j ] +y[3 j ]; System.out.println( p ); } [2] d) State the output of : [2] System.out.println( Computer . substring( HELLO .lastIndexOf( L ))); e) Consider the following class : [3] class Myclass { public static int a= 4, b =5; public int x=2, y=3; } (i) Name the variables for which each object of the class will have its own distinct copy. (ii) Name the variables that are common to all objects of the class. (iii) Name the keyword that differentiates between these two variables. f) Write a function prototype for a function Result that has one long variable (y) and one character variable (ch) as parameters and returns true or false. [2] g) State the output of : [3] (i) System.out.println( Kimmins .charAt(4)); (ii) System.out.println( 123456 .indexOf( 3 )); (iii) System.out.println( SCIENCE .substring(5,6)+ COMPUTER .substring(3,5)); h) Given: Sample test = new Sample(20.5, Pen ); [2] (1) What is the name of the object being created? (2) Name the type of constructor being invoked. i) Predict the output: int a[ ] [ ] = {{1, 2}, {3, 4}}; for( i= 1; i>= 0; i - - ) { for( j = 0; j<=1; j++) { System.out.print( a[i] [j] ); } System.out.println( ); } [2] Section B (60 Marks) 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 such that the logic of the program is clearly depicted. Q.4] WAP to accept a number and display the new number after removing all zeros. e.g. input: 5400207 output: 5427 [15] Q.5] Write a menu driven program to perform the following tasks as per the choice by the user. [15] (1) To print the sum of the series: a a2 + a 3 a4 + . . . . . to n terms (2) To print the first 15 terms of the Pell series. Pell series is such a series which starts from 1 and 2, and subsequent numbers are the sum of twice the previous number and the number previous to the previous number. Pell series: 1, 2, 5, 12, 29, 70, 169, . . . . . . Q.6] Write a program to overload the function count( ) as follows. [15] a) count(String s) to count and display number of uppercase alphabets and digits present in the string. b) count(int n) to count and display the number of factors of the number n. Q.7] WAP to accept two words and check whether they are Anagram or not. Anagram: A word that is made with the combination of the letters present in the original word. e.g. A word is FLOW and the other word is WOLF which is formed with the combination of the letters present in the original word. Thus, FLOW and WOLF are Anagrams. [15] Q.8] Write a program in java to perform binary search on the list of numbers given below (that are arranged in ascending order), to search for an element input by user, if it is found display the element along with its position, otherwise display the message Search element not found . 5.2, 7.3, 9.4, 11.5, 15.7, 20.4, 30.9, 45.1, 89.2, 97.5 [15] Q.9] Create a class stock as given : [15] Data members/ variables: bname (String type data for book name) qty (integer as quantity of book) price (double data as unit price of book) total (double data as total cost) discount (double data as discount) netPrice (double data to find net price) Member functions : (i) stock (String n, int q, double p) A constructor to assign n to bname, q to qty, p to price. (ii) void calculation ( ) to calculate total cost and discount as 20 % on total cost if quantity of book is more than 30 otherwise no discount. Find the net price excluding discount. (iii) void printAmount ( ) - to display product name, price, quantity, total cost, discount, net price to be paid. Write a main program to input name of the product, unit price of product and quantity and by using above class and functions print details of the product. A * * * All the best * * * A

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Shreyas

(20)

ResPaper Admins

(1)

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

dhl163 chat