Class - X Computer Q.P
Class - X Computer Q.P
Class - X Computer Q.P
Attempt all the questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets [ ].
Question -1
Question – 2
a. What is meant by package? Name any two packages available in Java. [2]
b. Write any two differences between Call by value and Call by Reference. [2]
c. Write the Java Expression for Z = 5𝑥 2 + 2𝑦/(𝑥 + 𝑦) [2]
d. Give the output of the following Math Functions: [2]
a. Math.ceil(5.2)
b. Math.abs(-5)
e. if int x[ ] = {4, 3, 7, 8, 9, 10};
What are the values of P and Q? [2]
i. P = x.length
ii. Q = x[2] + x[5] * x[1]
Question – 3
Question – 4
The answers in this Section should consist of Programs in either Blue J environment or any program
environment with java as the base.
Each program should be written using Variable description /Mnemonic Codes so that the logic of the program
is clearly depicted.
Question – 5 [15]
Member Methods:
criteria:
Cost Discount(Percentage)
Less than or equal to Rs. 10000 5%
More than Rs. 10000 and less than or equal to Rs.20000 10%
void display( ): to display Customer name, mobile number, amount to be paid after discount.
Write a main( ) method create an object of the class ShowRoom and call the above member methods.
Question – 6
Using Switch – case statement, write a menu – driven program to do the following: [15]
1/ 1! + 2/ 2! + 3/ 3! +………1/ n!
B
BL
BLU
BLUE
BLUEJ
Question – 7
Write a Java program to accept a number and check and display whether it is a Happy Number or not. [15]
Question – 8
Write a Java program to input 15 Integer elements in an Array and sort them in ascending order [15]
Question – 9
Write a Program(Using Scanner Class) to enter a String / Word in mixed case and display the [15]
Input: Computer
Output:
C
m
p
t
r
**********