Page 157 - CA_Blue( J )_Class9
P. 157

B.  Fill in the blanks.
                    1.   ………………… is the output of Math.max(4.5,5).
                    2.   ………………… function is used to find the cube root of the argument.
                    3.   Return type of Math.sqrt() is ………………….
                    4.   The result of Math.pow (2,3) +Math.sqrt(4) is ………………….
                                               3
                                             2
                    5.   The Java expression of √(a +b ) is  ………………….
                    6.   The Java expression of (2abc * √(ab)) is ………………….
                    7.   The output of Math.cbrt(27) is ………………….
                    8.   The output of Math.round(2.4) is ………………….
                    9.   The output of Math.min(-3.4,-2.3) + Math.max(-3.4,-2.1) is ………………….
                    10.   The return type of Math.rint() is ………………….

                 C.  Answer the following questions.
                    1.   What is the difference between library method and user-defined method?
                    2.   Give examples of Math.max() and Math.pow().
                    3.   How many arguments are required for Math.sqrt()?
                                                        r  t
                    4.   Write the Java expression of  A = P  1 + —  .
                                                        n
                    5.   Write the difference between Math.ceil() and Math.floor ().
                    6.   Give the output of Math.sqrt(x); when x = 9.0.
                    7.  What will be the output of System.out.println(Math.floor(-0.88));?

                 D.  Assertion and Reasoning based question.
                     Assertion(A): Math.max() is used to find the maximum number between the two arguments.
                     Reason(R): The method's return type is determined by the data types of the arguments provided.
                     (a)   Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
                     (b)  Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
                     (c)   Assertion (A) is true and Reason (R) is false.
                     (d)  Assertion (A) is false and Reason (R) is true.
                                                                                     21 st   #Problem Solving & Logical Reasoning
                 E.  More unsolved programs                                       Century
                                                                                    Skills  #Interdisciplinary
                    1.   Write a Java program to find the surface area and volume of a cone.
                        Use the following formula:
                        Surface Area = (PI * radius * slant height) + (PI * radius ). Volume = PI * radius  * height/3.
                                                                    2
                                                                                      2
                    2.   Write a program to input the length of a pendulum and acceleration due to gravity and calculate the time period of
                        the pendulum. Use the following formula:
                        T = 2π√l/g
                                                                                                         2
                    3.  Write a program to input three numbers a, b and c and print the result using the formula: r =  3  a + b −  3  c .
                    4.   Write a program to input the diameter and calculate the area and circumference.
                        Area of circle: πr 2
                        Circumference of circle: 2πr
                    5.   Write a program to find the total population using the formula: p  × e (r×t) . Input Starting population (p0), percentage
                                                                            0
                        rate of population (r), time in years (t) and Euler number (e = 2.71828).











                                                                                    Mathematical Library Methods   155
   152   153   154   155   156   157   158   159   160   161   162