Formatting page ...
AKASH INTERNATIONAL RESIDENTIAL public SCHOOL Prasannahalli road, Devanahalli, Bangalore - 562 110 2nd PreBoard Examination for Class X - February 2016 SUBJECT: Computer Application Class: X - ICSE Duration: 2 hour Maximum Marks: 100 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. You are to answer 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 ) Answer all the Questions Question 1 [10] a) Explain implicity and explicity. [2] b) Write valid java statement for the following: 1. To print a raised to the power 5 . 2. To get positive value of -6.3 after rounding up to higher. [2] c) Convert the following to if else statement in java value = (x+100) > 500? 1000 : 500 ; [2] d) Give the output of the following and say how many times loop will get executed[2] int i = 5; do { System.out.println("Welcome\nto\n2nd\nPreboard\nExamination"); } while (i<0); e) Rewrite the following java code after correcting the errors. int S = 4, string M; if (S=3); M = You can get ice cream ; [2] Question 2 [10] a) What will be the output of the following java code if it is executed double R = 576.83; int S = (short) R; long T = S; System.out.println(S); System.out.println(T+10); [2] b) Give wrapper class to the following primitive data types 1. int 2. double 3. char 4. boolean [2] c) What is Exception ? Name two Exception Handling Blocks. [2] d) What is the use of the following keywords? 1. import 2. new [2] e) consider the following code and answer the questions that follows: class software { static int Mark1, Mark2,avg; software(int m1, int m2) { Mark1 = m1; Mark2 = m2; avg = (Mark1+Mark2)/2; } public static void main() { software S = new software (10,20); System.out.println(avg); } } 1. Name the class variables. 2. Name the object of class software. [2] Question 3 [20] a) Write java statement(s) to print Z to U . [2] b) Convert the following in to for loop [2] int i = 20; do { System.out.println(i); i +=5; } while(i<=50); c) Write java statement to the following 1. To declare array called flowers of String type subscripted variables of 5 rows and 3 columns. [2] 2. To declare array called box of integer type to have 20 elements with 4 rows. d) If double Arr[][] = {{5,10,15,20,25},{10,20,30,40,50},{40,80,120,160,200}}; What will be the value of following: 1. Arr[2][3] [2] 2. Arr[3][5] e) Write statements to show how finding the length of a character array Char[] differs from finding the length of a String object str. [2] f) What is the difference between searching and sorting? [2] g) Consider the following array and explain the logic of binary search for 82 int x [] = {2,6,23,34,54,65,76,82,88,95,97,99,102}; [4] h) Give the output of the following java code if x=8 and y = 22 initially. 1. System.out.println( x==y + (x==y)); 2. System.out.println( x !=y + (x != y)); 3. y *= ++x x++ 4. x += x++ + --y y + --x [4] SECTION B ( 60 Marks ) Answer any four questions [4 x15 = 60] Question 4: Define a class salary described below: [15] Data members: Name, Employee Number, Department, Years of Experience and Qualification. Member methods: 1. To accept details of employee 2.To increament salary by 20% if experience is more than 10 years otherwise 15%. 3. To print the details of employee with old salary and new incremented salary. Write a main method to create objects of the class and all the member methods. Question 5: Write a menu driven program to print the following as per the following choice: [15] choice 1. Pattern Triangle to print the following pattern $ $$ $$$ $$$$ $$$$$ choice 2. To print the sum of series x/2+x/4+x/6 .. upto n terms. and if wrong choice is given then print appropriate message. Question 6: A special number is a number in which the sum of factorial of each digit is equal to the number itself. Write a java program to input a number and display whether it is special number or not. Example for special Number: 145 = 1! + 4! + 5! = 1 + 24 + 120 = 145 Question 7: Write a program to accept the average marks of ten students, sort and display them in desending order using the seletion sort technique. [15] Question 8: Write a java program to take input a sentence from keyboard, change all the vowels present in the sentence to uppercase and other alphabets into lower case. [15] Question 9: Create a java program to print the number which is entered and get terminated when input is 0 using while loop and also with both of jump statements. *** [15]
|