Question: QUESTION 5 The State Chess League has successfully organized a Closed Chess Championship 2019 on 20th January 2019 at Royal Region Hall, Kuala Lumpur. The

 QUESTION 5 The State Chess League has successfully organized a Closed

Chess Championship 2019 on 20th January 2019 at Royal Region Hall, Kuala

QUESTION 5 The State Chess League has successfully organized a Closed Chess Championship 2019 on 20th January 2019 at Royal Region Hall, Kuala Lumpur. The chess players' information that participated in the championship is shown in Figure 1. The information consists of player name, gender, age, player rank, and state name. | playerInfo - Notepad File Edit Format View Help Farhan Iskandar,M, 13,3,Perlis Zakiah Ahmad, F,15,5,Perlis Mimi Asmida, F,6,12, Kedah Zaitun Majid, F,10,13, Johor Maizatul Akmam, F, 18, 2, Penang Wan Haidar Wan Ya,M,17,2, Perak Ali Aiman, M, 16,9, Kedah Figure 1: playerInfo.txt Write a complete Java program using file input output operations to solve the following tasks: a) Read all records from the text file named playerInfo.txt. b) Print the information into output files according to the following items: i. Store the information according to the players' gender. For the male player, store into malePlayer.txt while the female player in femalePlayer.txt. Display the total number of male and female player in the respective files. ii. Display the details of players at the Top 10 ranks and store into Top10.txt. The expected outputs for all files are shown in Figure 2. ! malePlayer - Notepad File Edit Format View Help ***MALE PLAYER*** Name Gender Age Farhan Iskandar M 13 Wan Haidar M 17 Ali Aiman M 16 Total male player: 3 Rank 3 1 9 mo State Perlis Perak Kedah femalePlayer - Notepad File Edit Format View Help ***FEMALE PLAYER*** Name Gender Age Zakiah Ahmad F 15 Mimi Asmida F 6 Zaitun Majid F 10 Maizatul Akmam F 18 Total female player: 4 Rank 5 12 13 2 State Perlis Kedah Johor Penang 2 Top 10 - Notepad File Edit Format View Help ***TOP10 PLAYER*** Name Gender Age Farhan Iskandar M 13 Zakiah Ahmad F 15 Maizatul Akmam F 18 Wan Haidar M 17 Ali Aiman M 16 Rank 3 5 2 1 9 State Perlis Perlis Penang Perak Kedah Figure 2: Sample of output c) Apply the exception handling mechanism in the program. (15 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!