Text: Complete the following file using JAVA for an intro to java class. After having done the hand calculation and pseudocode for a program that models inflating a spherical balloon, now implement the task in Java. Remember, first the balloon is inflated to step: grow the diameter by another inch and show the growth of the volume. Complete the following program.
Complete the following file:
Balloon.java
1 import java.util.Scanner;
2
3 public class Balloon
4
5 public static void main(String[] args)
6
7 Scanner in = new Scanner(System.in);
8 System.out.print("Diameter: ");
9 double diameter = in.nextDouble();
10
11
12
13 System.out.printf("Increase: %.2f", ...);
14 System.out.println();
15
16
17
18 System.out.printf("Increase: %.2f", ...);
19 System.out.println();
20
21
22