Write an application that prints the sum of cubes.


Write an application that prints the sum of cubes. Prompt for and read two integer values and print the sum of each value raised to the third power. 
SPECIFICATION OF PROMPTS, LABELS AND OUTPUT:Your code should use these prompts: "integer1: " and "integer2 ".The prompts should not force the user to type the required input on the next line. After all the inputs are read, the output should consist of a single line consisting of the label "the sum of the cubes of these numbers is:" followed by your calculated value. For example:
integer1: 3
integer2: 5
the sum of the cubes of these numbers is: 152
SPECIFICATION OF NAMES: Your application class should be called CubeSum

2.) 3.4: Distance Between Points
Write an application that reads the (x,y) coordinates for two points. Compute the distance between the two points using the following formula: 
Distance = the square root of
the sum of
the square of the difference of the x coordinates
and
the square of the difference of the y coordinates
SPECIFICATION OF PROMPTS, LABELS AND OUTPUT:Your code should use these prompts: "x for point1: " , "y for point1: ", "x for point2: ", and "y for point2: " .The prompts should not force the user to type the required input on the next line. After all the inputs are read, the output should consist of a single line consisting of the label "distance between points:" followed by your calculated value. For example: 
x for point1: 1
y for point1: 3
x for point2: 2
y for point2: 3
distance between points: 1.0
SPECIFICATION OF NAMES: Your application class should be called PointDistance

3.) 3.6: Triangle Area: Heron's Formula
Write an application that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's formula (below), in which s represents half of the perimeter of the triangle and a, b, and c represent the lengths of the three sides. Print the area rounded to three decimal places.
Area = the square root of: s(s-a)(s-b)(s-c) 
SPECIFICATION OF PROMPTS, LABELS AND OUTPUT: Your code should use these prompts: "side 1: " , "side 2: ", and "side 3: " . The prompts should not force the user to type the required input on the next line. After all the inputs are read, the output should consist of a single line consisting of just your calculated value with at least one digit to the left of the decimal points and up to three digits to the right with trailing zeros omitted. For example: 
side 1: 3
side 2: 4
side 3: 5
6
SPECIFICATION OF NAMES: Your application class should be called TriangleArea 



Attempt at #1
import java.util.Scanner;
public class CubeSum
{
public static void main(String[] args) 
{
int integer1, integer2;
Scanner scan = new Scanner(System.in);
System.out.print("integer1: ");
integer1 = scan.nextInt();
System.out.print("integer2: ");
integer2 = scan.nextInt();
double finalResult = Math.pow(integer1, 3) + Math.pow.(integer2, 3)
System.out.print("integer1: " + integer1);
System.out.print("integer2: " + integer2);
System.out.print("the sum of the cubes of these numbers is: " + finalResult);
}

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write an application that prints the sum of cubes.
Reference No:- TGS094852

Expected delivery within 24 Hours