如何使交易费适用于所有交易 [英] How do I make the transaction fee apply to all transactions

查看:86
本文介绍了如何使交易费适用于所有交易的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++我已经附上了这篇文章aa google documnt,我已经完成了C ++的任务我完成了作业,我得到了90分,因为交易费用应该适用于每笔交易。 b $ b计算的利息总是0



有人可以帮我解决这个问题吗?



https: //docs.google.com/document/d/1YRz3DC37881NZ1OjSnVy2tzeRbRofq6qCeT81uXhJVE/edit?usp=sharing



我尝试过:



https://docs.google.com/document/d/1YRz3DC37881NZ1OjSnVy2tzeRbRofq6qCeT81uXhJVE/edit?usp=sharing

C++ I have attached to this post a a google documnt with the assignment I had to do with C++ I finished the assignment and I got a garde of 90 on it because "transaction fees should apply to every transaction separetly
interest calculated is always 0 "

Can somebody help me fix that ?

https://docs.google.com/document/d/1YRz3DC37881NZ1OjSnVy2tzeRbRofq6qCeT81uXhJVE/edit?usp=sharing

What I have tried:

https://docs.google.com/document/d/1YRz3DC37881NZ1OjSnVy2tzeRbRofq6qCeT81uXhJVE/edit?usp=sharing

推荐答案

您需要学习C ++ 来完成作业并实现该功能。仔细阅读你的任务,因为你应该检查一些输入。



交易费应该是你班级的会员功能所以你应该拨打一些电话:

You need to Learn C++ for your homework and implement the function. Read your task very carefully, because you should check some input.

The transaction fee should be a member function of your class and so you should make some call like:
transaction.applyFee();



费用超过你加入的费用最终金额或在吸气剂中添加如下:


The fee than you be added to the final amount or added in the getter like:

double getTotalAmount() {
 return amount + sumOfFees;
}


这篇关于如何使交易费适用于所有交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆