Week 2 - Lab 2 - Binary 1/0 (Number of files in a directory) Write a program that prompts the user to enter a directory
Posted: Tue Jul 05, 2022 10:25 am
Week 2 - Lab 2 - Binary 1/0 (Number of files in a directory) Write a program that prompts the user to enter a directory and displays the number of the files in the directory. Hints: Import.io.File Store the total size of all files in the "Long" data type variable Implement recursive call Some directories are read/write protected - which results in an error - choose a small folder/directory that is read/write enabled and contains a few files. Optional: Handle an exception if such occurs. Enter a directory: c:\Diri files. 1. Your flowchart or logic in your program 2. The entire project folder containing your entire project ( That includes .java file) as a compressed file. (zip) 3. Program output - screenshot 1. Copy and paste source code to this document underneath the line "your code and results/output" Points will be issued based on the following requirements: Program Specifications / Correctness Readability . . . . . Code Comments Code Efficiency Assignment Specifications Your code and results / output