Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

implement a class, called YearlyOfficers, that will reorganise the records of the bcs . txt file into four text files, bcs 2 1 . txt

implement a class, called YearlyOfficers, that will reorganise the records of the bcs.txt file into four text files, bcs21.txt, bcs22.txt, bcs23.txt, bcs24.txt containingstudents from bcs.txt registered with the Society in 2021,2022,2023,2024, respectively. YearlyOfficers class will contain the following methods: (i) openFiles() that will open the above mentioned files (bcs.txt, bcs21.txt, bcs22.txt,bcs23.txt and bcs24.txt); (ii) separateOfficers() that will read from the input text file, record by record (line by line),writing into the appropriate output text file (officers registered in 2021,2022 and 2023 will be stored in bcs21.txt, bcs22.txt, bcs23.txt and bcs24.txt,respectively), and also counting the number of officers in each output file; respectively), andalso counting the number of officers in each output file;PageUp (iii) closeFiles() closing the above mentioned files and displaying the number of officers in each of the bcs21.txt, bcs22.txt, bcs23.txt and bcs24.txt files.It is expected that appropriate API handling strings will be used in connection with UoB numbers and adequate Text I/O operations. When the first two digits of the UoB number are not in the specified range then an exception is thrown, and preferably the error is recorded in an error log file. B.1. Implement the YearlyOfficers class and show by running it that it separates the bcs.txt file by using the above-mentioned methods. [B.2. Apply unit testing, using JUnit, to the separateOfficers() method. Identify a minimal test set, as a set of records in testOfficers.txt for testing this method and insert it, as comment, at the
beginning of the testing method. The output files will be testOfficers21.txt,
testOfficers22.txt, testOfficers23.txt and testOfficers24.txt. In java

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

What is the IZOF model and how does it relate to peak performance?

Answered: 1 week ago

Question

3. Identify challenges to good listening and their remedies

Answered: 1 week ago

Question

4. Identify ethical factors in the listening process

Answered: 1 week ago