Question: task3 help Task 3 (15 pts.) The program task3.java given below is an incomplete program. The goal of the program is to Ask the user

task3 help

task3 help Task 3 (15 pts.) The program task3.java given below is

an incomplete program. The goal of the program is to Ask the

user to enter the name of an input text file 1. 2.

Create an array list containing as items the lines of the input

text file 3. Find the position of the shortest string in the

Task 3 (15 pts.) The program task3.java given below is an incomplete program. The goal of the program is to Ask the user to enter the name of an input text file 1. 2. Create an array list containing as items the lines of the input text file 3. Find the position of the shortest string in the array list, and remove that string. 4. Continue repeating step 3, until the array list is empty. Complete that program, by defining two functions. First, define a find_ minimum_length function, that satisfies the following specs: Function find minimum_length takes one argument, called A, that is an array list of strings. . The function should return the position of the shortest string in A. . If A if empty, the function should return -1. Second, define a remove_minimum_length function, that satisfies the following specs Function remove_minimum_length takes one argument, called A, that is an array list of strings. The function should remove from A the shortest string in A. . If A if empty, the function should do nothing. Hints: my solution for the second function is four lines of code, on top of my solution for the first function. My solution for function remove_ minimum_length calls function find_minimum_length. IMPORTANT: You are NOT allowed to modify in any way the main function. This is an example run of the program, using input file in4a.txt (given below) Please enter the name of the input file: in4a.txt [whale, cat, elephant,donkey, goat] minimum position1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!