The JobCalculator class is used by a consultancy firm to calculate the hourly rate they charge their customers and the loyalty reward points their customers earn, based upon the number of hours worked to complete a job. If a customer's job requires 1000 or more hours, that customer is regarded as a VIP. Details are described in the table below. Hours Worked Hourly Rate ($) Loyalty Points per Hour VIP Less than 10 100 No 10 or more, but less than 200 70 No 200 or more, but less than 1000 65 8 No 1000 or more 50 10 Yes The JobCalculator class must have a constructor which takes as an argument the number of hours worked. The class must also have a mutator (setter) method for the number of hours worked. The class must have "getter" (accessor) methods that return the hourly rate, the loyalty points per hour, and whether the customer is a VIP, based upon the number of hours worked. Furthermore, the class must have: A method which returns the total value of the job using the number of hours worked and the relevant hourly rate. A method which returns the total number of loyalty points accrued based upon the number of hours worked. Write a Java program that instantiates a JobCalculator object using the constructor described above. Obtain from the user, via keyboard, the hours worked on the job. Then, using the object's accessors to retrieve the relevant information, display the appropriate hourly rate, loyalty points per hour, the total cost of the job, the total number of loyalty points accrued, and whether the customer is a VIP or not.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Would downvote for incorrect answer

The JobCalculator class is used by a consultancy firm to calculate the hourly rate they charge their customers and the
loyalty reward points their customers earn, based upon the number of hours worked to complete a job. If a customer's job
requires 1000 or more hours, that customer is regarded as a VIP. Details are described in the table below.
Hours Worked
Hourly Rate ($)
Loyalty Points per Hour
VIP
Less than 10
100
No
10 or more, but less than 200
70
No
200 or more, but less than 1000
65
No
1000 or more
50
10
Yes
The JobCalculator class must have a constructor which takes as an argument the number of hours worked. The class
must also have a mutator (setter) method for the number of hours worked. The class must have "getter" (accessor)
methods that return the hourly rate, the loyalty points per hour, and whether the customer is a VIP, based upon the
number of hours worked. Furthermore, the class must have:
A method which returns the total value of the job using the number of hours worked and the relevant hourly rate.
A method which returns the total number of loyalty points accrued based upon the number of hours worked.
Write a Java program that instantiates a JobCalculator object using the constructor described above. Obtain from the
user, via keyboard, the hours worked on the job. Then, using the object's accessors to retrieve the relevant information,
display the appropriate hourly rate, loyalty points per hour, the total cost of the job, the total number of loyalty points
accrued, and whether the customer is a VIP or not.
Transcribed Image Text:The JobCalculator class is used by a consultancy firm to calculate the hourly rate they charge their customers and the loyalty reward points their customers earn, based upon the number of hours worked to complete a job. If a customer's job requires 1000 or more hours, that customer is regarded as a VIP. Details are described in the table below. Hours Worked Hourly Rate ($) Loyalty Points per Hour VIP Less than 10 100 No 10 or more, but less than 200 70 No 200 or more, but less than 1000 65 No 1000 or more 50 10 Yes The JobCalculator class must have a constructor which takes as an argument the number of hours worked. The class must also have a mutator (setter) method for the number of hours worked. The class must have "getter" (accessor) methods that return the hourly rate, the loyalty points per hour, and whether the customer is a VIP, based upon the number of hours worked. Furthermore, the class must have: A method which returns the total value of the job using the number of hours worked and the relevant hourly rate. A method which returns the total number of loyalty points accrued based upon the number of hours worked. Write a Java program that instantiates a JobCalculator object using the constructor described above. Obtain from the user, via keyboard, the hours worked on the job. Then, using the object's accessors to retrieve the relevant information, display the appropriate hourly rate, loyalty points per hour, the total cost of the job, the total number of loyalty points accrued, and whether the customer is a VIP or not.
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY