Problem Two. File System ExplorerIn this problem, you will be creating a simple GUI that will let you explore the file system on your computer.Your job is to create a class called Explorer that belongs to the files package. (You can create other classes as you see fit.) When the main method of the Explorer class is run, it should bring up a resizable GUI window. The window should contain a button (or a menu option) that brings up a JFileChooser that allows the user to select a folder. Whenever a folder is selected, the window should display the following information. (Note: A folder is considered to include itself.)
- The name and size in bytes of the largest file or folder that is contained (directly or indirectly) within the selected folder.
- The total number of files and folders that are contained (directly or indirectly) within the selected folder.
- The total number of files larger than 100,000 bytes that are contained (directly or indirectly) within the selected folder.
- The name of the file or folder contained (directly or indirectly) within the selected folder that was most recently modified, along with its date and time of modification. (For displaying a date and time, you’ll find the java.util.Date class useful.)
For each of the four pieces of information identified above, you are to write a recursive method to calculate it. You are also to create JUnit test cases for the methods.) Two of the methods will need to return two values (a name/size or a name/time). The best way to do this is to create helper classes that provide a means to “glue together” the two values.
Be sure that your GUI deals gracefully with all exceptions.
Computer Science homework help