Question: 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,

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.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!