Question
Question 2: [40] You will need to make use of the cleancv.txt file that you created in Question 1, to complete Question 2. Now that
Question 2: [40] You will need to make use of the cleancv.txt file that you created in Question 1, to
complete Question 2.
Now that you have a clean file; the next step is to extract only those candidates that the agency would like to interview. In other words, the output of this question should produce a new file that only holds the candidates to be interviewed. This file should be called to-interview.txt
Create a class called CandidatesToInterview and ensure that you have relative path names for the files:
The criteria for the candidates to become potential interviewees are as follows:
The potential candidates are going to be candidates that have suitable qualifications
experience Create a method called public void findCandidates() and make use of the following
arrays as keywords to determine which candidates get chosen for interviews.
String [] keywordsDegree = {"Degree in Computer Science", "Masters in Computer Science"};
String [] keywordsExperience = {"Data Analyst", "Programmer", "Computer programmer", "Operator"};
For this assignment, these are the keywords used for the degrees as well as the years of experience. In the real world this would not be so. To clarify, the keywords array keywordsDegree means that the candidates must either have a Degree in Computer Science or a Masters in Computer Science. Similarly, the keywords array keywordsExperience are candidates that must have experience as either data analysts or Programmer or Computer programmer or Operator.
For this class, the program must determine whether a candidate in the cleancv.txt file should be chosen to be interviewed. If so, the candidate details are to be written to the to-interview.txt file based on the keywords as described above. The end result for this example is as follows:
to-interview.txt
Smith0001 Degree in Computer Science Data Analyst 5 Computer programmer 2 smithj@lol.com Jones0003 Masters in Computer Science Operator 10 Computer programmer 2 jonesr@lol.com Ngomi0004 Degree in Computer Science Programmer 10 ngomim@lol.com Chen0005 Masters in Computer Science Programmer 7 chenc@lol.com
The following form part of each line in the to-interview.txt file:
There is a space between each field (a field being Smith0001 or Degree in Computer Science, etc)
The following data is captured as part of the record o Identifier
o Qualification o Position (most current) o Years of experience (most current) o Position o Years of experience
Take note that Harrison did not make the list as they do not have a qualification. Although Ngomi0004 and Chen0005 have the experience related to being a programmer only, they still qualify. Smith0001 and Jones0003 qualify as they have experience related to 2 roles. All the qualifiers have either a Degree in Computer Science or a Masters in Computer Science.
To summarise, at the end of this question you should produce a file called the to-interview.txt file.
Go to class JobCandidatesMain and test the program before continuing.
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