1answer.
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
Grace [21]
4 years ago
10

Now imagine that we have a list of 5 employees who have each worked 45, 15, 63, 23, and 39 hours. We'll fix rate_of_pay at 10. P

ayroll wants to mail checks for each of these employees. Use a definite loop (for loop) to loop through the list of employee hours and print the appropriate pay statement. Your output should look something like: Paying 475.0 by direct deposit Paying 150.0 by mailed check Paying 630.0 by direct deposit Paying 230.0 by mailed check Paying 390.0 by direct deposit
Computers and Technology
1 answer:
Natali [406]4 years ago
7 0

Answer:

Hi there! The question is asking for a simple loop implementation that prints payment advice for Payroll.

Explanation:

Assuming that the payment method is “mailed check” for hours worked less than 30 and “direct deposit” for hours worked greater than 30, we can implement the function as below.  

 

hours_worked = [45, 15, 63, 23, 39]

payment_method = “mailed check”

for (int index = 0; index < 5; index++) {

   if hours_worked[index] > 30 {

      payment_method = “direct deposit”

   }

   print(“Paying “ + (hours_worked[index] * pay_rate) + “by “ + payment_method)

}

You might be interested in
Which of these is an effective color scheme?
irga5000 [103]

Answer:

Yellow on white.

Explanation:

Not to bright, soft, and easy to see.

4 0
3 years ago
Compound conditions require a computer to sense whether multiple conditions are true or false.
Anna71 [15]

Answer:

False

Explanation:

You can have multiple conditions in your while and for loops as well as your if statements.

4 0
3 years ago
Write a function called which_vowels_present that takes a single string parameter. Complete the function to return a list of str
romanna [79]

Answer:

import java.util.ArrayList;

import java.util.List;

public class Vowels {

   public static void main(String[] args) {

   String word = "I am David from Nigeria";

       System.out.println(which_vowels_present(word));

   }

   public static List which_vowels_present(String enteredWord){

       List<Character>list = new ArrayList<>();

       String word = enteredWord.toLowerCase();

       for (int i =0; i<word.length(); i++){

           if (word.charAt(i) == 'a' || word.charAt(i) == 'e' || word.charAt(i) == 'i'

                   || word.charAt(i) == 'o' || word.charAt(i) == 'u') {

               list.add(word.charAt(i));

           }

       }

       return list;

   }

}

Explanation:

  • Using Java programming Language
  • Import java.util.ArrayList; and java.util.List
  • Create the method which_vowels_present which accepts a string parameter
  • Within the method create a list object
  • Use a for loop to iterate the string. within the for loop use an if statement to check individual characters of the string if any is a vowel, add it to the list
  • return the list
  • In the main method, create a test string, call the method and pass the string as parameter

5 0
3 years ago
Propane also known as LP gas, is often mixed with about _______ percent of other gases, such as butane, propylene, and mercaptan
vitfil [10]

Answer:

30

Explanation:

Java - Using a method, how do I "write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. Your program must define and call the following method that returns the number of times the input character appears in the input string.

public static int countCharacters(char userChar, String userString)"

4 0
4 years ago
Ayuda pliz es para ya!!!!!<br> nesesito un codigo html que me muestre este texto
BartSMP [9]
Sorry I don’t understand your language I wish I could help you but I just don’t understand

3 0
3 years ago
Other questions:
  • Common icons found on the Windows desktop are _____.
    6·2 answers
  • The US government takes the protection of patients' private information very seriously. In 1996, went into effect. This law prot
    14·1 answer
  • Which group on the Home Ribbon contains the line spacing attribute?
    9·2 answers
  • Allow the user to enter a series of temperatures in degrees Celsius (C) ter-
    11·1 answer
  • I was walking in the rain with my Tim’s on steeping over puddles full of pain
    7·2 answers
  • Do most of you agree on a primary interpretation? Why?
    14·1 answer
  • Which of the following examples has four beats in each measure?
    12·2 answers
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • Write the following program: Use struct data type to store information about courses. Every course is characterized by the follo
    6·1 answer
  • What does GEOSYNCHRONICE SATELLITE use for?​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!