Skip to content

Консольное приложение Бычковой Дарьи - #1

Open
Sevlaria wants to merge 4 commits into
mainfrom
dev
Open

Sevlaria wants to merge 4 commits into
mainfrom
dev

Conversation

@Sevlaria

Copy link
Copy Markdown
Owner

Консольное приложение по разделению счетов между клиентами

Scanner scanner = new Scanner(System.in);
System.out.println("Какой товары вы желаете положить в корзину?");
product = scanner.nextLine();
while (t == false) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Привет! Рекомендую применить к файлу автоформатировние. Сочетание клавиш Alt + Ctrl + L. Отформатированный код проще читать.

Comment thread src/main/java/Calculator.java Outdated

public class Calculator {
String listOfProducts = "Добавленные товары:\n";
Double coast;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

опечаточка, cost - цена, coast - берег :)

Comment thread src/main/java/Calculator.java Outdated
output(countOfClient);
return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

пустые строки могут улучшить читаемость кода, но не в этом случае. Рекомендую их удалить.

Comment thread src/main/java/Calculator.java Outdated

t = false;

listOfProducts = listOfProducts + product + " " + coast + " \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.

здесь тоже можно использовать String.format для сложения строк. Так будет эффективнее.

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