Trending ▼   ResFinder  

ICSE Class X Prelims 2021 : Computer Applications (Father Leblond School, Darjeeling)

4 pages, 36 questions, 0 questions with responses, 0 total responses,    2    0
Koustav Chakraborty
Baba Siddhnath College Of Education, Muthra
BACHELOR OF EDUCATION COMPUTER SCIENCE AND APPLICATIONS
+Fave Message
 Home > rudra199140 >   F Also featured on: School Page icse

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

father leblond school COMPUTER APPLICATIONS (Theory) (Two hours) Answer 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 to write the answers. This Paper is divided into 2 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 the brackets [ ] SECTION A (40 Marks) Attempt all questions Question 1 (a) Name any two tokens of Java. (b) What is JVM? (c) What are Unary and Binary operators? Give an example for each. (d) Calculate the output of the following expression. Also arrange the operators of the given expression in the decreasing order of precedence. 2 10 * 3 + 100 / 11 (e) Name any two principles of OOP. (f) Illustrate your answer using example of String and character literal. (g) Name the keyword and write one example that invoke package by default. [1] [1] [2] [2] [1] [2] [1] Question 2 (a) What is the difference between local and instance variable? Write one example each. (b) State the use of new operator with an example. (c) Create a class with a variable of int,String,char data type. Create a parameterized constructor to initialize the class variable. (d) Write the output of the following: void display( ) { int p[ ] = { 1, 11, 111, 1111, 11111}; for( int i = (p.length -1); i>=0; i- -) System.out.println(p[i]); (e) (f) } Write the equivalent Java expression for (2.a.S + u2)1/2 State the difference between != and ! . X/SELECTION THIS PAPER CONSISTS OF 4 PRINTED PAGES [2] [2] [2] [2] [1] [1] TURN OVER Question 3 (a) (b) (c) (d) (e) Write the differences between parameterized and default constructor. What is subscript variable? What are its applications? Rewrite the below code using while loop statement: for(int i=5, j=1; i>0; i - -) { int sum = i*j; System.out.println(sum); sum = 0; } State the type of error in the following statements: i) for(int i=1; i<=10;i--) ii) for(i=1; i>=1; i++) Name the methods with their complete prototype for the following operations: i) converts character from lower case to upper case ii) to convert a value of lower data type to higher data type. [2] [2] [2] [2] [2] Question 4 (a) If String x = information and String y = technology , write down the output for each of the statements given below: i) System.out.println(x.substring(1,5)).replace( o , e )); ii) System.out.println(y.charAt(x.indexOf((x.charAt(4)))); (b) State the output of the following code segment: String s= Ram and Sram are good friends ; System.out.println(s.startsWith(s.substring(8,12))); System.out.println(s.replace( Ram , mar ).lastIndexOf( m )); (c) Differentiate between constructor overloading and method overloading. (d) Write two examples each for static and non static method and show the differences. (e) Find the output of the following statement: String s = 11001 ; int x = Integer.valueOf(s); double y = Double. valueOf(s); What is the value for x and y? [2] [2] [2] [2] [2] SECTION B (60 Marks) Attempt any four questions from this Section. The answers in this section should consist of the Programs in either Blue J environment or any program environment with Java as the base. Each programs should be written using Variable description / Mnemonic Codes such that the logic of the programs can be clearly depicted. Flowcharts and Algorithm are not required. X/SELECTION 2 TURN OVER Question 5 Anshul transport company charges for the parcels of its customers as per following specifications given below: [15] Class Name: Atransport Member variables: String name to store the name of the customer int w to store the weight of the parcel in kg int charge to store the charge of the parcel Member functions: void accept( ) to accept the name of the customer , weight of the parcel from the user. void calculate( )to calculate the charge as per weight of the parcel as per the following criteria Weight in Kg upto 10 Kgs Next 20Kgs Above 30 Kgs Charge in per Kg Rs 25 per Kg Rs 20 per Kg Rs 10 per Kg A surcharge of 5% is charged on bill. void print ( ) to print the name of the customer, weight of the parcel, total bill inclusive of surcharge in a tabular form in the following format: Name Weight Bill -------------------Define a class with the above mentioned specifications, create the main method, create an object and invoke the member methods. Question 6 Write a menu driven program using switch case in Java to compute the following: 1. Number is a perfect number (if the sum of its positive divisors excluding the number itself is equal to that number. eg : 28 is a perfect number the factors of 28 are 1,2,4,7,14 and 1+2+4+7+14 = 28) 2. Print the sum of following series: S= 4+9+16+25............................................................................n terms 3. Display the message , Your choice is inappropriate The choice of each of the cases must be taken from the user and execute the case accordingly. [15] Question 7 Design a class to overload a function computearea( ) that will compute the area of the following triangle as per the formula mentioned below: 1. Area of equilateral triangle , = 3 4 2 where s is the side of the triangle 2. Area of isosceles triangle, = 1 4 3. Area of scalene triangle, = where = 4 2 2 where a is the two equal sides and b is the base. sides. X/SELECTION + + 2 and a,b,c are the three [15] 3 TURN OVER Question 8 Write a Java program to accept a number from the user and check whether number is a Disarium number. A number is said to be disarium if the sum of power of its position value is equal to the number itself. Hint: 175 is a disarium number. 53 + 72 + 11 = 175. [15] Question 9 Write a program to input and store the heights of ten people. Sort and display them in a descending order using the selection sort technique. Also perform binary search technique to check whether the height of the person exists or not. [15] Question 10 Write a Java program to print the following pattern: 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 X/SELECTION [15] 4 END

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

rudra199140 chat