ICSE 2010, Computer Application, Sample Question Paper 7, Class X
http://www.icseguess.com/-------------------------------------------------------------------------------------------------------www.icseguess.com Other Educational Portals www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com Sample Paper – 2010 Class – X Subject – COMPUTER APPLICATIONS Marks: 100 Time: 2 hours This paper is divided into two Sections. Attempt all questions from Section A and any five questions from Section B. The intended marks for questions or parts of questions are given in brackets ( ). Section A Question 1 [2 marks each] (a) Why Java is considered a pure OOP language? (b) Write the syntax of a class definition. (c) Differentiate between debugging and compiling. (d) How is the principle of polymorphism implemented in Java? (e) Describe the StringTokenizer class with its methods. Question 2 [2 marks each] (a) State the difference between == operator and the equals method. (b) Write a code snippet to generate a Run time error and identify the error. (c) Define recursive function. (d) Differentiate between static and non-static members. (e) What is a token in Java? Question 3 [2 marks each] (a) Write a java statement to store the vowels of the English alphabet in a single dimensional array. (b) What will be the value of t, if t = 10 before these statements? t -= ++t + (--t) * 2; t += t--+ ++t + --t; (c) What is a default constructor? (d) Write a Java statement to access the class “Triangle” in the package “Geometry” which belongs to the package „Mathematics”. (e) Find the output of this code snippet: int list1[ ] = {1, 10, 100, 1000}; int list2[ ] = { 1, 2, 3, 4, 5}; list1[2]=200; list2[2]=33; list1 = list2; System.out.println(list2[2]); System.out.println(list1[5]); Question 4 (a) What is the output of : 15 & 4, 20 << 4 and 10 ^ 3. [3 marks] (b) If boolean x =true, y = false and z = true what will be the result of the following statements: [2 marks] (i) x || !y && z (ii) x || !(y && z) http://www.icseguess.com/-------------------------------------------------------------------------------------------------------www.icseguess.com Other Educational Portals www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com (c) Find the errors in the following program segment: [2 marks] class find { int x; int y; private void find(int a, float b) { x=a; y=b; } public static void main() { Find f = new Find(); } } (d) Find the output of code snippet given below: [3 marks] int a = 94, c = 6; double x=3, b=9; String s="Enjoy Working Hard"; if(((a+x)<105) && (++a -c*x <= 45)) {System.out.println(Math.pow(c,x));System.out.println(a*c+b);} else if((++a *12) > (x+a*6)) System.out.println((4 * c++)%6); System.out.println((char)(a + c)); System.out.println("a : " + a + " and position is " + s.lastIndexOf('o')); Section B Attempt any five questions from this section. Each question carries 12 marks. The answers in this Section should consist of the Programs in either BlueJ environment or any program environment with Java as the base. Each program should be written using Variable description/Mnemonic Codes such that the logic of the program is clearly depicted. Flowcharts and Algorithms are not required. 1. Write a program using function overloading with the function name “count” to: a. count the number of uppercase alphabets and digits in a string sent as a parameter. b. return the number of factors of a number accepted from the user. 2. Accept a sentence from the user. Find the number of words and print the smallest and the largest word. Also encode the largest word by shifting it‟s characters twice to the left. 3. Display the output as: 1 1 3 1 1 3 5 3 1 1 3 5 7 5 3 1 1 3 5 3 1 1 3 1 http://www.icseguess.com/-------------------------------------------------------------------------------------------------------www.icseguess.com Other Educational Portals www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com 1 4. Benezers is a big shopping mall of 5 floors with 6 departments each. The mall is kept open 24 X 7. Accept the total monthly sale made by each department in November 2009 and calculate a) Total sales made on each floor. b) Daily Average sales made by the shopping mall. c) The least successful department in that month. 5. Write a menu driven program to invoke the following functions: i) sortWeekDays() – print the names of the seven days of the week in a descending order of alphabets using the selection sort technique. ii) isaBuddyPair(int x, int y) – finds whether the two numbers are amicable. 6. Design a class for Employees of an organization with methods to i) accept details ii) calculate gross salary . Basic Salary DA LIC Upto 20000 20 7 <50000 30 10 Otherwise 35 12 DA(Dearness Allowance) and LIC (A deduction for the Life Insurance Corporation Premium) are calculated as percentages on the basic salary earned by the employee. A standard Provident Fund Deduction of 8.33% on the basic salary is also levied on all the employees. iii) print a well formatted Salary Slip with all the details. Paper Submitted By: Name :-Mrs. Armin Shroff Email Id : arminzs@yahoo.com Telephone No. 9846761942
Description
This content is useful for ICSE Students
Presentation Transcript
Your Facebook Friends on WizIQ