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
9 ответов
+ 6
$15/hr but payed by the minute yes?
+ 4
those payrates though
+ 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
+ 2
An entire $1.50 an hour
+ 1
Ah yes forgot a zero haha nice catch
+ 1
Abdul Ahad yes
+ 1
Abdul Ahad yes, I still learn something new about it all the time, and I have been using C++ for like 3 years
0
Is this in c++??¿¿
0
Zeke Williams now i am kinda having the idea how vast cpp is. Thanks.