0

can anyone help me in this code please!!!

Home Work 4 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 "31,25" (25*125 Cents) Work::reset(w); // reset working time to zero bool okay = w->subtract (60); // attempts to subtract 60 minutes // returns false, if not sufficient time

30th Jun 2017, 11:29 PM
EOnour
EOnour - avatar
9 ответов
+ 6
$15/hr but payed by the minute yes?
1st Jul 2017, 12:46 AM
jay
jay - avatar
+ 4
those payrates though
1st Jul 2017, 12:31 AM
jay
jay - avatar
+ 3
Here is what I came up with. It appears in your question that a pointer to a Work object was created to use the subtract method, but I'm sure you can figure that one out :) Happy coding! https://code.sololearn.com/ckxubz3HQpIO
1st Jul 2017, 12:12 AM
Zeke Williams
Zeke Williams - avatar
+ 2
An entire $1.50 an hour
1st Jul 2017, 12:36 AM
Zeke Williams
Zeke Williams - avatar
+ 1
Ah yes forgot a zero haha nice catch
1st Jul 2017, 1:39 AM
Zeke Williams
Zeke Williams - avatar
+ 1
13th Jan 2019, 6:11 PM
Zeke Williams
Zeke Williams - avatar
+ 1
Abdul Ahad yes, I still learn something new about it all the time, and I have been using C++ for like 3 years
13th Jan 2019, 7:14 PM
Zeke Williams
Zeke Williams - avatar
0
Is this in c++??¿¿
13th Jan 2019, 5:30 PM
Abdul Ahad
Abdul Ahad - avatar
0
Zeke Williams now i am kinda having the idea how vast cpp is. Thanks.
13th Jan 2019, 7:01 PM
Abdul Ahad
Abdul Ahad - avatar