An Entry is an object that represents either a String, or a list of other Entry objects. The Entry interface is shown below. An example of an Entry is a file entry in Windows or Unix, in which the file...


An Entry is an object that represents either a String, or a list of other Entry objects. The Entry interface is shown below.


An example of an Entry is a file entry in Windows or Unix, in which the file entry is either a single file or a folder (and the folder can contain other files or more folders). Implement the public driver method expandEntry, which will invoke a private recursive method that you must also implement. The public method accepts an Entry as a parameter and returns all the Strings represented in the Entry (in a Set). If the Entry is representing a single String, then the resulting Set will have size 1. Otherwise, Entry is representing a list of other Entrys, and you should recursively include the Strings represented by those Entrys. (The logic stated above is most likely found in the private recursive routine).


To simplify your code, you may assume that no Entry refers to itself, either directly or indirectly.

Nov 18, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here