Write a method called fraction done that could be added to


Question: Write a method called fraction Done that could be added to the class Date Third Try in Display 4.4. The method fraction Done has a parameter target Day of type int (for a day of the month) and returns a value of type double. The value returned is the value of the day instance variable divided by the int parameter target Day. (So it returns the fraction of the time passed so far this month where the goal is reaching the target Day.) Use floating-point division, not integer division. To get floating-point division, copy the value of the day instance variable into a local variable of type double and use this local variable in place of the day instance variable in the division. (You may assume the parameter target Day is a valid day of the month that is greater than the value of the day instance variable.)

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a method called fraction done that could be added to
Reference No:- TGS02404339

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)