Write a method that tests whether a file name should come before or after another. File names

Question:

Write a method that tests whether a file name should come before or after another. File names are first sorted by their extension (the string after the last period) and then by the name part (the string that remains after removing the extension). For example, before("report.doc", "notes.txt") should return true and before("report.txt","notes.txt") should return false. Provide helper methods that return the extension and name part of a file name.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: