Question: Please help me make a program with the following instructions: Among other things, the purpose of this assignment is to assess the student's ability to
Please help me make a program with the following instructions:
Among other things, the purpose of this assignment is to assess the student's ability to write code dealing with Java streams. The code must use streams to sort the String data in an incoming array object in descending order and return the sorted data in an object of type List.
PROGRAM SPECIFICATIONS
Make a new file named ProjRunner.java to meet the specifications given below.
YOU CANNOT modify the code in the file named Projjava given below:
File Projjava
The purpose of this assignment is to assess the student's
ability to write code dealing with Java streams. Student's
code must use streams to sort the String data in an
incoming array object in descending order and return the
sorted data in an object of type List.
Student must not modify the code in this file.
import java.util.;
class Proj
public static void mainString args
System.out.println
Student must sort the data
"using a stream.";
String data Not null";
ifargslength
Use default strings
String temp Tom"Dick","Harry";
data temp;
else
Use commandline arguments as strings
data args;
end else
Display the data
System.out.printlnInput data Arrays.asListdata;
Instantiate an object from the student's code.
Pass the data array as a parameter.
System.out.printlnExecute the student's code.
;
ProjRunner obj new ProjRunnerdata;
Execute the student's run method and display
the returned List object containing the
original data sorted into descending order.
List descendingOrder obj.run;
System.out.println
"Display List returned from student's code.";
System.out.println
Sorted in Descending Order:
descendingOrder;
end main
end class Proj
End program specifications.
Be sure to display your name in the output as shown below.
When you place both files in the same folder, compile them both, and run the file named Projjava, the program must display the text shown below on the command line screen.
The output values depend on the values of commandline arguments that are entered when the program is run. If no commandline arguments are entered, the program defaults to input values of Tom, Dick, and Harry.
The output for commandline argument values of Bill, Joe, Bob, Tim, and alice is shown below. Note: Numeric values entered as commandline arguments are strings.
Your solution for this assignment must use Java streams to sort the data.
Student must sort the data using a stream.
Input data Bill Joe, Bob, Tim, alice
Execute the student's code.
I certify that this program is my own work
and is not the work of others. I agree not
to share my solution with others.
Replace this line with your name
Display List returned from the code.
Sorted in Descending Order:
alice Tim, Joe, Bob, Bill,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
