Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Unity From Zero To Proficiency Beginner A Step By Step Guide To Coding Your First Game

Authors: Patrick Felicia

1st Edition

1091872023, 978-1091872028

More Books

Students also viewed these Programming questions