This is the question I am struggling with - Create a class in JobApplicant.java that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whether the applicant is skilled in each of the following areas: word processing, spreadsheets, databases, and graphics. Include a constructor that accepts values for each of the fields. Also include a get method for each field. The get method should be the field name prefixed with 'get'. For example, the get method for name should be called getName. Create an application in TestJobApplicants.java that instantiates several job applicant objects and pass each in turn to a Boolean method named isQualified that determines whether each applicant is qualified for an interview. Then, in the main() method, display an appropriate method for each applicant. A qualified applicant has at least three of the four skills.   This is the code it has given -  public class JobApplicant {     private String name;     private String phone;     private boolean hasWordSkill;     private boolean hasSpreadsheetSkill;     private boolean hasDatabaseSkill;     private boolean hasGraphicsSkill;     public JobApplicant(String name, String phone, boolean w, boolean s, boolean d, boolean g) {     }     public String getName() {     }     public String getPhone() {     }     public boolean getHasWordSkill() {     }     public boolean getHasSpreadsheetSkill() {     }     public boolean getHasDatabaseSkill() {     }     public boolean getHasGraphicsSkill() {     } }   import java.util.Scanner; public class TestJobApplicants {    public static void main(String[] args)    {       JobApplicant app1 = new JobApplicant("Johnson", "312-345-9875",             true, false, true, false);       JobApplicant app2 = new JobApplicant("Kermit", "312-543-1275",             true, false, false, false);       JobApplicant app3 = new JobApplicant("Lawrence", "608-288-09125",             true, false, true, true);       JobApplicant app4 = new JobApplicant("Mitchell", "815-288-3881",             true, true, true, true);       String qualifiedMsg = "is qualified for an interview   ";       String notQualifiedMsg = "is not qualified for an interview at this time   ";       // Write code here    }    public static boolean isQualified(JobApplicant app)    {       // Write code here    }    public static void display(JobApplicant app, String msg)    {       System.out.println(app.getName() + " " + msg +          "  Phone: " + app.getPhone());    } }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

This is the question I am struggling with -

Create a class in JobApplicant.java that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whether the applicant is skilled in each of the following areas: word processing, spreadsheets, databases, and graphics. Include a constructor that accepts values for each of the fields. Also include a get method for each field. The get method should be the field name prefixed with 'get'. For example, the get method for name should be called getName.

Create an application in TestJobApplicants.java that instantiates several job applicant objects and pass each in turn to a Boolean method named isQualified that determines whether each applicant is qualified for an interview. Then, in the main() method, display an appropriate method for each applicant. A qualified applicant has at least three of the four skills.

 

This is the code it has given - 

public class JobApplicant {
    private String name;
    private String phone;
    private boolean hasWordSkill;
    private boolean hasSpreadsheetSkill;
    private boolean hasDatabaseSkill;
    private boolean hasGraphicsSkill;
    public JobApplicant(String name, String phone, boolean w, boolean s, boolean d, boolean g) {
    }
    public String getName() {
    }
    public String getPhone() {
    }
    public boolean getHasWordSkill() {
    }
    public boolean getHasSpreadsheetSkill() {
    }
    public boolean getHasDatabaseSkill() {
    }
    public boolean getHasGraphicsSkill() {
    }
}
 
import java.util.Scanner;
public class TestJobApplicants
{
   public static void main(String[] args)
   {
      JobApplicant app1 = new JobApplicant("Johnson", "312-345-9875",
            true, false, true, false);
      JobApplicant app2 = new JobApplicant("Kermit", "312-543-1275",
            true, false, false, false);
      JobApplicant app3 = new JobApplicant("Lawrence", "608-288-09125",
            true, false, true, true);
      JobApplicant app4 = new JobApplicant("Mitchell", "815-288-3881",
            true, true, true, true);
      String qualifiedMsg = "is qualified for an interview   ";
      String notQualifiedMsg = "is not qualified for an interview at this time   ";

      // Write code here

   }
   public static boolean isQualified(JobApplicant app)
   {
      // Write code here
   }
   public static void display(JobApplicant app, String msg)
   {
      System.out.println(app.getName() + " " + msg +
         "  Phone: " + app.getPhone());
   }
}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT