For this Project 1 Index milestone, your project must be able to calculate and store the word counts of a single file or a directory of text files, as well as output those counts to a JSON file.

TABLE OF CONTENTS


Prerequisites

You must complete the following assignments before beginning to work on this one:

Untitled

You are encouraged to copy/paste homework classes into your project to modify and use when appropriate.

Functionality

Your main method must be placed in a class named Driver and must process the following additional command-line arguments:

The command-line flag/value pairs may be provided in any order or not at all. Do not convert paths to absolute form when processing command-line input!

Output user-friendly error messages in the case of exceptions or invalid input. Under no circumstance should your main() method output a stack trace to the user!

<aside> <img src="/icons/info-alternate_gray.svg" alt="/icons/info-alternate_gray.svg" width="40px" /> The ArgumentParser homework assignment may be adapted and used to handle command-line input for the project.

</aside>

Text Processing

If the appropriate command-line arguments are provided, process the provided input path as follows: