(1) import java.util.Scanner public class Main public static double Volume(double radius) { return 4/3.0"Math.Pieradius*radius"radius; } public static void main(String args[]) { Scanner in = new Scanner(System.in); double radius; System.out.print("Enter radius of sphere: "); radius = in.nextDouble(); System.out.printin("Volume of sphere: "+Volume(radius)); in.close(); (2) import java.util.Scanner; public class Main public static double Volume(double side) { return side side'side; > public static void main(String args[]) { Scanner in = new Scanner(System.in); double side; System.out.print("Enter side of cube: "); side = in.nextDouble(); System.out.println("Volume of cube: *+Volume(side)); in.close(); (3) import java.util.Scanner, public class Maint public static double Volume(double Length, double Width, double Height) { return 1/3.0*Length Width Height: } public static void main(String args[]) { Scanner in = new Scanner(System.in); double Length, Width, Height; System.out.print("Enter Length: "); Length = in.nextDouble(); System.out.print("Enter Width: "); Width = in.nextDouble(); System.out.print("Enter Height: "); Height = in.nextDouble(); System.out.println("Volume of pyramid: "+Volume(Length, Width, Height)); in.close (1) import java.util.Scanner public class Main public static double Volume(double radius) { return 4/3.0"Math.Pieradius*radius"radius; } public static void main(String args[]) { Scanner in = new Scanner(System.in); double radius; System.out.print("Enter radius of sphere: "); radius = in.nextDouble(); System.out.printin("Volume of sphere: "+Volume(radius)); in.close(); (2) import java.util.Scanner; public class Main public static double Volume(double side) { return side side'side; > public static void main(String args[]) { Scanner in = new Scanner(System.in); double side; System.out.print("Enter side of cube: "); side = in.nextDouble(); System.out.println("Volume of cube: *+Volume(side)); in.close(); (3) import java.util.Scanner, public class Maint public static double Volume(double Length, double Width, double Height) { return 1/3.0*Length Width Height: } public static void main(String args[]) { Scanner in = new Scanner(System.in); double Length, Width, Height; System.out.print("Enter Length: "); Length = in.nextDouble(); System.out.print("Enter Width: "); Width = in.nextDouble(); System.out.print("Enter Height: "); Height = in.nextDouble(); System.out.println("Volume of pyramid: "+Volume(Length, Width, Height)); in.close