Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java language Problem A - [10 marks] Implement the following classes: File -file name: String - file size: double Main + File(file_name: String, file size:
java language
Problem A - [10 marks] Implement the following classes: File -file name: String - file size: double Main + File(file_name: String, file size: double) + getFile_name(): String + getFile size(): double + toString(): String + Search(files[]: File, file ext: String): String + main(args[]: String): void Suppose, there is a file directory where user can store multiple types of file. i. Now, write a program to read a text file (dir.txt) and store all the information in a "File" type object array. [5 marks) ii. Ask user to enter file type, invoke Search method which will return a String containing number of files of that type, total required size to store the files and a file name list. [5 marks] dir.txt new.txt 2.0 Array.pdf 8.0 Loops.ppt 5.0 Loops.pdf 2.0 String.pdf 10.0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started