Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/DepositCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

public class DepositCalculator {

double calculateComplexPercent(double amount, double annualRate, int depositPeriod) {
private double calculateComplexPercent(double amount, double annualRate, int depositPeriod) {
double pay = amount * Math.pow((1 + annualRate / 12), 12 * depositPeriod);
Copy link
Author

Choose a reason for hiding this comment

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

Привет! 1 отступ = 4 пробела. Почему-то мне кажется, что последующая строка должна быть с отступом 8 пробелов. Но может я ошибаюсь и это используется только при переносе на новую строку?
Здесь 7 пробелов

return roundNumber(pay, 2);
}

double calculateSimplePercent(double amount, double annualRate, int depositPeriod) {
private double calculateSimplePercent(double amount, double annualRate, int depositPeriod) {
return roundNumber(amount + amount * annualRate * depositPeriod, 2);
Copy link
Author

Choose a reason for hiding this comment

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

а здесь 8 пробелов

}

double roundNumber(double value, int places) {
private double roundNumber(double value, int places) {
double scale = Math.pow(10, places);
return Math.round(value * scale) / scale;
}

void calculateDepositValue() {
public void calculateDepositValue() {
int period;
int action;
Scanner scanner = new Scanner(System.in);
Expand Down