/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/fundamentals/tutorials/snippets/object-oriented-programming/InterestEarningAccount.cs
21 строка
554 B
Bartosz Klonowski
Fix the typo in the credit percentage of PerformMontEndTransactions (#36887)
07 сен 2023, 17:06
Не верифицирован
07 сен 2023, 17:06
6abb4dd
Код
Авторство
О чём код?
namespace OOProgramming; public class InterestEarningAccount : BankAccount { // <DerivedConstructor> public InterestEarningAccount(string name, decimal initialBalance) : base(name, initialBalance) { } // </DerivedConstructor> // <ApplyMonthendInterest> public override void PerformMonthEndTransactions() { if (Balance > 500m) { decimal interest = Balance * 0.02m; MakeDeposit(interest, DateTime.Now, "apply monthly interest"); } } // </ApplyMonthendInterest> }