Skip to content

Мой первый калькулятор счета. - #1

Open
Insaf159 wants to merge 4 commits into
mainfrom
dev
Open

Insaf159 wants to merge 4 commits into
mainfrom
dev

Conversation

@Insaf159

@Insaf159 Insaf159 commented Nov 8, 2023

Copy link
Copy Markdown
Owner

Привет! Сделал сравнение между ветками своего репозитория.

Comment thread src/main/java/Calculator.java Outdated
Scanner scanner = new Scanner(System.in);

double totalCost = 0.00;
void Calculate (){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

имя метода Calculate следует начинать с маленькой буквы, чтобы соответствовать общепринятому стилю кодирования Java.

Comment thread src/main/java/Calculator.java Outdated
} else {
System.out.println("Текущая сумма добавленных товаров: " + totalCost + " рублей");
}
allProducts += productName + "\n";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Минорное замечание: Использование переменной allProducts для накопления строк неэффективно по памяти, лучше использовать StringBuilder.

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