Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Unfortunately I don\'t have the book, but I do have theassignment. Assignment: 1

ID: 3617377 • Letter: U

Question

Unfortunately I don't have the book, but I do have theassignment. Assignment: 1. Write a program that reads a text file and stores theintegers in an array. Your instructor will provide this textfile 2. Write a method that removes all zeroes from the array,leaving the order of the other elements unchanged. All localvariables within this function must be scalar. In otherworlds, you may not use a second array to solve the problem. Instructions: 1. Print out the list both before and after removing thezeros. 2. Your program must use proper modular design andparameter passing. I'm at a loss. I can enter integers into an array LISTwith ease, but I have no idea how to do it with a regulararray. I have somewhat of an idea on the 2nd part, but Ican't really concentrate on that very well with #1 still in theback of my mind. Unfortunately I don't have the book, but I do have theassignment. Assignment: 1. Write a program that reads a text file and stores theintegers in an array. Your instructor will provide this textfile 2. Write a method that removes all zeroes from the array,leaving the order of the other elements unchanged. All localvariables within this function must be scalar. In otherworlds, you may not use a second array to solve the problem. Instructions: 1. Print out the list both before and after removing thezeros. 2. Your program must use proper modular design andparameter passing. I'm at a loss. I can enter integers into an array LISTwith ease, but I have no idea how to do it with a regulararray. I have somewhat of an idea on the 2nd part, but Ican't really concentrate on that very well with #1 still in theback of my mind.

Explanation / Answer

please rate - thanks import java.util.*; import java.io.*; public class untitled {public static void main(String[] args)throwsFileNotFoundException {int count=0,i; int[]number =new int[30]; Scanner input=new Scanner(new File("numbers.txt")); while(input.hasNextInt())     {     number[count++] =input.nextInt();     }    System.out.println("Original Array:"); for(i=0;i