Formatting page ...
COMPUTER APPLICATIONS (Theory) (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 (40 Marks) Attempt all questions Question 1. (a) (b) (c) (d) (e) What is JVM? What are Unary and Binary Operators? Give examples of each. What is an Infinite loop? Write an example of it using for-loop. What will be the result of the following if n = 3.5 (i) Math.ceil(n) (ii) Math.round(n) (iii) Math.floor(n) If x = 6, y = 4 and z = 2.3, evaluate u and v after executing successively (i) and (ii): (i) u = x + y / z; (ii) v = (x++)*z + x; [2] [2] [2] [2] [2] Question 2. (a) Rewrite the following program segment using switch-case : char code; if(code == B || code == b ) System.out.println( Businessman ); if(code == F || code == f ) System.out.println( Fighter ); if(code == E || code == e ) System.out.println( Employee ); if(code == I || code == i ) System.out.println( Intelligent ); [3] (b) (c) What is exception handling? Name any one way in which Java handles exceptions. Which part of a function declaration differentiates between overloaded functions? [2] [2] This Paper consists of 5 printed pages. TSP 002 www.javaforschool.com Turn over
|