Skip to content

Conversation

@TimoshenkoAleksey
Copy link

No description provided.

Copy link

@DvoeglazovAleksey DvoeglazovAleksey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отличная работа, возможно нужны уточнения не большие.


public class DepositCalculator {

double calculateComplexPercent(double startDeposit, double yearRate, int depositPeriod) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public не требуется. Отлично!

return roundFinalDeposit(pay, 2);
}

double calculateSimplePercent(double startDeposit, double yearRate, int depositPeriod) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понятное название метода-отлично!

double finalDeposit = 0;
if (depositType == 1) {
finalDeposit = calculateSimplePercent(startDeposit, 0.06, depositPeriod);
} else if (depositType == 2) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else if без выравнивания , возможно можно лучше.

} else if (depositType == 2) {
finalDeposit = calculateComplexPercent(startDeposit, 0.06, depositPeriod);
}
System.out.println("Результат вклада: " + startDeposit + " за " + depositPeriod + " лет превратятся в "

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Перенос метода на новую строку не требуется если не превышает размер 120 символов.

public static void main(String[] args) {
new DepositCalculator().calculationDepositInterest();
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отлично выполненная работа!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants