Skip to content

Conversation

@Islandec235
Copy link

No description provided.

return roundNumber(pay, 2);
}

double calculateSimplePercent(double amount,

Choose a reason for hiding this comment

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

аргумент метода лучше в одну строчку, если они помещаются в 120 символов

Copy link
Author

Choose a reason for hiding this comment

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

Принято

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

return roundNumber(amount + amount

Choose a reason for hiding this comment

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

тут тоже думаю не стоит переносить

Copy link
Author

Choose a reason for hiding this comment

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

Аналогично, принято

Scanner scanner = new Scanner(System.in);

System.out.println("Введите сумму вклада в рублях:");
amount = scanner.nextInt();

Choose a reason for hiding this comment

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

на мой взгляд приятнее читать код, когда написано int amount = scanner.nextInt(); Сразу видишь какой тип, глазами не бегаешь на верх. Тут, наверное, дело вкуса.

Copy link
Author

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