Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a public method that takes two arguments: a double representing the number of hours worked and a double representing the hourly pay, and returns

Write a public method that takes two arguments: a double representing the number of hours worked and a double representing the hourly pay, and returns a double representing the weekly pay. If the hours are less than or equal to 40, the weekly pay should be hours times hourly pay. If the hours are greater than 40 and less than 80, the weekly pay should be 40 times the hourly pay, plus the hours in excess of 40 times hourly pay times 1.5. If the hours worked are entered as less than zero or greater than 80, print an error message saying "incorrect number of hours entered" and return 0.0;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago