Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design a Java program to read the file system beneath a particular folder, and store it in a tree data structure. Description: Requirements: the program
Design a Java program to read the file system beneath a particular folder, and store it in a tree data structure.
Description:
- Requirements: the program should be able to look at a folder and its tree of subfolders, and construct a tree data structure to represent it. Each node in the tree corresponds to a folder in the file system and should contain the number of files, the total size of the files, the folder's name, and a list of child folders
- the program should read the name of the folder to scan, scan the folder's subtree, then output the tree in a way that shows the tree hierarchy e.g., one line per tree node, and indent each node appropriately
- Hint: it should use recursion both in the scanning part of the program, and the part that outputs the tree
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