-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
This is main function comments
// 7% tax: 19*1.07 = 20.33
// 20% discount, 19% tax: (999*0.8)*1.19 = 951.05And output format is followings.
std::ostream& operator<<( std::ostream& os, Money money )
{
return os << money.value;
}So, I think output type is 'value' field type. Then 'value' field type is uint64_t.
cpp_software_design/G35_Decorator_1.cpp
Line 23 in 1f2fe52
| uint64_t value{}; |
cpp_software_design/G35_Decorator_1.cpp
Line 30 in 1f2fe52
| return Money{ static_cast<uint64_t>( money.value * factor ) }; |
If main comments is collect, it should change uint64_t to double(or float).
Metadata
Metadata
Assignees
Labels
No labels