Write a Java program to imitate a file system of an operating system. In your solution, design a class called BasicFile with options to carry…

Write a Java program to imitate a file system of an operating system.

In your solution, design a class called BasicFile with options to carry out the following operations:

(a) Select a file, using a file dialog box.

(b) Make a copy of the file selected – whether it is a text file or an image file.

(c) Write to an output file with the option of either appending to a text file, or over-writing the contents of a text file.

(d) Display the following attributes of the input file in a scrollable screen:

i. The absolute path of the file

ii. Files and directories that are in the path of the file.

iii. The size of the file in kilobytes.

iv. The number of lines in the file, if the is a text file.

(e) Display the contents of the input file in a scrollable pane.

(f) Search the input file line by line for a given string. The output must contain the line number, followed by the contents of the line that contains the search argument. For instance given the following the search string: Java, the program would search the file line by line generating a result such as the following:

50: on the island of Java

95: The people of JAVA loves jaVa.

Sample Solution
ealization right now steel and iron amalgams as a rule made it the most prescribed material for an eco-accommodating condition. China is the world head iron and steel maker on the planet. China steel utilization and creation alone holds the greater part of the world steel creation in these ongoing years. This surge of supply, together with the immense wellsprings of materials cause the event of a monetary issue. At the point when the measure of organic market is unbalance, it cause the material market cost to drop. In the course of the most recent decades iron cost have diminished quickly. Concurring the London Metal Exchange, their database shows that in 2008, steel billet cost is more than 1000 USD per ton. Be that as it may, in 2016, one ton of steel just worth around 300 USD. Numerous significant expense makers need to bring down the cost and confronting the danger of shutting their heaters. The paper the Economists have raisen an inquiry: Is there a lot of iron on the planet? They made a valid statement in raising the oversupply of steel on the planet. Be that as it may, they didn’t show any affirmation in the interest. Iron and its combination can be applied in anything from developments, hardware, to even clinical application. Numerous nations right currently doesn’t have proficient railroad or appropriate houses. With scrap steel, being one of the least expensive green material and right now the world is making a beeline for an eco-accommodating living condition, the utilization of steel scrap can be applied anyplace. In this way, progressively potential employments of iron should be found and drawn nearer. Iron is the most broadly utilized metal on the planet. It has been created for a considerable length of time and has improved altogether to arrive at its characteristics and a wide scope of assortments in combinations like today. There are many worried around the impact of iron creation on nature. Be that as it may, with the apply of science and propelling innovation, a much all the more encouraging future in an eco-accommodating condition for this material is ensured.>GET ANSWER Let’s block ads! (Why?)

Do you need any assistance with this question?
Send us your paper details now
We’ll find the best professional writer for you!

 



error: Content is protected !!