Job offer

Report a typo

You would like to offer a job as a Java developer for several candidates.

Your company has a special rule written in Java for decision-making.

boolean offerAJob = 
        (knowJava && yearsOfExperienceInJava >= 1) || 
        (knowPython && yearsOfExperienceInPython >= 3);

A small explanation:

- knowJava is a boolean variable that shows whether the candidate knows Java or not.

- knowPython is a boolean variable that shows whether the candidate knows Python or not.

- yearsOfExperienceInJava is an int variable that shows how many years of Java programming the candidate has.

- yearsOfExperienceInPython is another int variable that shows how many years of Python programming the candidate has.

The list of candidates with their skills is the following:

- John: knowJava = true; yearsOfExperienceInJava = 1; knowPython = false; yearsOfExperienceInPython = 0;

- Mary: knowJava = false; yearsOfExperienceInJava = 0; knowPython = true; yearsOfExperienceInPython = 3;

- Olivia: knowJava = true; yearsOfExperienceInJava = 0; knowPython = true; yearsOfExperienceInPython = 2;

- Alexander: knowJava = true; yearsOfExperienceInJava = 3; knowPython = true; yearsOfExperienceInPython = 2;

- Andrew: knowJava = false; yearsOfExperienceInJava = 1; knowPython = false; yearsOfExperienceInPython = 1;

- Emily: knowJava = false; yearsOfExperienceInJava = 0; knowPython = true; yearsOfExperienceInPython = 2;

Using a decision-making rule, select all candidates that will be good for your company.

Note, sometimes a candidate may have the experience, but still knows the programming language badly. In this case, we consider their knowledge as false.

Select one or more options from the list
___

Create a free account to access the full topic