Question: Please help me solve this question. Thank You! [Object-oriented programming] [Java] p/s: using Java The following text file named covid19.txt in Figure 1 contains some

Please help me solve this question. Thank You! [Object-oriented programming] [Java]

Please help me solve this question. Thank You! [Object-oriented programming] [Java] p/s:

p/s: using Java

The following text file named covid19.txt in Figure 1 contains some information about patients of confirmed positive cases for COVID-19. The data is comprised of the patient's name, ID, age, and category of case. The nationality of the patient can be determined based on the first code of ID; if the first ID code is 'X', then it refers to non-Malaysian; others are referred to as Malaysian according to state code in Malaysia. covid19 - Notepad File Edit Format View Help Hanif Zakaria:B12346:45:Symptomatic Maria Abdullah:C23465:35:Asymptomatic Zainah Zailan:J23789:67:Symptomatic Akhbar Ali:X89002:32:Symptomatic Abu Bakar Junid:D78890:55:Asymptomatic Barney Liq:X78990:39:Symptomatic Didie Mary:X67887:46:Asymptomatic Jamalul Bakhtiar Ali:B45634:27: Asymptomatic Nur Nadia Rahmat :K67899:61:Symptomatic Figure 1: covidl.txt Write a complete Java program using File I/O operation that can perform the following tasks: a) Read all records from text file named covid19.txt in Figure 1. b) Count the total number of symptomatic positive case of covid 19 patient for Malaysian. c) Write the information about symptomatic positive case of covid 19 patient for all citizen into file named symptomatic.txt as shown in Figure 2. Based on counter in b) display the number of symptomatic cases on this file. symptomatic - Notepad File Edit Format View Help List of Symptomatic case Name ID Age Hanif Zakaria Zainah Zailan Nur Nadia Rahmat B12346 123789 K67899 45 67 61 Number of Symptomatic case for Malaysian : 3 Figure 2: symptomatic.txt d) Close all file streams in used. e) Apply exception handling mechanism in the program. (10 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!