Question
JAVA 1) - Write the following program with NetBeans IDE, compile/run and verify is it correct? 2) - Move the sub program compute average (line
JAVA
1) - Write the following program with NetBeans IDE, compile/run and verify is it correct?
2) - Move the sub program compute average (line 8 to 21) to a method name it setAverage(int Ntest) and call it from main program of class projPart1, compile/run and verify. Submit your work.
( I cannot seem to get the METHOD to read into the program) PLEASE HELP?
import java.util.Scanner;
public class Project1
{ public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.print("Enter number of test :"); int Ntest = keyboard.nextInt(), score = 0 , i, sum = 0; setAverage=(Ntest); }
static void setAverage(int Nest) { avg = sum/i; double avg = 0; for (i = 0; i
} }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started