Question: i need help with the output. Chegg doesnt allow me to post the code itself since its too long. please please help my two inputs
i need help with the output. Chegg doesnt allow me to post the code itself since its too long. please please help




![public static void main(String[] args) throws IOException { //Showing all required variables](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51d4ad4cd4_85066f51d4a73f7b.jpg)
![final int Max Num = 20; int numAccts = 0; int[] accNum](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51d4b969b4_85166f51d4b2f765.jpg)
![= new int [Max_Num]; double[] balance = new double [Max_Num] ; boolean](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51d4c5ccbc_85166f51d4be5dd2.jpg)




my two inputs that is required


public static void main(String[] args) throws IOException { //Showing all required variables final int Max Num = 20; int numAccts = 0; int[] accNum = new int [Max_Num]; double[] balance = new double [Max_Num] ; boolean not Done = true; // Open the input file File myFile = new File("homework7ainput.txt"); //Create a Scanner object to read the input file Scanner input File = new Scanner (myFile); // Open the input file #2 File myFile1 = new File("homework7binput.txt"); //Create a Scanner object to read the input file Scanner input Filel = new Scanner (myFilel); //Create an output file object using the PrintWriter Class PrintWriter output File = new PrintWriter("homework7output.txt"); //PrintWriter outut File = new PrintWriter (System.out); menu (input File, outputFile); numAccts = readAccts(accNum, balance, numAccts, outputFile, inputFile); while (not Done) { char select; //Reading first character from each line select = inputFile1.next().charAt(0); switch (select) { //Withdrawal from account case 'W': case 'w': //closing files output File.close(); System.exit(1); public static int readAccts (int[] acctNum, double[] balance, int numAccts, PrintWriter output File, Scanner inputFile) throws IOException { int index; // Start for loop for(index = 0; index = amt) { // Update the balance balance [found) -= amt; // Display success message output File.println("\tWithdrawal Successful"); output File.println("\t Deposit was Successful."); } else { output File.println("\tERROR: Invalid amount"); } //Method to add a new account public static int newAcct (int [lacctNum, double []balance, int numAccts, Printwriter output File, Scanner input Filel) throws IOException { // Checks if current number of accounts is less than the maximum limit account if (numAccts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
