Question: This question is related to java a) The file (as shown in Figure 1) contains information about Forested and non-forested areas in Malaysia for the

 This question is related to java a) The file (as shown

in Figure 1) contains information about Forested and non-forested areas in Malaysia

This question is related to java

a) The file (as shown in Figure 1) contains information about Forested and non-forested areas in Malaysia for the year of 2017. That data includes Area, State, Year, Category and Hectares. Forested_and_NonForested Areas_Malaysia_2017 - No File Edit Format View Help Peninsular Malaysia; Johor; 2017; Forested;447753 Peninsular Malaysia; Johor;2017; Non-Forested; 1468847 Peninsular Malaysia;Kedah; 2017;Forested;342431 Peninsular Malaysia; Kedah;2017; Non-Forested; 600069 Peninsular Malaysia; Kelantan; 2017, Forested;810415 Peninsular Malaysia; Kelantan;2017; Non-Forested; 700047 Peninsular Malaysia; Melaka; 2017; Forested;5386 Peninsular Malaysia; Melaka;2017;Non-Forested;165914 Peninsular Malaysia; Negeri Sembilan;2017;Forested;158089 Peninsular Malaysia; Negeri Sembilan;2017; Non-Forested;507620 Peninsular Malaysia;Pahang;2017;Forested;2056678 Peninsular Malaysia; Pahang; 2017; Non-Forested;1539822 Peninsular Malaysia; Perak;2017; Forested;1020178 Peninsular Malaysia; Perak;2017; Non-Forested;1083622 Peninsular Malaysia; Perlis;2017;Forested; 11532 Peninsular Malaysia;Perlis;2017; Non-Forested; 67968 Peninsular Malaysia; Pulau Pinang;2017;Forested; 7761 Peninsular Malaysia; Pulau Pinang;2017;Non-Forested; 95343 Sabah & Sarawak;Sabah; 2017;Forested;4558368 Sabah & Sarawak;Sabah; 2017; Non-Forested;2803632 Sabah & Sarawak;Sarawak;2017; Forested; 7999866 Sabah Sarawak; Sarawak; 2017; Non-Forested;4598245 Peninsular Malaysia; Selangor; 2017;Forested;250860 Peninsular Malaysia, Selangor; 2017;Non-Forested;542160 Peninsular Malaysia; Terengganu; 2017; Forested;652918 Peninsular Malaysia; Terengganu; 2017;Non-Forested; 644482 Peninsular Malaysia;W.P. Kuala Lumpur; 2017; Forested; 2049 Peninsular Malaysia;W.P. Kuala Lumpur;2017; Non-Forested; 27121 Create a complete Java program based on the following requirements: i) Reads the data from the file and filter the data into two new output text files called forestedArea.txt and nonForested. txt. 1) Each file will consist of the following information: Area, State, Year, Category and Hectares. Also, calculate the total hectares. Design the output file properly with report header. ii) Create another file called summary.txt that consist of total hectares for both forested and non-forested for Peninsular Malaysia and Sabah & Sarawak. Also, display the data in percentage % value. The following is the sample data, you may change the format on your own. Forested Non-Forested GOS Area Hectares % Hectares % Peninsular Sabah&Sarawak 5,776,068 12,557,434 43.7 62.92 7,442,997 7,401,877 56.3 37.08 iv) Implement appropriate exception-handling technique to deal with the possible exception. (17 marks) b) Create a complete Java program to implement multithreading. i) You may use only any one of the techniques to create the threads. ii) You must create at least TWO (2) threads. . The first thread must be related to numbers and or calculation The second thread must be related to String. iii) Show the possible output for your code. (8 marks)

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!