# data[].attributes.body
import java.util.Scanner;
class SphereVolume
{

public static void main(String args[])
{

Scanner scan= new Scanner(System.in);
double radius,Volume;
System.out.println("Enter the radius of sphere:");
radius =scan.nextDouble();

double volume= (4.0/3.0)*Math.PI*Math.pow(radius,3);

System.out.println("Volume is:" +volume);
}
}

# data[].attributes.body
import java.util.Scanner;
class VolumeofSphere
{
public static double sphereVolume(double radius)
{
double volume=(4.0/3.0)*Math.PI*Math.pow(radius,3);
return volume;
}

public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
double radius;
double volume;
System.out.println("Enter the radius of sphere:");
radius=scan.nextDouble();

volume=sphereVolume(radius);

System.out.println("Volume of a sphere is="+volume);
}
}

# data[].attributes.body
import java.util.Scanner;
public class Bentuk
{
public static double sphereVolume(double pai)
{
double volume=(4.0/3.0)*Math.PI*Math.pow(pai,3);
return volume;
}

public static void main(String[]args)
{
double pai, volu;
Scanner scan=new Scanner(System.in);

System.out.println("Enter the volume of sphere");

pai=scan.nextDouble();

volu=sphereVolume(pai);

System.out.println("Volume of the sphere is = " + volu);

}
}

# data[].attributes.body
import java.util.Scanner;
public class Sphere
{
public static double sphereVolume(double radius)
{
double volume=(4.0/3.0)*Math.PI*Math.pow(radius,3);
return volume;
}

public static void main(String[]args)
{
double radius, volu;
Scanner scan=new Scanner(System.in);

System.out.println("Enter the volume of sphere");

radius=scan.nextDouble();

volu=sphereVolume(radius);

System.out.println("Volume of the sphere is = " + volu);

}
}

# data[].attributes.body
import java.util.Scanner;
public class Geometry
{
public static double spherevolume(double radius)
{
double volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow(radius, 3);
System.out.println("The Volume of the Sphere is " +String.format("%.2f", volume));
return volume;
}
public static void main(String[] args)
{
double radius;
Scanner in = new Scanner(System.in);
System.out.print("Please enter a radius: ");
radius = in.nextDouble();
spherevolume(radius);

}
}

# data[].attributes.body
import java.util.Scanner;
public class SphereVolume
{
public static double sphereVolume(double radius)
{
double volume;
volume = (4.0/3.0)*Math.PI*Math.pow(radius,3);
return volume;
}

public static void main(String[] args)
{
double radius;
Scanner scan = new Scanner (System.in);

System.out.println("Insert your radius:");
radius = scan.nextDouble();

double sphereVolume;
sphereVolume = sphereVolume(radius);
System.out.println("Volume of The Sphere = " + sphereVolume);
}
}

# data[].attributes.body
import java.util.Scanner;

public class Sphere
{
public static void main (String[]args)
{
Scanner scan = new Scanner(System.in);
double radius,volume;

System.out.println ("Please insert radius value : ");
radius = scan.nextDouble();

volume = Sphere(radius);

System.out.println ("The Volume of the Sphere is : " + volume);

}

public static double Sphere (double radius)
{
double volume;
volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow(radius,3);

return (volume);
}
}

# data[].attributes.body
import java.text.DecimalFormat;
import java.util.Scanner;
public class Sphere
{
public static double sphereVolume(double radius)
{
double vol;

vol = (4.0/3.0) * Math.PI * Math.pow(radius,3);
DecimalFormat df = new DecimalFormat("#.000");

System.out.println("Volume       : " + df.format(vol));

return vol;

}

public static double sphereArea(double radius)
{
double area;

area = 4 * Math.PI * Math.pow(radius, 2);
DecimalFormat df = new DecimalFormat("#.000");

System.out.println("Surface Area : " + df.format(area));

return area;

}

public static void main(String[] args)
{
double radius;
double vol;
double area;

Scanner scan=new Scanner(System.in);
System.out.print("Please insert the radius of the sphere volume: ");
radius=scan.nextDouble();
vol=sphereVolume(radius);

System.out.print("Please insert the radius of the sphere surface area: ");
area=scan.nextDouble();
area=sphereArea(radius);
}

}

# data[].attributes.body
import java.util.Scanner;
import java.lang.Math;
public class Vol
{
public static double sphereVolume(double radius)
{
double volume;
volume = (4.0/3.0) * Math.PI * Math.pow(radius,3);
return(volume);
}
public static void main(String [] args)
{
double radius,volume;
Scanner no = new Scanner(System.in);

System.out.println("Sphere volume is calculated");

System.out.print("insert radius = ");
radius = no.nextDouble();
volume = sphereVolume(radius);

System.out.println("Volume of sphere is = " + volume);
}
}

# data[].attributes.body
import java.util.Scanner ;
public class Sphere
{
public static double sphereVolume(double radius)
{
double volume = (4.0/3.0)*Math.PI*Math.pow(radius,3);

System.out.println("Volume is : " +String.format("%.2f",volume));

return 0;
}

public static void main(String []args)
{
Scanner s = new Scanner(System.in);
System.out.println("Enter the radius of sphere: ");
double radius=s.nextDouble();
radius=sphereVolume(radius);
}
}

# data[].attributes.body
import java.util.Scanner;
import java.text.DecimalFormat;

public class Sphere
{
public static void main(String[] args)
{
System.out.println(" Calculate the Volume of Sphere ");

Scanner naimah= new Scanner(System.in);

System.out.print(" Enter the radius : " );
double radius=naimah.nextDouble();

double volume=sphereVolume(radius);
System.out.println( " The the Volume is : " + String.format("%.3f",volume));

}
public static double sphereVolume(double radius)
{
double volume = ( 4.0/3.0)*Math.PI*Math.pow(radius,3);

return volume;
}
}

# data[].attributes.body
import java.util.Scanner;
class PadletExercise
{
public static void main(String args[])
{
Scanner value = new Scanner(System.in);
System.out.println("Please the radius of sphere : ");
double radius = value.nextDouble();

double volume = (4*22*radius*radius*radius)/(3*7);
System.out.println("Volume is :" +volume);
}
}

# data[].attributes.headline
TENGKU ANIS ROSEDIANA BINTI TENGKU HASDI

# data[].attributes.subject
TENGKU ANIS ROSEDIANA BINTI TENGKU HASDI

# data[].attributes.body
import java.util.Scanner;
import java.text.DecimalFormat;

public class sphereVolume
{
public static double sphereVolume(double radius)
{

double sphereVolume = (4.0/3.0)*Math.PI*Math.pow(radius,3);
return sphereVolume;

}

public static void main(String[]args)
{
double radius,volume;
Scanner scan = new Scanner(System.in);
System.out.println("Please Enter Radius :");
radius = scan.nextDouble();

volume= sphereVolume(radius);
System.out.println("Volume of Sphere :" + String.format("%.2f" ,volume ));

}

}

# data[].attributes.body
import java.util.Scanner;
import java.text.DecimalFormat;
public class Sphere
{
public static void main(String[]args)
{
System.out.println("Total Volume of Sphere");
System.out.println("**********************");

Scanner value = new Scanner(System.in);
double radius,volume;

System.out.print("Enter radius :");
radius = value.nextDouble();

volume = sphereVolume(radius);
System.out.println("Volume of sphere :" + String.format("%f",volume));
}

public static double sphereVolume(double radius)
{

double sphereVolume = (4.0/3.0) * Math.PI * Math.pow(radius,3);

return sphereVolume;
}
}

# data[].attributes.body
import java.util.Scanner;
public class Padletketipkukukakiku
{
public static double sphereVolume(double radius)
{
double volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow( radius, 3 );
System.out.println("\n\nThe Sphere Volume is: "+String.format("%.2f",volume));
return volume;
}
public static void main(String[]args)
{
double radius;
Scanner ReadMemory=new Scanner(System.in);
System.out.print("Enter the Radius of the Sphere: ");
radius=ReadMemory.nextDouble();
sphereVolume(radius);
}
}

# data[].attributes.body
import java.util.Scanner;
public class Shape
{
public static double sphereVolume(double radius)
{
double volume;
volume = (4.0/3.0)*Math.PI*Math.pow(radius,3);
return volume;
}

public static void main(String[] args)
{
double radius;
Scanner scan = new Scanner (System.in);

System.out.println("Please enter your radius:");
radius = scan.nextDouble();

double sphereVolume;
sphereVolume = sphereVolume(radius);
System.out.println("Volume =" + sphereVolume);
}
}

# data[].attributes.body
import java.util.Scanner;
import java.text.DecimalFormat;

public class Sphere
{
public static void main (String[]args)
{
Scanner scan = new Scanner(System.in);
double radius, volume;

System.out.print("Enter the number of radius : ");
radius = scan.nextDouble();

volume = sphereVolume(radius);
System.out.print("The volume is : "+ String.format("%.2f", volume));

}

public static double sphereVolume(double radius)
{
double sphereVolume = (4.0/3.0)*Math.PI*Math.pow(radius,3);
return sphereVolume;
}
}

# data[].attributes.body
import java.util.Scanner;
import java.lang.Math;

public class sphereVolume

{
public static void main (String[]args)
{
Scanner scan= new Scanner(System.in);
double radius;
double volume;

System.out.print("Enter radius : ");
radius = scan.nextDouble();

volume = sphereVolume(radius);

System.out.print("volume is : "+volume);

}

public static double sphereVolume(double radius)
{
double volume;
volume = (4.0/3.0)*Math.PI*Math.pow(radius,3);

return volume;
}
}

# data[].attributes.body
import java.util.Scanner;
public class Sphere{
public static double spherevolume(double radius)
{
return(4.0/3.0)*Math.PI*Math.pow(radius,3);
}

public static void main(String[] args)
{
System.out.println("Formula for Sphere");
Scanner input = new Scanner (System.in);
double radius = 0.0, volume = 0.0;
System.out.println("Enter Radius :");
radius = input.nextdouble();

System.out.printf("Volume = %.3f", spherevolume(radius));
}
}

# data[].attributes.body
import java.util.Scanner;
public class Shape
{
public static double sphereVolume(double radius)
{
double volume;

volume = (4.0/3.0)*Math.PI*Math.pow(radius,3);

return volume ;
}

public static void main(String[] args)
{

double rad;

Scanner scan = new Scanner (System.in);

System.out.println("Please Insert Your Radius: ");
rad = scan.nextDouble();

double sphereVolume;
sphereVolume = sphereVolume(rad);
System.out.println("Volume = " + sphereVolume);
}
}

# data[].attributes.body
import java.util.Scanner;
public class volume
{
public static double sphereVolume(double radius)
{
double volume=(4.0/3.0)*Math.PI*Math.pow(radius,3);
return volume;
}
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
double radius,vol;
System.out.print("Enter the radius of the sphere : ");
radius=scan.nextDouble();
volume a=new volume();
vol=a.sphereVolume(radius);
System.out.print("Volume of a sphere is = "+vol);
}
}

# data[].attributes.body
import java.util.Scanner;
public class Volume
{
  public static double sphereVolume(double radius)
  {
     double volume;
     volume = (4.0/3.0) * Math.PI * Math.pow(radius, 3.0);
     System.out.print("Volume of the circle:"+volume);
     return volume;
  }
  public static void main(String[] args)
  {
    double radius;
    double vol;
    Scanner scan=new Scanner(System.in);
    System.out.print("Enter the radius of the circle:");
    radius=scan.nextDouble();
    vol=sphereVolume(radius); //this is how u call method

  }

}
 
more_vert
Pathmahn
Pathmahn
import java.util.*;
import java.lang.*;


public class VolumeCalculator2{


  public static void main(String[] args){

    Scanner scan = new Scanner(System.in);

    System.out.println("Welcome Sphere Volume Calculator");

    System.out.print("Enter the radius : ");
    double q = scan.nextDouble();

    double vol;

    vol = SphereVolume(q);

    System.out.println("Volume of Sphere : " + vol);

  }

  public static double SphereVolume(double radius){

    double volume;

    return (4.0/3.0)*Math.PI*Math.pow(radius,3);

  }
}


Selesaikan method
Selesaikan method
Write a complete Java application to prompt the user for the double radius of a sphere, and call method sphereVolume to calculate and display the volume of the sphere. 
1.Definition of method:
public static double sphereVolume( double radius )

2.Use the following statement to calculate the volume:
double volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow( radius, 3 )

- Each student need to solve the problem individually. Then copy & paste the code and output here.
- Need to understand and 

# data[].attributes.body
import java.util.Scanner;
import java.lang.Math;
public class Sphere
{
public static void main (String args[])
{
double radius,volume;
Scanner num = new Scanner(System.in);

System.out.println("\ncalculate the Volume of Sphere");
System.out.print("insert radius = ");
radius = num.nextDouble();

volume = SphereVolume(radius);

System.out.println("Volume of Sphere is = "+volume);

}
public static double SphereVolume(double radius)
{
double volume;

volume = (4.0/3.0) * Math.PI * Math.pow(radius,3);

return(volume);
}
}

# data[].attributes.body
import java.util.Scanner;
public class Volume
{
  public static double sphereVolume(double radius)
  {
     double volume;
     volume = (4.0/3.0) * Math.PI * Math.pow(radius, 3.0);
     System.out.print("Volume of the circle:"+volume);
     return volume;
  }
  public static void main(String[] args)
  {
    double radius;
    double vol;
    Scanner scan=new Scanner(System.in);
    System.out.print("Enter the radius of the circle:");
    radius=scan.nextDouble();
    vol=sphereVolume(radius); //this is how u call method

  }

}

# data[].attributes.body
import java.util.*;
import java.lang.*;


public class VolumeCalculator2{


  public static void main(String[] args){

    Scanner scan = new Scanner(System.in);

    System.out.println("Welcome Sphere Volume Calculator");

    System.out.print("Enter the radius : ");
    double q = scan.nextDouble();

    double vol;

    vol = SphereVolume(q);

    System.out.println("Volume of Sphere : " + vol);

  }

  public static double SphereVolume(double radius){

    double volume;

    return (4.0/3.0)*Math.PI*Math.pow(radius,3);

  }
}

# data[].attributes.body
Write a complete Java application to prompt the user for the double radius of a sphere, and call method sphereVolume to calculate and display the volume of the sphere.
1.Definition of method:
public static double sphereVolume( double radius )

2.Use the following statement to calculate the volume:
double volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow( radius, 3 )

- Each student need to solve the problem individually. Then copy & paste the code and output here.
- Need to understand and explain the result in the class