Trending ▼   ResFinder  

ICSE Class X Pre Board Exam 2024 :

4 pages, 0 questions, 0 questions with responses, 0 total responses,    0    0
Pankaj Gupta
  
+Fave Message
 Home > pankz21 >

Formatting page ...

PREBOARD EXAMINATION ST ANTHONY S CONVENT SCHOOL JAIGAON CLASS-X FM 100 SUBJECT- COMPUTER APPLICATION TIME-2hr SECTION A (40 marks) (attempt all the questions) Choose the correct answers: (i)Which object-oriented principle is violated when a subclass inherits from multiple super classes? (a) Inheritance (b) Encapsulation (c) Polymorphism (d) Abstraction (ii) The operator ? : is also known as: (a) logical operator (b) arithmetic operator (c) relational operator(d) conditional operator (iii) Which method of the Scanner class is used to accept a boolean value? (a) nextInt() (b) nextBoolean() (c) next() d) nextInteger() (iv) Which of the following statements is true? (a)Binary search is less efficient than linear search. (b)Binary search is more efficient than linear search. (c)Binary search is as efficient as linear search. (d)None of the above (v) Identify the type of error in the following Java statement: int number = "five"; (a) Syntax error (b) Runtime error (c) Logical error (d) No error I(vi) What is the purpose of the Math.ceil() function in Java? (a) Rounds up to the nearest integer (b) Rounds down to the nearest integer (c) Returns the square root (d) Returns the absolute value (vii) When primitive data type is converted to a corresponding object of its class, it is called: (a) Boxing b) Unboxing (c) explicit type conversion (d) implicit type conversion (viii) The number of bytes occupied by a float array of 20 elements. (a) 20 bytes (b) 60 bytes (c) 40 bytes (d) 80 bytes (ix) In Java, the expression 5 / 2 results in: (a) 2.5 (b) 2 (c) 2.0 (d) 3 (x) String str = "Programming"; System.out.println(str.substring(3, 7)); What will be the output? (a) ogra (b) gram (c) ammi (d) amm (xi) int[][] matrix = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; System.out.println(matrix[2][1]); What will be the output? (a) 2 (b) 5 (c) 8 (d) 9 (xii) int[] arr = {10, 20, 30, 40, 50}; System.out.println(arr.length + " " + arr[2]); What will be the output? (a) 5 30 (b) 4 30 (c) 5 20 (d) 4 20 (xiii) How do you declare an array in Java? (a) array myArray = new array(); (b) int[] myArray = new int[]; (c) int myArray[] = new int[5]; (d) Array myArray = Array.create(5); (xiv) What is the result of the logical expression true && false? (a) true (b) false (c) null (d) error (xv) Assertion (A): The Math.pow(a, b) method returns the square of a raised to the power of b. Reason (R): It is a convenient method for performing exponentiation in Java. (a) Both Assertion (A) and Reason (R) are true. (b) Both Assertion (A) and Reason (R) are false. (c) Assertion (A) is true, and Reason (R) is false. (d) Assertion (A) is false, and Reason (R) is true. (xvi) Read the following text, and choose the correct answer: A class encapsulate Data Members that contains the information necessary to represent the class and Member methods that perform operations on the data member. What does a class encapsulate? (a) Information and operation (b) Data members and Member methods (c) Data members and information (d) Member methods and operation (xvii) Which of the following is a valid function name: 1. show 2. ?Show_1 3. $123show 4 .Show_& (a) Only 1. (b) 1. and 3. (c) 2. and 4. (d) 1. and 2 (xviii) Name the package that contains Character class: (a)java.lang (b) java.util (c) java .io (d) java.awt (xix) Give the output : String A= 26.0 ,B= 74.0 ; double C=Double.parseDouble(A); double D=Double.valueOf(B); System.out.println((C+D)); (a)26 (b)74 (c)100.0 (d)2674 (xx) What will be the result of the following code snippet? System.out.println(Math.random() * 10); (a) A random decimal value between 0 and 1 (b) A random integer between 0 and 10 (c) A random decimal value between 0 and 10 (d) 10 Question 2. (i) Write the output of the following String methods: (a) "COMPUTER".charAt(1) (b) "PEACE ".indexOf( E ,2) [2] (ii)Explain the significance of the static keyword in java. How does it affect variables ad methods in a class? [2] (iii)What is the value of the expression if s= selection test ; s.substring(10).indexOf( s )!=s.indexOf( s ); (iv)Differentiate between break and return statement?[2] (v)Write a java expression for: = ( + + ) (vi)Consider the following class : public class Computer { public static int x=4,y=9; public int a=3,b=5; } (a)Name the variables for which each objects of the class that will have its own distinct copies. (b) Name the variables that are common to all the objects within the class. (vii)Write a function prototype of a function called search which takes two arguments [char, String]. The function returns the index number of the character in the String. (viii)What will be the value of p after evaluating the expression: p /= p++ - --q % ++p when p=5 and q=7 (ix)Follow the below code and answer the questions: int c=5; do { System.out.println(c++); } while(++c<10); (a)how many times the following loop will get executed? (b)what is the output of the same? (x)Differentiate between formal parameter and actual parameter briefly with an example? Section B (Attempt any four) Question 3. A class Employee contains the following member: Class name : Employee Data members/Instance variables String ename : To store the name of employee int ecode : To store the employee code double basicpay : To store the basic pay of employee Member functions/Methods (i)Employee( - - - - ) : An argumented constructor to assign name, employee code and basic salary to data members/instance variables (ii)double salCalc( ) : To compute and return the total salary of an employee (iii)void display( ) : To display ename, ecode, basicpay and calculated salary The salary is calculated according to the following rules : Salary = Basic pay + HRA + DA + TA where, HRA = 20% of basic pay DA = 25% of basic pay TA = 10% of basic pay if the ecode <= 100, then a special allowance (20% of salary) will be added and the maximum amount for special allowance will be 2500. if the ecode > 100 then the special allowance will be 1000. Hence, the total salary for the employee will calculated as : Total Salary = Salary + Special Allowance Define the main() function to create an object and call the functions accordingly to enable the task. Question 4. Write a program to accept the year of graduation from school as an integer value from the user. Using the binary search technique on the sorted array of integers given below, output the message "Record exists" if the value input is located in the array. If not, output the message "Record does not exist". Write a program to check whether the matrix is a special diagonal matrix or not. A special diagonal matrix is a matrix whose sum of the values of the left and right diagonals is same. Question 5. Define a class to overload a method count() as follows: void count(long num ,int n) to find the frequency of a digit in a number num. void count(String s)- to count words present in a string Example for a diagonal matrix is given below of order 3X3 1 6 3 4 5 6 2 8 4 Sum of left diagonal-10 Sum of right diagonal-10 void count(char ca[],char c)- to find the frequency of a character c in a character array ca[] **************best of luck************* Question 6. Write a program to input a word and print the new word after removing all the repeated alphabets. Input: applications Output: aplictons Qestion 7. Write a menu driven program to do the following: (i) J IH GFE DCBA (ii) S=2! + 4! + 8! + 16! + +n! Question 8. Take a Square matrix of order 3X3

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

Additional Info : Computer application pre board
Tags : St Anthony's convent School,  

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

 

pankz21 chat