Trending ▼   ResFinder  

ICSE Prelims 2015 : Computer Applications (Cambrian Hall, Dehradun)

3 pages, 0 questions, 0 questions with responses, 0 total responses,    0    0
Harvinder Singh
  
+Fave Message
 Home > saroj1952 >   F Also featured on: School Page

Formatting page ...

CAMBRIAN HALL , DEHRADUN Preliminary Examination, Dec - 2015 Class : X MM: 100 Computer Applications TIME : 2 hrs ---------------------------------------------------------------------------------------------------You will not be allowed to write for the first 15 minutes. This time is to be spent in reading the question paper. The time given at the head of the paper is the time allowed for writing the answers. This question paper is divided into two sections. You are to attempt all questions from section A and any four questions from section B. The marks for questions or sub parts are given in brackets []. ------------------------------------------------------------------------------------------------------------------------------SECTION A(40 marks) (Attempt all questions from this section) Question 1. [2x5] (a) Define the term inheritance. Explain its significance giving a suitable example. (b) A Java program uses a Compiler as well as Interpreter. Explain. (c) Write the escape sequences for : newline , horizontal tab, backspace , null (d) Write java statements to declare the variables using valid types and assign them the following literals : Java Language , 345.65 , G , false (e) What do you mean by explicit type conversion? How is it performed? Give suitable example. Question 2. [2x5] (a) If y=14 then find z= ( ++y * (y++ + 5 + ++y)) (b) Find output of the following : (i) int a =18; int b=12; boolean t = (a>20 && b<15) true : false System.out.println(t); (ii) int val = 1500; char c = (val + 550 < 1700) ? Z : # ; System.out.println(c); (c) Write equivalent java expression for the following mathematical expression : Z = x4 + x+log( y) k (d) What are syntax errors and how are these different from run time errors? Explain giving examples in both the cases. (e) Explain with the help of an example , the purpose of default in a switch statement. What happens if programmer forgets to write default in switch statement? Question 3. [2x10] (a) What do you mean by nesting of loop? Give an example to support your answer. (b) What will the following functions return when executed? (i) Math.max(-17, -19) (ii) Math.ceil(87.3) (iii) Math.abs(5-8) (iv) Math.rint(7.4) (c) What are logical operators? Write any two logical operators along with their names. (d) Arrange the following datatypes in ascending order of their size : (i) Char (ii) boolean (iii) double (iv) int (e) What are the default values? Write default initial values of boolean and double. (f) Explain using the appropriate examples the difference between pure and impure functions. (g) Explain two main differences between linear search and binary search. (h) What is default constructor? Explain with example. (i) State the difference between : (1) = and == (2) a and a (j) What do the following return for : String x = Boolean ; String y = Algebra ; (i) System.out.println(x+y); (ii) System.out.println((x+y).length()); (iii) System.out.println(x.indexOf( o )); (iv) System.out.println(y.startsWith( B )); SECTION B (60 marks) (Attempt any four questions from this section) Question 4. [15] Define a class Employee having the following description : Data members /instance variables : pan : to store PAN(Personal Account Number) as a long value. name : to store name of employee income : to store annual taxable income as double value. tax : to store tax that is calculated as a double value. Member functions : Employee( ) : default constructor void input() : to input pan number, employee name and taxable income void calc() : to calculate the income tax , as per the following slab. Total Annual Taxable Rate of Tax Income Upto Rs. 1,00,000 No tax From Rs. 1,00,000 to Rs. 10% of the income exceeding Rs. 1,00,000 1,50,000 From Rs. 1,50,000 to Rs. Rs 5000 + 20% of the income exceeding 2,50,000 Rs. 1,50,000 Above Rs. 2,50,000 Rs. 25000 + 30% of the income exceeding Rs.2,50,000 void display() : to display the details of employee along with tax. Also define the main() method to create object of the class Employee and call the above functions accordingly. Question 5. [15] Write a menu driven program to input a number and compute the following on the basis of the user s choice selected from the given menu : (i) Check whether the entered number is a prime palindrome number. ( A prime palindrome number is a number which is prime as well as palindrome. Palindrome means equal to its reverse. Eg 5 , 7 , 11, 131 etc) (ii) Chech whether the entered number is an automorphic number or not.( An automorphic number is a number that is present at the end of its square. Eg 5, as 52 = 25 ) Question 6. [15] Write a program to input 25 floating point numbers in a single dimension array nums[] of type float. Sort the array in descending order using selection sorting technique. Display the sorted array. Question 7. [15] Write a program to input a sentence and also input a word from the user. Count and print the total number of times the given word occurs in the sentence. Question 8. [15] Write a java program to accept the values of a and n from the user. Compute and print the sum of following series. (i) 1234 Sum1= + + + nterms. aaaa 234 (ii) n a a a +a Sum2=a + + 2 ! 3! 4 ! n ! Question 9. [15] Design a class to overload a function demo() as follows : (a) void demo(int, int) : to compute and print the average of integers if first integer is greater than second , other wise print remainder of their division. (b) void demo(char, char) : to compute and print the sum of Unicode or ASCII values of both the characters. (c) void demo(String , String ) : to check whether the first string ends with second string or not and print appropriate response. (d) void demo(int arr1[] , int arr2[]) : To compute and print the absolute difference of lengths of both the arrays. ----------------xxxxxxxxxxxxxx---------------

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

saroj1952 chat