Question: Design and implement a Money class for calculations involving dollars and cents where arithmetic has to be accurate to the last cent using the 4/5
Design and implement a Money class for calculations involving dollars and cents where arithmetic has to be accurate to the last cent using the 4/5 rounding rule (.5 of a cent rounds up; anything less than .5 rounds down). Represent a monetary amount as a number of cents in a long int, but input and output as dollars and cents, e.g., $123.45. Do not worry about amounts that don’t fit into a long int.
Step by Step Solution
3.30 Rating (165 Votes )
There are 3 Steps involved in it
SOLUTION include include include include using namespace std class Money long cents string currency ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2083_61d6ac3448b06_853056.pdf
180 KBs PDF File
2083_61d6ac3448b06_853056.docx
120 KBs Word File
