Question: Question 1 (15 marks) Consider the following class definition FallTimeEmployee and text file, employee.txt. Class: Full Time Employee Attribute : private String name: private int

Question 1 (15 marks) Consider the following class definition FallTimeEmployee and text file, employee.txt. Class: Full Time Employee Attribute : private String name: private int age: private String grade: //DG41, D045, DG52 etc Methods: normal constructor la setter getters Mpublic double determine Salary() Grade Salary DG41 3000.00 DG45 5000.00 Others 7000.00 Alprinter method X employee Notepad Filte de format w Help Collin Mong:54:0641 Kamilah Aisyah:49:0645 Chin Ann: 30:0641 Martha Bella 34:0648 Susanti Kassia: 29.641 Kari Selat:38:0652 Zulkarnain Name:54 DG52 Yusry Yaakob:50:0641 100Windows UTER Write a complete maint) program to perform the following tasks a) Read all records from file employee.txt and store them in a Full TimeEmployee array b) Determine salary for each employee Store employee name, grade and salary into an output file named output.txt as the following X Colles Wong Now Festa Employee is, de and salary 0641 3000.0 Ka Asyah DGAS SAN. Chin Ann 1641 JAN. Marta della 0648 703.6 Sast Kassia G41 JON. Kara Selmet 0652 1000 Zulkarnain in 1652 2000. Yusry Talib 41 3000.1 in w Windo UIT c) Search the grade "DG50" in the text file. If found display "Grade DG50 exists in the list". Otherwise, dis- play an appropriate message. d) Write any ONE exception handling operations to deal with input-output errors. (15 maks) Question 1 (15 marks) Consider the following class definition FallTimeEmployee and text file, employee.txt. Class: Full Time Employee Attribute : private String name: private int age: private String grade: //DG41, D045, DG52 etc Methods: normal constructor la setter getters Mpublic double determine Salary() Grade Salary DG41 3000.00 DG45 5000.00 Others 7000.00 Alprinter method X employee Notepad Filte de format w Help Collin Mong:54:0641 Kamilah Aisyah:49:0645 Chin Ann: 30:0641 Martha Bella 34:0648 Susanti Kassia: 29.641 Kari Selat:38:0652 Zulkarnain Name:54 DG52 Yusry Yaakob:50:0641 100Windows UTER Write a complete maint) program to perform the following tasks a) Read all records from file employee.txt and store them in a Full TimeEmployee array b) Determine salary for each employee Store employee name, grade and salary into an output file named output.txt as the following X Colles Wong Now Festa Employee is, de and salary 0641 3000.0 Ka Asyah DGAS SAN. Chin Ann 1641 JAN. Marta della 0648 703.6 Sast Kassia G41 JON. Kara Selmet 0652 1000 Zulkarnain in 1652 2000. Yusry Talib 41 3000.1 in w Windo UIT c) Search the grade "DG50" in the text file. If found display "Grade DG50 exists in the list". Otherwise, dis- play an appropriate message. d) Write any ONE exception handling operations to deal with input-output errors. (15 maks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
