ICSE X Computer Application Sample Q_Paper1
Computer Application
Grade: X
Max. Marks : 100
Time : 2hr
This paper is divided into two Sections.
__________________________________________________________________________________
Section A 40 marks
Attempt all questions from this Section
- Why class is called as reference datatype? Explain your view with suitable example.
- What is the practical use to overload the constructor?
- Explain with the example the problem of “dangling else”. How can we overcome this?
[4+2+4]
- Explain the function of return statement.
- Define pure and impure function ?
- For initial value of a=4, b= -3, c=0, what will be the value of the x in following expressions, if they took place successively?
i. x = a+ b++ + --c +++b –c++
ii. x += ++b +++a +- -c+ a
- Distinguish between constructor and function.
[2+2+4+2]
- Mention the use of ‘static’ keyword.
- How keyword ‘throw’ and ‘throws’ are different?
- Identify and correct the error in the following lines of code:
- String s1=”hello”;
String s2=s1.reverse();
System.out.println(s2); [2+4+4]
-
- Explain the significance of java bytecode.
- Where can the following members of a class be accessed ?
(i) private (ii) protected (iii) public (iv) members with default access
- Explain the significance of ‘try’ block in exception handling? Which block must be present after that. Also mention the use of ‘finally’ block.
[2+4+4]
Section B
Attempt any four questions from this section. Each program carries 15 marks. Each program should be written using variable descriptions such that the logic of the program is clearly depicted.
- Write a program that accepts a string from console and displays the reversed string. [15]
- Write a program that implements Interest class which stores three variables principal,
rate and time Given by user and calculates the simple interest. [15]
- Write a program to print :
(i) Fibonacci series (ii) Multi Factorial (iii) CountWords of a class String [15]
- Write a program that creates a class Account that stores a variable balance. The class has methods to start account; to deposit money and to tell the current balance amount. Money is withdrawn without any check. The program should include another class Account. [15]
- Input two numbers from the user and check whether they are successive prime numbers are not. Successive prime numbers are two prime which doesn’t contain any further prime in between them.
e.g ; Numbers 11 and 19 are not successive prime since there are other prime numbers in between them, where are 11 and 13 are successive prime numbers. The program should contain a function isprime(int n) to return a prime number. May use the concept of recursion to check the same. [15]
Write a program to input digit and print it in words.
By Prof. Mahendra kanojia
0 comments:
Confused? Feel free to ask
Post a Comment