STD 10
STD 10
STD 10
com/
Question 2 (2x5=10)
Question 3 (2x5=10)
i. x (28,29)
ii. x (27,39)
return c;
}
Question 4 (2x5=10)
a) i. Write the Java expression for the following: y = tan (log (√13x9 ) )
ii. Evaluate the following if the value of x = 10 and y = 21,
System.out.println (Math.sqrt((Math.pow((double)(Math.abs(Math.max(Math.min(x, y),y))),4))));
c) String s1 = “MINORITY”;
String s2 = “REPORT”;
System.out.println(s1.substring(0,3).concat(s2.substring(3,5))
System.out.println(s2.substring(2));
System.out.println(s2.replace(‘p’ , ‘s’));
System.out.println(s1.charAt(s1.indexOf(‘R’) + s2.indexOf(‘R’)));
-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com
http://www.icseguess.com/
Write a program to enter a line of text from the user, extract each word and put them inside a String type
array and sort the array in alphabetical order (Lexicographically) and re-display the array elements.
Question 6 [15]
Write a program to input multiple digited numbers in a single subscripted array of size 10 in the main ( )
method. Pass the array into a function named void remove_sort( ) that will remove the zeros from each
array element and sort the array elements in ascending order using Selection Sort Technique, and re-
display the elements within the same method.
Question 7 [15]
A company has employees, who are divided into four grades depending on their Basic pay per month as
follows,
Basic(Rs./month) Grade DA HRA
If the Net salary which is the total of Basic, DA, and HRA, is above Rs.50, 000 per month then Income
Tax at the rate of 30% of the annual salary exceeding 50,000 is deducted on monthly basis. Taking name
of the employee and the Basic (monthly) pay as inputs, prepare & print a pay slip, which contains
Name, Grade, Basic monthly pay, DA, HRA, Monthly Income Tax and Net Monthly Salary, for
employee.
Question 8 [15]
Write a program in Java to accept a line of text from the user and create a new word formed out of the
first letter of each word. After creating the new word reverse it and check whether it is a Palindrome or
not.
E.g. If the user enters Mangoes Are Delivered After Midnight
Output: MADAM
Reverse: MADAM
-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com
http://www.icseguess.com/
Yes, it is a Palindrome
Question 9 [15]
A*
B *C *
D *E *F *
G *H *I *J *
K *L *M *N *O *
Question 10 [15]
Create overloaded methods named void calc_volume ( ), that has been overloaded to perform the
following functions
• Volume of Sphere
• Volume of Cylinder
• Volume of Cone
Write a menu driven program in Java to display the above 3 menus and execute the overloaded methods
and display the volume in the respective functions,
calc_volume (double) for sphere,
calc_volume (double, double) for cylinder and
calc_volume (float, float) for cone.
-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com