Algorithms and Data Structures

Algorithms and Data StructuresAssignment – Generalized TreesIntroductionThe file system on most modern operating systems is organized as a generalized tree structure. The nodes of the tree are regular files and subdirectories. The subdirectories provide hierarchical structure, as they can contain other subdirectories as well as regular files.For this assignment, write a Java program that recursively traverses the file system starting at a fully qualified subdirectory. The subdirectory must be provided as a command line parameter. When processing begins, the first line of output is the fully qualified subdirectory.For each subdirectory encountered, get a list of the files in that subdirectory. For each entry in the list, if it is a regular file, output the file name and extension. Do not include the path name; just the file name and extension. If the file is a subdirectory, output just the subdirectory name; do not include the pathname that precedes the subdirectory name. In either case, after outputting the name, recursively descend into subdirectory and continue. You may recognize this as a pre-order traversal.For each line of output, prefix the file or subdirectory name with indentation that provides a visual indication of the depth of the recursive descent.Students are responsible for· public FileTreeWalk(String pathname)· public String listAllFiles()· public String toString()class FileTreeWalkFileTreeWalk is a Java class used for traversing a file system. In addition to a constructor, the class provides two public methods for traversing the file system, and a public toString method for displaying the traversal results.The public interface to the class follows:public FileTreeWalk (String pathname)The constructor takes a String parameter that specifies a pathname. The pathname is a starting point for the file system traversal. The parameter is either a fully qualified path name, or a relative pathname. Fully qualified pathnames start with an optional drive letter, or a slash. On other operating systems (e.g., Linux, Unix), a fully qualified pathname starts with a slash. Relative pathnames start at the current working directory. In either case, the pathname parameter specifies where the file system traversal is supposed to begin.As FileTreeWalk traverses the file system, it adds file names and subdirectory names to a generalized tree structure that when finished will represent the current state of the file system from the starting point specified by the String parameter, pathname.public String listAllFiles ()

Struggling to find relevant content? Order a custom essay on
Algorithms and Data Structures
Let our experts save you the hassle
Order Now
Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
Sign up, place your order, and leave the rest to our professional paper writers in less than 2 minutes.
step 1
Upload assignment instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
s
Get personalized services with GPA Fix
One writer for all your papers
You can select one writer for all your papers. This option enhances the consistency in the quality of your assignments. Select your preferred writer from the list of writers who have handledf your previous assignments
Same paper from different writers
Are you ordering the same assignment for a friend? You can get the same paper from different writers. The goal is to produce 100% unique and original papers
Copy of sources used
Our homework writers will provide you with copies of sources used on your request. Just add the option when plaing your order
What our partners say about us
We appreciate every review and are always looking for ways to grow. See what other students think about our do my paper service.
Medicine
This has everything that was in the rubric. Thank you!
Customer 452707, May 29th, 2022
Accounting
Thanks for your support
Customer 452701, February 3rd, 2022
Criminal Justice
Great work! Followed directions to the latter.
Customer 452485, September 1st, 2021
Technology
Excellent job on the paper!
Customer 452885, December 28th, 2022
Other
AWESOME
Customer 452813, June 21st, 2022
Nursing
Not all sources were " American sources" as directed
Customer 452615, September 16th, 2021
Nursing
Always perfectly done!
Customer 452955, October 28th, 2023
IT, Web
Excellent work!!!
Customer 452885, February 7th, 2023
Professions and Applied Sciences
Amazing work!
Customer 452707, May 29th, 2022
Social Work and Human Services
Excellent!
Customer 452587, August 3rd, 2021
Nursing
Words can't describe how helpful this service has been for me. Thank you!
Customer 452707, January 9th, 2023
Nursing
Always a wonderful experience!
Customer 452453, February 23rd, 2023
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat

Good News ! We now help with PROCTORED EXAM. Chat with a support agent for more information