Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming, Eighth Edition Joyce Farrell Exercise 7 - JobApplicant.java & TestJobApplicants.java Create a class that holds data about a job applicant. Include a name,

Java Programming, Eighth Edition Joyce Farrell

Exercise 7 - JobApplicant.java & TestJobApplicants.java

Create a class 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. Create an application that instantiates several job applicant objects and pass each in turn to a Boolean method 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. Save the files as JobApplicant.java and TestJobApplicants.java.

Must finish this code with these variables:

JobApplicant.java

public class JobApplicant { //define fields (2 String and 4 boolean fields)

//define methods (these are the same as the boolean fields) public JobApplicant(String name, String phone, boolean w, boolean s, boolean d, boolean g) { this.name = name; this.phone = phone; hasWordSkill = w; hasSpreadsheetSkill = s; hasDatabaseSkill = d; hasGraphicsSkill = g; } //define String and boolean get menthods, see p. 285 - 288 decisions and contructors

} }

-------------------------------------------------------------------------------

PART B:

TestJobApplicants.java

import java.util.Scanner; public class TestJobApplicants { public static void main(String[] args) { //Define job applicant information JobApplicant app1 = new JobApplicant(" ",) ; JobApplicant app2 = new JobApplicant(" ", ); JobApplicant app3 = new JobApplicant(" ", ); JobApplicant app4 = new JobApplicant(" ", ); //Define app if\else qualified message (qualifiedMsg or notQualifiedMsg)to display String qualifiedMsg = "is qalified for an interview "; String notQualifiedMsg = "is not qualified for an interview at this time ";

} public static boolean isQualified(JobApplicant app) { int count = 0; boolean isQual; final int MIN_SKILLS = 3; //Define the get menthods in the skilled areas if(app.getHasWordSkill()) count = count + 1; if(app.getHasSpreadsheetSkill()) count = count + 1; if(app.getHasDatabaseSkill()) count = count + 1; if(app.getHasGraphicsSkill()) count = count + 1; if(count >= MIN_SKILLS) isQual = true; else isQual = false; return isQual; } public static void display(JobApplicant app, String msg) { //Define the output applicant message System.out.println(app.getName() + " " + msg + " Phone: " + app.getPhone()); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago