answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nadya68
16 days ago
10

Create a class that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whe

ther 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.
Computers and Technology
2 answers:
Amiraneli [921]16 days ago
5 0

Response:

Clarification:

I am unfamiliar with the solution in Java.

Here is what I implemented in C#. You can find the relevant code below

public class JobApplication

   {

       private string name;

       public string Name

       {

           get { return name; }

           set { name = value; }

       }

       private string phoneNumber;

       public string PhoneNumber

       {

           get { return phoneNumber; }

           set { phoneNumber = value; }

       }

       private bool isSKilledInWordProcessing;

       public bool IsSkilledInWordProcessing

       {

           get { return isSKilledInWordProcessing; }

           set { isSKilledInWordProcessing = value; }

       }

       private bool isSkilledInSpreadsheets;

       public bool IsSkilledInSpreadsheets

       {

           get { return isSkilledInSpreadsheets; }

           set { isSkilledInSpreadsheets = value; }

       }

       private bool isSkilledInDatabases;

       public bool IsSkilledInDatabases

       {

           get { return isSkilledInDatabases; }

           set { isSkilledInDatabases = value; }

       }

       private bool isSkilledInGraphics;

       public bool IsSkilledInGraphics

       {

           get { return isSkilledInGraphics; }

           set { isSkilledInGraphics = value; }

       }

       public JobApplication(string name, string phoneNumber, bool isSKilledInWordProcessing,

           bool isSkilledInSpreadsheets, bool isSkilledInDatabases, bool IsSkilledInGraphics)

       {

           Name = name;

           PhoneNumber = phoneNumber;

           IsSkilledInDatabases = isSkilledInDatabases;

           IsSkilledInGraphics = isSkilledInGraphics;

           IsSkilledInWordProcessing = IsSkilledInWordProcessing;

           IsSkilledInSpreadsheets = isSkilledInSpreadsheets;

       }

   }

   class Program

   {

       static void Main(string[] args)

       {

           JobApplication jobApplication1 = new JobApplication("Emmanuel Man", "+39399399", false, true, true, true);

           CheckIfQualified(jobApplication1);

       }

       static void CheckIfQualified(JobApplication jobApplication)

       {

           if(jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics  

               && jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           } else if (jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInWordProcessing)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }

           else if (jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           } else if (jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }else if (jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInSpreadsheets

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }

           else

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is not qualified for the job");

           }

       }

   }

amid [805]16 days ago
3 0

Answer:

import java.util.Scanner;

public class TestJobApplicant{

public static void main(String[] args)

{

   JobApplicant applicant1 = new JobApplicant("Ted","555-1234", true, false, false, false);

   JobApplicant applicant2 = new JobApplicant("Lily", "655-1235", true, false, true, false);

   JobApplicant applicant3 = new JobApplicant("Marshall", "755-1236", false, false, false, false);

   JobApplicant applicant4 = new JobApplicant("Barney", "855-1237", true, true, true, false);

   JobApplicant applicant5 = new JobApplicant("Robin", "955-1238", true, true, true, true);

 

   String qualifiedMessage = "is qualified for an interview. ";

   String notQualifiedMessage = "is not qualified for an interview at this time. ";

   

   if (isQualified(applicant5))

       display(applicant5, qualifiedMessage);

   else

       display(applicant5, notQualifiedMessage);

}

   public static boolean isQualified(JobApplicant applicant) {

       int count = 0;

       boolean isQualified;

       final int MIN_SKILLS = 3;

     

       if(applicant.getWord())

           count += 1;

       if(applicant.getSpreadsheet())

           count += 1;

       if(applicant.getDatabase())

           count += 1;

       if(applicant.getGraphics())

           count += 1;

       if(count >= MIN_SKILLS)

           isQualified = true;

       else

           isQualified = false;

       return isQualified;

   }

   public static void display(JobApplicant applicant, String message) {

       System.out.println(applicant.getName() + " " + message +" Phone: " + applicant.getPhone());

   }

}

class JobApplicant {

   private String name, phone;

   private boolean word, spreadsheet, database, graphics;

   public JobApplicant(String name, String phone, boolean word, boolean spreadsheet, boolean database, boolean graphics){

       this.name = name;

       this.phone = phone;

       this.word = word;

       this.spreadsheet = spreadsheet;

       this.database = database;

       this.graphics = graphics;

   }

   public String getName() {return name;}

   public String getPhone() {return phone;}

   public boolean getWord() {return word;}

   public boolean getSpreadsheet() {return spreadsheet;}

   public boolean getDatabase() {return database;}

   public boolean getGraphics() {return graphics;}

}

Explanation:

Within the JobApplicant class:

- Define the member variables

- Set up the constructor

- Implement the getter methods for all variables

In the TestJobApplicant class:

- Develop an isQualified method that assesses the qualifications of the applicant for the job.

- Develop a display method that outputs the applicant's name, corresponding message, and phone number

In the main method:

- Create instances of the applicants and messages

- Invoke the isQualified method using an applicant to evaluate the outcome

You might be interested in
A company requires an Ethernet connection from the north end of its office building to the south end. The distance between conne
maria [879]

Answer:

A business needs an Ethernet connection that spans from the northern part of their office to the southern part. The distance of this connection is 161 meters and should support speeds up to 10 Gbps in full duplex mode. Which cable types would be suitable for these specifications?

ANSWER: Multi-mode fiber optic cable should be used

Explanation:

MULTI-MODE FIBER OPTIC CABLE

For distances extending to 100 meters, Copper CATX cable is adequate. However, since the distance here is 161 meters, an Ethernet extension is necessary. Using fiber optic cable along with a media converter allows for the transition from copper Ethernet lines to fiber. Multi-mode fiber supports distances up to 550 meters for 10/100/1000 Ethernet links.

Typically, multi-mode fiber is used for short-distance communication like inside buildings or across campuses. It can achieve data rates of up to 100 Gbps, well above the requirements here. Furthermore, this option is cost-effective compared to single-mode fiber optic cables. Fiber optic technology is also advantageous due to its immunity to electromagnetic interference, voltage spikes, ground loops, and surges, making it a better choice for this application.

7 0
26 days ago
Disk scheduling algorithms in operating systems consider only seek distances, because Select one: a. modern disks do not disclos
amid [805]

Response:

a. Current disks do not reveal the actual locations of logical blocks.

Clarification:

Modern disks incorporate scheduling algorithms within the disk drive itself. This presents challenges for operating systems trying to optimize rotational latency. All scheduling methods end up having to perform similarly due to potential constraints faced by the operating system. Disks are typically accessed in physical blocks. Modern technology applies more electronic control to the disk.

4 0
13 days ago
FOREACH, EXPLODE and MAIL are examples of crazy functions.
zubka84 [945]
The selected response is B
4 0
1 month ago
Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative value
Harlamova29_29 [932]

The code relevant to the problem in question:

import java.util.Scanner;

public class Test {

   public static void main(String[] args) {

       double number;

       double squareRootOfNumber;

       String userInput = null;

       Scanner scanner = new Scanner(System.in);

       System.out.println("Please enter a number: ");

       userInput = scanner.next();

       number = Double.parseDouble(userInput);

       squareRootOfNumber = Math.sqrt(number);

       if (number < 0) {

           throw new ArithmeticException("Cannot compute the square root of a negative number");

       }

       System.out.format("The square root of the entered number is %.2f %n", squareRootOfNumber);

   }

}

The program will output:

Please enter a number:

-90

Exception in thread "main" java.lang.ArithmeticException: Cannot compute the square root of a negative number at com..ans.Test.main(Test.java:18)

Explanation:

The standard Java library function java.lang.Math.sqrt does not throw an ArithmeticException for negative arguments, hence there’s no need to enclose your code in a try/catch block.

Instead, we manually trigger ArithmeticException using the throw keyword:

throw new ArithmeticException("Cannot compute the square root of a negative number");

3 0
1 month ago
Dante has a worksheet shared with multiple users. He would like the ability to approve or reject changes that are made. Which fe
oksian1 [804]
Data Consolidation.
7 0
18 days ago
Other questions:
  • How many bits would be needed to count all of the students in class today? There are 5 children in the class.
    7·1 answer
  • To reduce costs and the environmental impact of commuting, your company decides to close a number of offices and to provide supp
    14·1 answer
  • Charlie has a large book collection. He was keeping track of it in a spreadsheet, but it has grown big enough that he wants to c
    10·1 answer
  • Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did the Point
    10·1 answer
  • array of String objects, words, has been properly declared and initialized. Each element of words contains a String consisting o
    11·1 answer
  • An array subscript can be an expression, but only as long as the expression evaluates to what type?
    7·1 answer
  • Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run: Enter th
    8·1 answer
  • The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
    8·1 answer
  • The position of a runner in a race is a type of analog data. The runner’s position is tracked using sensors. Which of the follow
    8·1 answer
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!