Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

Briefly discuss the properties that a valid benchmark should have.

Answered: 1 week ago

Question

When there was controversy, was it clear who had the final say?

Answered: 1 week ago

Question

10:16 AM Sun Jan 29 Answered: 1 week ago

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago