-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 + " лет превратятся в " |
There was a problem hiding this comment.
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(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отлично выполненная работа!
No description provided.