50.7k views
1 vote
Programming errors are of two types. If a payroll program that did not compute overtime hours would have one of the two types of errors, which is called a __________ error

1 Answer

3 votes

Final answer:

A payroll program that does not compute overtime hours would have a logic error.

Step-by-step explanation:

Programming errors are of two types: syntax errors and logic errors. A syntax error occurs when the program violates the rules of the programming language, resulting in a compile-time error. On the other hand, a logic error occurs when the program runs without any errors but produces incorrect results due to a flaw in the program's logic.

In the case of a payroll program that does not compute overtime hours, the error would be a logic error. This is because the program is not correctly calculating the overtime hours, leading to incorrect payroll calculations.

For example, if the program is supposed to calculate overtime hours for any hours worked beyond 40 hours in a week, but it fails to do so, it would be a logic error. As a result, employees may not receive their proper overtime pay.

User Andrew Khmylov
by
7.6k points