A company throwing a part and needs to feed the employees different meals based
ID: 3656555 • Letter: A
Question
A company throwing a part and needs to feed the employees different meals based on gender and years of service. There is a total of 200 employees.
1. Male is greater than or equal to 25 years of service get: hamburger, fries, coke.
2. Male is less than 25 years of service get: cheeseburger, bottled water.
3. Female is greater than or equal to 25 years of service get: chicken sandwich, apple pie, coffee.
4. Female less than 25 years of service get: chicken nuggets, coke, sundae.
Please provide the solution as a flowchart.
Explanation / Answer
public class TestScores { double[] scoresArray; double average; /** * Constructor * @param double[] scores */ public TestScores(double[] scores) { this.scoresArray = new double[scores.length]; try { for(int i = 0; i 100 )) throw new IllegalArgumentException(Double.toString(this.scoresArray[i])); } this.calcAverage(); } catch(IllegalArgumentException e) { System.out.println("The Array contains Illegal values! " + e.getMessage() + " is Less than 0 or Greater than 100."); } } /** * private method to calculate the average of the array */ void calcAverage() { int count = 0; double sum = 0; for(int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.