Question: Write a Java program which uses the concept of function to write the following function a function named area to calculate the surface area of

Write a Java program which uses the concept of function to write the following function

  1. a function named area to calculate the surface area of a sphere

area = 4 x 3.14 x radius x radius

2.Write statements that assign random integers to the variable n in the following ranges: Use the random function to generate the numbers. Put the statements in a Java Program and run it.

  1. a) 1 n 51
  2. b) 1 n 900
  3. c) 0 n 391
  4. d) 1000 n 5127
  5. e) 17 n 22

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!