Question: 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 {

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 output

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!