Trending ▼
ICSE
CBSE 10th
ISC
CBSE 12th
CTET
GATE
UGC NET
Vestibulares
ResFinder
X ICSE First Preparatory
4 pages, 0 questions, 0 questions with responses, 0 total responses
,
0
0
sarakesavan
Madras University (MU), Chennai
M.C.A Computer Applications
+Fave
Message
Profile
Timeline
Uploads
Home
>
sarakesavan
>
F
Also featured on:
School Page
Formatting page ...
LAWRENCE HIGH SCHOOL (ICSE) FIRST PREPARATORY EXAMINATION 2014-15 Subject: Computer Application Class: X Marks:100 Hrs Time: 2 Answer to this paper must be written on the paper provided separately. 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) Sate the Java concept that is implemented through: (i) a superclass and a subclass. (ii) the act of representing essential features without including background details. (b) What are the types of casting shown by the following examples? (i) double s = 15.2; int y = (int)s; (ii) int x = 12; long y = x; (c) Name any two wrapper classes. (d) Name the Java keyword that: (i) indicates that a method has no return type (ii) stores the address of the currently-calling object. (e) What is an exception? Give an example for the each type of exception. [2] [2] [2] [2] [2] Question 2 (a) Differentiate between call by value or pass by value and call by reference or pass by reference. (b) Name the type of error (syntax, runtime or logical error) in each case given below: (i) Division by a variable that contains a value of zero. (ii) Multiplication operator used when the operation should be division. (iii) Missing semicolon. (c) Difference between public and private modifiers for members of a class. (d) What is the advantage of having Unicode character set in java? (e) Write the result of: x y = x / ( y * Math.pow(x , 2 ) ) * 2 when x = 10, y = 2 [2] [3] [2] [1] [2] Question 3 (a) Write the java statements to perform the following tasks on strings: (i) Concatenate City with Address and store as string PostalAddress. (ii) Print the position of first occurrence of the letter B in string City. (iii) Print Hello Boss if a given name starts with the letter Z else if the name s last letter is a then print Good Day Boss . Make sure that the first and last letters are not spaces. (b) Write the two ways in which you can assign a text string TOGETHER to a [4] [2] string variable, say, str. (c) What is the range of indices (subscripts) that the following arrays can have? (i) char x[ ] = new char[20]; (ii) String x[ ] = { JASS , DANNY , SAM }; (d) Write the output of the following program: (i) double x[ ] = new double[5]; for (int j = 0; j < 5; j++) { x[j] = j; System.out.println(x[j]); } [2] [2] Question 4 (a) Write the output of the following program: class Abc { int value( ) { return 50; } void result( ) { int a = value( ); System.out.println( a= +a); int a + = value( ); System.out.print( , + a) ; } } (b) Read the following code and state the output if (a) ch = 1.5 (b) ch = 3.5; switch(ch) { case 1.5 : case 2.5 : case 3.5 : a = 5; case 4.5 ; a = 10 ; break; } System.out.println(a); (c) Differentiate linear searching and binary searching. (d) What is the difference between formal parameters and actual parameters? (e) What is constructor? Why is it important? SECTION B (60 Marks) Attempt any four questions. Question 5 [2] [2] [2] [2] [2] Encryptology is the process of encoding a string form in such a way that it should not be known to unauthorized person. You are to encode a program in Java by using a class to encrypt a string in such a way that each character of the given string is replaced with a character at mentioned gap(say, move). If move is positive then the characters are replaced by other characters ahead by given move. For a negative move, the characters are replaced by other characters backward. In case move is 0 then the same string produced. You must keep in your mind that the characters are wrapped around while encryption i.e., Z is followed by A and A is followed by Z considering the moves to be negative and positive respectively. e.g., ABZ can be encrypted as CDB if move = 2 ABZ can be encrypted as YZX if move = -2 ABZ can be encrypted as ABZ if move = 0 class: Encode Data members/ Instant variables: String s, str Member methods: void input( ) : To assign string st to s . Initialize String str = void perform (int move) : To perform encryption at defined move void display( ) : To display the encrypted string. Question 6 Sponge Iron Company announces an increment of their employees based on seniority basis as per the given conditions: Age Increment 56 years and above 20% of basic Above 45 and below 56 years 15% of basic Upto 45 10% of basic Write a program to find new basic by using the following class specifications: Class : Increment Data members/Intant variables : String name : Name of the employee double basic : Basic pay of the employee int age : Age of the employee Member methods: void getdata(String n, double b, int a) : To accept name, basic and age. void calculate( ) : To find increment and update basic. void display( ) : To display age and updated basic in the format given below Name xxxxxxxx Age xxxxxxxxxx Updated Basic xxxxxxxxx Question 7 Define a class Student described as below Data members/instant variables: name, age, m1, m2, m3, (marks in three subjects), maximum, average Member Methods: (i) A parameterized constructor to initialize the data members (ii) To accept the details of a student (iii) To compute the average and the maximum out of three marks (iv) To display the name, age, marks in three subjects, maximum and average. Write a main method to create an object of a class and call the above member methods. Question 8 Write a menu driven program using a method Number ( ) to perform the following tasks: 1. Accept a number from the user and check whether it is a BUZZ number or not. A Buzz number is the number which either ends with 7 is or divisible by 7. 2. Accept a number from a number from the user and check whether it is a composite number or not. A composite number has more than one factor (excluding 1 an the number itself) Question 9 Write a program (using scanner class) to generate a pattern of a token/word in the form of a triangle or in the form of an inverted triangle depending upon user s choice. Sample Input: Enter a word as a Token C LAS S Enter your choice 1 Enter your choice 2 Sample Output: C C LAS S CL C LAS C LA C LA C LAS CL C LAS S C
Formatting page ...
Formatting page ...
Formatting page ...
Print intermediate debugging step
Show debugging info
Hide debugging info
Horizontal lines at:
Guest Horizontal lines at:
AutoRM Data:
Box geometries:
Box geometries:
Text Data:
© 2010 - 2025 ResPaper.
Terms of Service
Contact Us
Advertise with us