Formatting page ...
FIRST PRELIMINARY EXAMINATION 2017 COMPUTER APPLICATIONS Class: X Marks: 100 Time: 2 Hrs. Date: 05/12/2017 Answer 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 answers. This Paper is divided into two Sections. Attempt all question from Section A and four question from Section B. The intended marks for questions or parts of questions are given in brackets [ ]. This paper consists of 4 printed pages. SECTION A (40 MARKS) (All questions are compulsory) Question 1. a) b) What do you mean by encapsulation? [2] State the output of the following: [4] i. int x = 13 , y = 5; System.out.println(x++ + x + -- y); ii. double b = -25.6; double a = Math.rint(Math.abs(b)); System.out.println( a= +a); c) Rewrite the given statement using ternary operator. [2] if (a > b) p = a-b else if(a< b) p = b-a else p = 0; d) Explain the keyword static giving example. [2] Explain the concept of wrapper class in Java. Give names of two wrapper [2] Question 2. a) classes used in Java. b) Write Java statements for the following: i. 5a + b(x+y) 5 ii. To declare a single subscripted variable X to store 20 integers. (1) [2]
|