Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Must use arrays in java language Question 1.1. Assume you are a programmer at a small company that has five departments, three practicing departments and
Must use arrays in java language
Question 1.1. Assume you are a programmer at a small company that has five departments, three practicing departments and two support departments (such as HR or finance). You are asked to write a Java program that calculates the salaries of consultants working at the company. Each consultant needs to input the number of hours he/she worked in each of the five departments. For each hour at a practicing department, a consultant makes 30$ and for each hour at a support department he/she makes 20$. Your Java program needs to: o ask the consultant to enter five numbers (the number of hours worked at each of the five departments) o call the method that will calculate the salary and return it - your method needs to have the header: public static double CalculateSalary (double D1, double D2, double D3, double D4, Double D5) Salary = D1*30 + D2*30 + D3*30 + D4*20 + D5*20 and display the salary of the consultantStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started