Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public static void execute(BufferedReader r, PrintWriter w) throws IOException, NumberFormatException { // TODO(student): Your code goes here. } in java please!!! Part 6. [10 marks]
public static void execute(BufferedReader r, PrintWriter w) throws IOException, NumberFormatException {
// TODO(student): Your code goes here.
}
in java please!!!
Part 6. [10 marks] Given a file where each line is a single (32-bit) integer, read in the lines of the file one at a time; for each value i=0,,v1, output all lines that are ==i mod v in reverse order from their order in the file, where v>0 is the value of the last line. For example, if the input is 101mod32mod30mod3v=3,0mod3 since v=3 we will output the lines that are 0mod3 then 1mod3 then 2mod3; within each such group we reverse the order from the input file: 39610422 For more examples, see the tests in the tests/ directory that have the form lab1-p6-X-in.txt for the input, and the matching lab1-p6-X-out.txt for the expected outputStep 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