Trending ▼   ResFinder  

ICSE Class X Prelims 2020 : Computer Applications (Cambridge Public School, Bangalore) : Kisa paper computer

4 pages, 36 questions, 1 questions with responses, 1 total responses,    3    0
Ayyub Khan
Cambridge Public School, Bangalore
+Fave Message
 Home > arshad_khan_6704 >   F Also featured on: School Page icse

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

KARNATAKA ICSE SCHOOLS ASSOCIATION PREPARATORY EXAMINATION - JANUARY 2020 CLASS : X SUBJECT: COMPUTER APPLICATIONS MAX. MARKS : 100 DURATION : 2 HOURS DATE : ___.___. 2020 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) [5x2=10] Question1 a) What is polymorphism? b) Write the number of bits allocated for char x[][] of 3rows and 2 columns. c) What are static members? d) Write the return data type of i) compareToIgnoreCase() ii) parseLong() e) Differentiate between break and System. exit(0) Question2 a) Rewrite the following using ternary operator: int n=27;String s=""; if(n>=18) s="eligible"; else s="not eligible"; b) What is meant by private visibility of a method? c) Give the difference between pure and impure function. d) What is an exception? Write one example. e) Explain autoboxing with an example. [5x2=10] Question3 a) Evaluate the following Java expression if a=4 andb=6 a+=++b%a--+a/2+a [10x2=20] b) Write valid Java statement for the following: d =|x| - c) Write the output for the following: i)System.out.println(Math.round(8.3)); ii)System.out.println(Math.ceil(Math.min(Math.PI,17.7))); d) int a[][] = {{1, 0, 0},{0, 1, 0}, {0, 0, 1},{0,1,0}}; System.out.println(a.length); System.out.println(a[1].length); 1 e) Name the function which is used i) To find sine of an angle ii) To eliminate leading and trailing spaces of a string f) What will the following code print? char str[]={'c','o','m','p','u','t','e','r'}; String a =new String(str); System.out.println(a.length()); g) String x[] = {"SAMSUNG", "NOKIA", "SONY" , "MICROMAX", "BLACKBERRY"}; Give the output of the following statements: i) System.out.println(x[1].toLowerCase()); ii) System.out.println(x[3].indexOf('M')+ x[4].indexOf('M')); h) What will be the output for the following code? for(; ;) System.out.println("GEEKS"); Options: i) Compile time error ii) Run time Exception iii) GEEKS (Infinitely) iv) GEEKS i) Give the output of the following program segment: int a[]=new int[6]; a[0]=2; a[1]=3; for(int i=2;i<6;i++) { a[i]=a[i-1]+a[i-2]; } for(int i=0;i<6;i++) System.out.println(a[i]); j) Write the Output: char ch= 'F'; int m=ch; m+=5; ch+=5; System.out.println(m+ "\t" +ch); 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 anyprogram environment with Java as the base. Each program should be written using Variable descriptions/Mnemonic Codes so that the logicof the program is clearly depicted. Flow-Charts and Algorithms are not required. 2 Question 4 Define a class ElectricBill with the following specifications: class: ElectricBill Instance Variables/ data members: String name private variable to store the name of the customer int units private variable to store the number of units consumed double bill private variable to store the amount to paid [15] Member methods: ElectricBill(..) parameterized constructor to initialize the data members. void calculate() to calculate the bill as per the following tariff : Number of units Rate per unit First 100 units Rs.2.00 Next 200 units Rs.3.00 Above 300 units Rs.5.00 A surcharge of 2.5% is charged if the number of units consumed is above 300 units. void display() To print the name of the customer, number of units consumed and bill amount. Write main() method to create an object of the class and call the above member methods. Question 5 [15] Write a program to check if the given number is a Munchausen Number or not. A Munchausen Number is a number that is equal to the sum of its digits each raised to a power equal to the digit. It is also called perfect digit-to-digit invariant (PDDI) because of its feature. Example of Munchausen numbers are 1 and 3435. Consider the number 3435 33 + 44 + 33+ 55 = 27 + 256 + 27 + 3125 = 3435 Question 6 Design a class to overload a function pattern() as follows: (a) void pattern(String s): to display the following if s="MODERN". MODERN MODER MODE MOD MO M [15] (b) void pattern(int n): to display the following if n=5. 1 12 121 1212 12121 3 Question 7 [15] Write a program to accept n alphabets and sort them in descending order using selection sort. If the user enters input in uppercase,convert it into lowercase and store in the array. Question 8 [15] Write a program to accept a sentence from the user and print all the 5-letter words that ends with a vowel. Sample input: The grass is greener where you water it Output: where Question 9 [15] Write a program to accept and store elements in an integer 2-D array a[][]of size mxn and print the elements in matrix form. Also print the productof numbers of each column. Sample input: 6 2 4 456 235 Output: Product of numbers of column1: 48 Product of numbers of column2:30 Product of numbers of column3: 120 ******************************* 4

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


ResPaper Admins

(1)

Sharon Zachariah

(1)

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

arshad_khan_6704 chat