public class CubeVolumeCalculator { public static void main(String[] args) { // Check if the correct number of arguments are provided if (args.length != 3) { System.out.println("Usage: java CubeVolumeCalculator "); return; } try { // Parse the command-line arguments to double values double height = Double.parseDouble(args[0]); double width = Double.parseDouble(args[1]); double length = Double.parseDouble(args[2]); // Calculate the volume of the cube double volume = height * width * length; // Print the result System.out.println("The volume of the cube is: " + volume); } catch (NumberFormatException e) { System.out.println("Error: All arguments must be valid double values."); } } }