Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer question use object oriented programming in java QUESTION 5 The Thomas Cup is one of the most popular international badminton competition in the world
Answer question use object oriented programming in java
QUESTION 5 The Thomas Cup is one of the most popular international badminton competition in the world held since 1949. There is a text file named thomascup.txt containing the information of the year, winner and runner-up from 1990 to 2014. The sample of the text file is shown as below: 1990;China: Malaysia 1992: Malaysia;Indonesia 1994;Indonesia, Malaysia 1996;Indonesia;Denmark 1998;Indonesia, Malaysia 2000, Indonesia, China 2002;Indonesia: Malaysia 2004;China;Denmark 2006,China;Denmark 2008,China; Korea 2010,China;Indonesia 2012,China; Korea 2014, Japan, Malaysia Write a complete program to perform the following tasks: a) Apply the exception handling mechanism in the program. (1 mark) b) Read all records from the thomascup.txt file. (3 marks) c) Print into an output file named as china.txt the following information: i. The information that shows China as whether a winner or a runner-up. ii. The number of times China won the Thomas Cup. iii. The number of " to represent the number of times China won the Thomas Cup. The expected output is shown as below: Year Winner Runner-up 1990 China 2000 Indonesia 2004 China 2006 China 2008 China 2010 China 2012 China Malaysia China Denmark Denmark Korea Indonesia Korea China won 6 time(s) (11 marks)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started