Question
The purpose of this project is to gain an understanding of using recursion to solve problems, using Java. Using the ZIP file in the projects
The purpose of this project is to gain an understanding of using recursion to solve problems, using Java.
Using the ZIP file in the projects 3 folder on D2L, create the folders, sub-folders and files by unzipping the ZIP file. Then write a recursive Java program to print out each directory and its contents. The output should look something like this:
Folder1 (folder)
Folder1.1 (folder)
Folder1.2 (folder)
File1.1.txt (file)
File1.2.txt (file)
Folder2 (folder)
File2.1.txt (file)
Folder2.1 (folder)
Folder2.1.1 (folder)
File2.1.1.txt (file)
Etc
For each directory entry found, label the entry type as either a (folder) or a (file) as shown above. For each level of recursion, indent a couple of spaces. The order of the items listed is not important as the O/S may return them in any order. You may add more directories and files to the files created by the ZIP file if you wish.
Zip Includes:
Folder1 - File1.1.txt (file) & File1.2.txt (file)
Folder2 - ( Folder2.1 (folder) - Filie2.1.1.txt (file))
File2.1.txt
Folder3 - File 3.1.txt (file) & File 3.2.txt (file)
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