Question: Create a beginner CS program Problem description In the advertisement for a job, employers usually asks for several qualifications from the candidates. A qualification, in

Create a beginner CS program
Problem description
In the advertisement for a job, employers usually asks for several qualifications from the candidates. A
qualification, in this context, is defined by a category and a list of keywords. For example, see the qualifi-
cations below for a software engineer position:
In this program, you will define Qualification in a separate class and use them to advertise the qualifications
required for a Job.
Programming requirements:
You should create a class named Qualification.
This class should include two attributes: (i) category (a String) and (ii) keywords (an array of
String, of size 5).
Include a constructor that accepts only one String parameter to initialize the category attribute.
The constructor should initialize the keywords attribute with empty strings.
Include getter methods for both the attributes.
Include a void method named addKeyword which accepts one String parameter and adds it
to the attribute keywords. This method should ensure that the new keyword to be added does
not exist in the array already. Use the String method equalsIgnoreCase when you match two
keywords. Notice that the array may be full; if this is the case, the new keyword should not be
added. Use the following two methods which should be called from addKeyword.
You should write a non-void method named nextPosition which accepts no parameters but
returns the position of the first occurrence of empty string in the keywords array. It should
return -1 if there is no empty string in the keywords array. Remember that (i) you already
initialized the keywords array with empty strings and so the position will indicate whether
there is a space in the array to add a new keyword. (ii) keywords is an attribute in this
class and so it can be accessed directly from any method inside this class and so you do not
need to pass it as a parameter.
You should write a non-void method named keywordExists which accepts a String (repre-
senting the new keyword) as a parameter and returns a boolean value indicating whether
the new keyword already exists in the keywords array. Again, this method can access the
keywords array directly.
Include a print method in this class to print the contents of this class with appropriate captions.
You should create a class named Advertisement.
This class should not have any attributes.
This class should include the main method. In the main method, create an array of qualifications.
Let the array size be 3.
Initialize the contents of the qualifications array by reading all the values from input.
Include a separate method in this class to print the contents of the qualifications array (you
need to pass the qualifications array as an argument to this method). This method should use
the print method inside the Qualification class to print each qualification.
Print the initial set of qualifications.
Write a non-void method named searchCategory which accepts the qualifications array and a
category (a String) as parameters and returns the position of the qualification which contains
the category, if the category is found. Otherwise, it should return -1.
In the main method, read a category and a new keyword from the input. Use the searchCategory
method to find out which qualification has this category. If found, add the new keyword to this
qualification.
Print the set of qualifications again to see whether the new keyword has been successfully added.
Create a beginner CS program Problem description

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 Programming Questions!