Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Beginning with the file that you downloaded named Proj 0 9 . java, make a new file named Proj 0 9 Runner.java to meet the
Beginning with the file that you downloaded named Projjava, make a new file named ProjRunner.java to meet the specifications given below. Note that you must not modify the code in the file named Projjava. Projjava 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. The followiingg should display when the program is run: 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 student's code. Sorted in Descending Order: alice Tim, Joe, Bob, Bill,
Beginning with the file that you downloaded named Projjava, make a new file named ProjRunner.java to meet the specifications given below.
Note that you must not modify the code in the file named Projjava.
Projjava
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.
The followiingg should display when the program is run:
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 student's code.
Sorted in Descending Order: alice Tim, Joe, Bob, Bill,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started