Write a program named DemoJobs for Harold’s Home Services. The program should instantiate several Job objects and demonstrate their methods. The Job class contains four data fields—description (for example, “wash windows”), time in hours to complete (for example, 3.5), per-hour rate charged (for example, $25.00), and total fee (hourly rate times hours). Include properties to get and set each field except the total fee—that field will be read-only, and its value is calculated each time either the hourly fee or the number of hours is set. Overload the + operator so that two Jobs can be added. The sum of two Jobs is a new Job containing the descriptions of both original Jobs (joined by and), the sum of the time in hours for the original Jobs, and the average of the hourly rate for the original Jobs.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a program named DemoJobs for Harold’s Home Services. The program should instantiate several Job objects and demonstrate their methods. The Job class contains four data fields—description (for example, “wash windows”), time in hours to complete (for example, 3.5), per-hour rate charged (for example, $25.00), and total fee (hourly rate times hours). Include properties to get and set each field except the total fee—that field will be read-only, and its value is calculated each time either the hourly fee or the number of hours is set. Overload the + operator so that two Jobs can be added. The sum of two Jobs is a new Job containing the descriptions of both original Jobs (joined by and), the sum of the time in hours for the original Jobs, and the average of the hourly rate for the original Jobs.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education

Expert Answers to Latest Homework Questions

Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Interest expenses incurred on debt financing are Blank______ when analyzing a proposed investment.…
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: X 5. 416 REED'S APPLIED MECHANICS FOR ENGINEERS graving of 4. Working in cm, and taking moments…
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: Please help on all asked questions. Please show all work and steps. Please circle the final answer.
Q: -32 are similar matrices by finding an invertible matrix P satisfying A = P-¹BP (this is 0 2 1 -1 0…
Q: Here, you have 2 uniformly charged spheres at fixed positions on the x-axis. They have a radius of a…
Q: Determine the field E at point 'P' due to both spheres. At what position on the z-axis does the…
Q: Here, you have 2 uniformly charged spheres at fixed positions on the x-axis. They have a radius of a…
Q: Here, you have 2 uniformly charged spheres at fixed positions on the x-axis. They have a radius of a…