Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using C++, Complete the following tasks: Design a Job class with three data fields-Job number, time in hours to complete the Job, and per-hour rate
using C++,
Complete the following tasks:
Design a Job class with three data fields-Job number, time in hours to complete the Job, and per-hour rate charged for the Job.
Include overloaded extraction and insertion operators that get and display a Job's values.
Include overloaded + and - operators that return integers that indicate the total time for two Jobs, and indicate the difference in time between two Jobs, respectively.
Write a main()function demonstrating that all the functions work correctly.
Sample Run Enter job number 1234 Hours to complete 20 Rate per hour 12 Enter job number 4567 Hours to complete 40 Rate per hour 11 The difference between Job #1234 20 hours at $ 12 per hour and Job #4567 40 hours at $ 11 per hour is -20 hours ======================= Enter job number 6789 Hours to complete 30 Rate per hour 15 Enter job number 4563 Hours to complete 15 Rate per hour 20 The difference between Job #6789 30 hours at $ 15 per hour and Job #4563 15 hours at $ 20 per hour is 15 hours
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started