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

Please Help. New to Java and running into a lot of issues and errors. //TestJobA

ID: 3600057 • Letter: P

Question

Please Help. New to Java and running into a lot of issues and errors.

//TestJobApplicants.java
public class TestJobApplicants
{
public static void main(String[]args)
{
//set boolean values of skills
boolean wordprocessing=true;
boolean spreadsheet=true;
boolean databases=true;
boolean graphics=false;
//create constructor of class JobApplicant
JobApplicant applicant=
new JobApplicant("Jacob Gregory","727-237-8036",wordprocessing,spreadsheet,databases,graphics);
//print the members values of job applicants
System.out.println("Name:"+applicant.getName());
System.out.println("Phone Number:"+applicant.getPhonenumber());
System.out.println("Skills");
System.out.println("Wordprocessing:"+applicant.getWordprocessing());
System.out.println("Spreadsheet:"+applicant.getSpreadsheet());
System.out.println("Databases:"+applicant.getDatabases());
System.out.println("Graphics:"+applicant.getGraphics());
/*Check wether the applicant boolean values are true for three skills*/
{
if((wordprocessing && spreadsheet &&databases))||
(spreadsheet&&databases&&graphics)||
(databases&&graphics&&wordprocessing)||
(graphics&&wordprocessing&&spreadsheet)||
//print that eligible for job
System.out.println("Eligible for job");
System.out.println("Not eligible for job");
//print that not eligible for job
}
}
}

Explanation / Answer

First of all the main error is due to JobApplicant class which is not there and you are making an object of JobApplicant using

JobApplicant applicant=
new JobApplicant("Jacob Gregory","727-237-8036",wordprocessing,spreadsheet,databases,graphics);

here you are using a parameterized constructor so you should have a class by name JobApplicant in which you should define a parameterized constuctor as below

The second error you are getting is while using the if and else statement(the format for same is not correct it should be like if(conditions){ print statement 1 } else{ print statement 1 }) and other oneyou are getting when you are accessing the variable applicant.getName(), applicant.getPhoneNumber(), applicant.isWordprocessing(), applicant.isSpreadsheet(), applicant.isDatabases(), applicant.isGraphics() .

After correcting all the error below is the program :