Aquapodz1.java - import [email protected]

This preview shows page 1 - 3 out of 3 pages.

import java.util.Scanner;/*** @author devyn* @version 10/5/2020*/public class Aquapodz1 {/*** We need to go deeper!** @param args tests materials*/public static void main(String[] args) {String command;double numa1;double numa2;double numa3;double numb1;double numb2;double numb3;double numc1;double numc2;double numc3;int azuFail = 0;int bubFail = 0;int cryFail = 0;Scanner sc = new Scanner(System.in);System.out.println("Please enter a command:");command = sc.next();if (command.equals("a")) {System.out.println("Enter number 1:");numa1 = sc.nextDouble();if (numa1 < -6.0 || numa1 > 12.3) {azuFail = azuFail + 1;}System.out.println("Enter number 2:");numa2 = sc.nextDouble();if (numa2 < -6.0 || numa2 > 12.3) {azuFail = azuFail + 1;}System.out.println("Enter number 3:");numa3 = sc.nextDouble();if (numa3 < -6.0 || numa3 > 12.3) {azuFail = azuFail + 1;}} else if (command.equals("b")) {System.out.println("Enter number 1:");numb1 = sc.nextDouble();if (numb1 < -6.0 || numb1 > 12.3) {bubFail = bubFail + 1;}System.out.println("Enter number 2:");numb2 = sc.nextDouble();if (numb2 < -6.0 || numb2 > 12.3) {bubFail = bubFail + 1;}System.out.println("Enter number 3:");numb3 = sc.nextDouble();
if (numb3 < -6.0 || numb3 > 12.3) {

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture