Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

structions JobApplicant j... Tesughspplica.. + reate a class in JobApplicantjava

ID: 3745992 • Letter: S

Question

structions JobApplicant j... Tesughspplica.. + reate a class in JobApplicantjava that holds data about a job applicant. Include a name, a phone number, and four Boolean 1 nport java.util.Scanner: 2 public class TestJobApplicants fields that represent whether the applicant is skilled in each of the following areas: word processing, spreadsheets, public static votd natn(Stringt] args) 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 nane should be JobApplicant appl new JobAppltcant("Johnson". "312-345-9875" JobApplicant app2 new JobApplicant (Kernit. "312-543-1275" JobApplicant app3 -new JobApplicant("Laurence". "688-288-89125 JobApplicant app4 new JobApplicant(Mitchell". "815-288.3881 String qualtftedMsg "is qualifted for an interview called getNane 18 Create an application in Test/obApplicants,java that instantiates several job applicant objects and pass each in turn to a Boolean method named isQualtfied that determines whether each applicant is qualified for an String notQualtftedMsg H/is not qualifted for an tntervtew at this tune interview. Then, in the natn) method, display an appropriate method for each applicant. A qualified applicant has at least three of the four skills. 17Nrite your code here 19 29| lpublic static boolean tsQualifted( JobAppltcant app) 21 0 22 Write your code here 23 24 public static votd display (JobApplicant app. String nsg) Grading Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade. Systen.out.print Ln(app.getNane)nsg 26 Phone:app.getPhone()). Once you are happy with your results, click the Submit button to record your score. 29 1

Explanation / Answer

class JobApplication{
private String name;
private String phone;
//Word processing
private boolean wp;
//Spreedsheet
private boolean ssc;
private boolean db;
private boolean graphics;
public JobApplication(String Name,String p,boolean W,boolean S,boolean DB,boolean G){
name=Name;
phone=p;
wp=W;
ssc=S;
db=DB;
graphics=G;
}
public String getName(){
return name;
}
public String getPhone(){
return phone;
}
public boolean getWord_p(){
return wp;
}
public boolean get_sheet(){
return ssc;
}
public boolean getDB(){
return db;
}
public boolean getGraphics(){
return graphics;
}
  
}
public class TestJobApplicants {
public static void main(String args[]) {
//Qualified message
String qmsg="Is qualified for interview";
String nqmsg="Is not qualified for interview this time";
//you can test swith your data
JobApplication app1=new JobApplication("Johnson","312-345-9875",true,false,true,false);
JobApplication app2=new JobApplication("Lawrence","608-345-9875",true,false,true,true);
if(isQualified(app1))
display(app1,qmsg);
else
display(app1,nqmsg);
  
if(isQualified(app2))
display(app2,qmsg);
else
display(app2,nqmsg);
//System.out.println("Sum of x+y = " + z);
}
public static boolean isQualified(JobApplication app){
int count =0;
if(app.getWord_p())
count++;
if(app.get_sheet())
count++;
if(app.getDB())
count++;
if(app.getGraphics())
count++;
if(count>2)
return true;
  
else
return false;
}
public static void display(JobApplication app,String message){
System.out.println(app.getName()+" "+message+" ,"+app.getPhone());
}
}