Can you check my Java work? The instructions are on top, and the work is below. I have questions about the mathematical equations and the squares.
Moment of Inertia of a rod with length a: ma^2 / 12.0
Moment of Inertia of a rectangular parallelepiped with sides a, b, and h with axis in the plane that is parallel to h: m(4a^2 + b^2) / 12.0
Moment of Inertia of a circular cylinder with radius a and height h perpendicular to the cylindrical axis: m(h^2 + 3a^2) / 12.0
Moment of Inertia of a hollowed circular cylinder with radii a and b, and height h about an axis on a diameter at one end: m(3a^2 + 3b^2 + 4h^2) / 12.0
Moment of Inertia of a hollowed sphere with radii a and b about its diameter: 2m(a^3 - b^3) / (a^3 - b^3) / 5.0
Moment of Inertia of a hollowed sphere with radii a and b about an axis tangent to its surface: 2m(a^5 - b^5) / (a^3 - b^3) / 5.0 + ma^2
Note: "b^2" means b to the power of 2. There is no need to use a special operation for exponentiation in the program. Remember that b^2 is equivalent to the multiplication of b by itself. Similarly, b^3 is equivalent to b multiplied 4 more times by b.
Print the results of your calculations. The output should look like the example shown below. If the output does not match, there is some problem with your code. Students should not use Arrays, multiple methods, or any other advanced concept that was not reviewed in the class to solve this assignment. Assignments that use these concepts will only be given 10% for presentation.
System.out.println();
System.out.println("Moment of Inertia of a rectangular parallelepiped with sides a, b, and h with axis in the plane that is parallel to h = " + m * (4 * (a * a) + (b * b)) / 12.0);
System.out.println();
System.out.println("Moment of Inertia of a circular cylinder with radius a and height h perpendicular to the cylindrical axis = " + m * (h * h + 3 * (a * a)) / 12.0);
System.out.println();
System.out.println("Moment of Inertia of a hollowed circular cylinder with radii a and b, and height h = " + (y + (q * q) + ((e + p) * (u + o + e + a + e + p + u + o + e + u + s + n + o + q + e)) + 3 * (b * b) + 4 * (h * h)) / 12.0);
System.out.println();
System.out.println("Moment of Inertia of a hollowed sphere with radii a and b about its diameter = " + 0.5 / ((q - e) / (s - e)) * (w / ((0.5 / (i * (q * s * 9 - e * e * e)) / ((q * e * 9 * 9 * 9 * 9 * 9 * 9) * (e * e * g * e * g * e))))));
System.out.println();
System.out.println("Moment of Inertia of a hollowed sphere with radii a and b about an axis tangent = " + (w + 0.5 / (q * e - q * q * q - e * e) / (q * q * q * q * q - e * e * e)) * (w + e + z + e + j + u + n + s + s + o + m * (a * a * a * a * a - b * b * b * b * b) / (a * a * a - b * b * b)) / 5.0 + m * (a * a));
System.out.println();