Question: write a class Work whose objects represent working times (in whole minutes) and salary rates (in whole cents per minute). With this class, the following

write a class Work whose objects represent working times (in whole minutes) and salary rates (in whole cents per minute). With this class, the following operation shall be possible: Work W (25, 60); // 25 cent/min, 60 min W.add (65); // add 65 minutes working time W.printSalary (); // prints salary Work *w=new Work(50,100); bool okay = w->subtract (60); // attempts to subtract 60 minutes // returns false, if not sufficient time // available (time remains unchanged)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!