Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you create a visio flowchart for this program Program: import java.util.Scanner; public class S18_Prog7_MethodOverload_avg { public static void inputValue (int[ ] arr, Scanner scanner)

Can you create a visio flowchart for this program

image text in transcribedimage text in transcribedimage text in transcribed

Program:

import java.util.Scanner;

public class S18_Prog7_MethodOverload_avg {

public static void inputValue (int[ ] arr, Scanner scanner) { System.out.print("Enter " + arr.length + " integers: "); for(int i = 0; i

public static void inputValue (double[ ] arr, Scanner scanner) { System.out.print("Enter " + arr.length + " real numbers: "); for(int i = 0; i

public static double findAvg (int[ ] arr) { double avg = 0; for(int i = 0; i

public static double findAvg (double[ ] arr) { double avg = 0; for(int i = 0; i

public static void printResult (int[ ] arr, double avg) { System.out.print("The average of "); for(int i = 0; i

public static void printResult (double[ ] arr, double avg) { System.out.print("The average of "); for(int i = 0; i

public static void main(String[] args) { Scanner scanner = new Scanner(System.in); char choice; System.out.print("Enter a character: "); choice = scanner.next().charAt(0); if('i' != choice && 'I' != choice) if(choice == 'r' || choice == 'R') { System.out.print("Enter the number in the data set: "); int n = scanner.nextInt(); double arr[] = new double[n]; inputValue(arr, scanner); double avg = findAvg(arr); printResult(arr, avg); } else { System.out.println(choice + " is not the valid character."); } else { System.out.print("Enter the number in the data set: "); int n = scanner.nextInt(); int arr[] = new int[n]; inputValue(arr, scanner); double avg = findAvg(arr); printResult(arr, avg); } }

}

O o * X O NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help 1 T : : Qe teren - Q- Search (Ctrl+1) : Start Page X S S18_Prog7_Methodoverload_avg.java X Source History E - - 9 5 2494 B E import java.util.Scanner; o a 4 = Navigator N m public class s18_Prog7_MethodOverload_avg { G Fles & * in ko F OP S 1 public static void inputValue (int[] arr, Scanner scanner) { System.out.print("Enter" + arr.length + " integers: "); for (int i = 0; i if ('' !- choice &&'1' !- choice) > if ('' !- choice & '1'!- choice) if (choice -- 'r' ll choice -- 'R') avg S S18_Prog7_Methodoverload_avg> B output e INS O Type here to search . O e C 64:29 3:16 PM 3/22/2018 A ~ 4 * O o * X O NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help 1 T : : Qe teren - Q- Search (Ctrl+1) : Start Page X S S18_Prog7_Methodoverload_avg.java X Source History E - - 9 5 2494 B E import java.util.Scanner; o a 4 = Navigator N m public class s18_Prog7_MethodOverload_avg { G Fles & * in ko F OP S 1 public static void inputValue (int[] arr, Scanner scanner) { System.out.print("Enter" + arr.length + " integers: "); for (int i = 0; i if ('' !- choice &&'1' !- choice) > if ('' !- choice & '1'!- choice) if (choice -- 'r' ll choice -- 'R') avg S S18_Prog7_Methodoverload_avg> B output e INS O Type here to search . O e C 64:29 3:16 PM 3/22/2018 A ~ 4 *

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

What effect does a stock split have on retained earnings? Explain.

Answered: 1 week ago

Question

3. List ways to manage relationship dynamics

Answered: 1 week ago