Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: изменить стиль кода #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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