I am lost on this code, I have been trying to get this assignment done and I need help, could someone fix my code please??
"Write a Java application to do the following:
a. Allow a user to specify the number of integers to be input into an array.
b. Read a data set of the specified number of integers into the array.
c. Determine the sum of the integers in the array.
d. Next … loop through the items in the array and find the largest integer in the array (negative integers should be accommodated).
e. Next … loop through the items in the array and determine how many times the largest integer is in the array.
The output of a application run should include the sum of the integers in the array, the largest integer in the array, the number of times the largest integer is in the array."
import java.util.Scanner;
public class bigcount
{
public static void main(String args[])
{
int w = 0;
int f = 0;
int count = 0;
int sum = 0;
int large = 0;
int dataset[] = new int[ datasetSize ];
int datasetSize = input.nextInt();
dataset[i] = input.nextInt();
for (int i=0 ; i<dataset.length; ++i) {
}
Scanner input = new Scanner(System.in);
System.out.print("Welcome to the Big Count Program. \nHow many integer in the dataset: ");
w = input.nextInt();
if (w > 0){
for( count=0; count<w ;count ++)
{
if (count==0){
System.out.println("Enter the integer in the dataset, one per line");
f= input.nextInt();
large = f;
sum=f;
}
else{
System.out.println("");
f=input.nextInt();
sum += f;
if(f>large )
count++;
if(w<large )
large=w;
}
System.out.print("The sum of the integers in the dataset is " +sum);
System.out.println();
System.out.print("The largest integer in the dataset is " +large);
System.out.println();
System.out.print("It appeared in the dataset" +count+ "time(s)");
System.out.println("Press any key to continue . . .");
}
}}}
also, what file type should I save it as?