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
marta [7]
3 years ago
9

Write a method named pay that accepts two parameters: a real number for a TA's salary, and an integer for the number of hours th

e TA worked this week. The method should return how much money to pay the TA. For example, the call pay(5.50, 6) should return 33.0.
The TA should receive "overtime" pay of 1 ½ normal salary for any hours above 8. For example, the call pay(4.00, 11) should return (4.00 * 8) + (6.00 * 3) or 50.0.
Computers and Technology
1 answer:
pochemuha3 years ago
6 0

Answer:

Following is the definition of method pay in Java:

public static double pay(double sal, int hr)

   {

 double pay;

 if(hr>8)

 {

  pay = sal*8 + (1.5*sal*(hr-8));

 }else  

  pay = sal*hr;

 return pay;

   }

Explanation:

Sample program to demonstrate above method:

public class Main

{

public static void main(String[] args) {

 System.out.println(pay(5.50, 6));

 System.out.println(pay(4.00, 11));

}

public static double pay(double sal, int hr)

   {

 double pay;

 if(hr>8)

 {

  pay = sal*8 + (1.5*sal*(hr-8));

 }else  

  pay = sal*hr;

 return pay;

   }

   }

Output:

33.0

50.0

You might be interested in
What does a computer use long-term memory, or ROM, for?
AysviL [449]
The answer is B

Explanation: In contrast, a computer's hard disk or SDD is its long-term memory, where things are stored more or less permanently. ... Nearly all computers also have some way to store information for longer-term access, too.

5 0
3 years ago
Which of the following is true about strings?
pickupchik [31]

Answer:

Your answer is option C, or the third option.

They do not let the user type in letters, numbers, and words.

Explanation:

Strings are defined as a sequence of characters literal, constant, or variable. These sequences are like an array of data or list of code that represents a structure. Formally in a language, this includes a finite(limited) set of symbols derived from an alphabet. These characters are generallu given a maximum of one byte of data each character. In longer languages like japanese, chinese, or korean, they exceed the 256 character limit of an 8 bit byte per character encoding because of the complexity of the logogram(character representing a morpheme((which is the simpliest morphological(form or structure) unit of language with meaning)) character with 8 bit (1 byte, these are units of data) refers to cpu(central processing unit) which is the main part of a computer that processes instructions, and sends signals.

5 0
3 years ago
Jeff decides that he would pay as much as $3,000 for a new laptop computer. He buys the computer and realizes consumer surplus o
Lady_Fox [76]

Jeff pay $2,300 for his computer.

b. $2,300

<u>Explanation:</u>

Consumer surplus can be defined as the amount that the consumer is willing to pay for a product or a service. The word surplus is a synonym for something extra or excess. It corresponds to the extra benefit that the consumer gets while buying something which may be the result of some discount, sale, or negotiation.  

Jeff realizes a consumer surplus of $700 while purchasing a laptop of $3000. As the consumer surplus is $700,

the amount Jeff has paid for the laptop is: $3000 - $700

                                          : $2300

6 0
3 years ago
Define the _make method, which takes one iterable argument (and no self argument: the purpose of _make is to make a new object;
Ksenya-84 [330]
This picture will show you the answer and guide the way to victory

7 0
3 years ago
Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’
tigry1 [53]

Answer:

The answer to this question can be described as follows:

Explanation:

The Pseudocode to this question can be described as follows:

start  \\ start process

Declaration of variable

Input_File records.txt

Output_File result.txt

string author_Name , title

int number_of_volume

open Input_File

open Output_File

input author_Name, title, number_of_volume from records.txt

while not eof \\ start loop and eof is end of file  

output author_Name

output title

output number_of_volume

end while  \\end loop

close records.txt  \\close file

close results.txt   \\close file

END \\end the code

8 0
3 years ago
Other questions:
  • Match each vocabulary word to its definition.
    14·1 answer
  • A ________ is a set of programs that manipulate the data within a database.
    12·1 answer
  • Enter a formula in cell b7 to calculate the average value of cells b2:b6
    13·1 answer
  • 4. Extrusion tools in Blender® duplicate vertices while keeping the geometry connected with the original vertices. (1 point)
    7·1 answer
  • Which is an example of static web page??
    9·2 answers
  • What are some of the benefits of project
    7·1 answer
  • Tara is creating a presentation for her science project about volcanoes. She added different animations to every slide for empha
    12·1 answer
  • Explica la importancia que tiene el plan de trabajo (cronograma) en los proyectos y porque se realiza antes de ejecutar la soluc
    8·1 answer
  • How you use ict today and how will you use it tomorrow
    14·1 answer
  • Visual Basic: What are arrays, please give an example code.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!