Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

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

Open
Sevlaria wants to merge 4 commits intomain from
dev
Open

Консольное приложение Бычковой Дарьи #1
Sevlaria wants to merge 4 commits intomain from
dev

Conversation

@Sevlaria
Copy link
Owner

@Sevlaria Sevlaria commented Jun 25, 2023

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

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

@vlad-zotov vlad-zotov Jun 25, 2023

Choose a reason for hiding this comment

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

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


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

@vlad-zotov vlad-zotov Jun 25, 2023

Choose a reason for hiding this comment

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

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

output(countOfClient);
return;
}

Copy link

@vlad-zotov vlad-zotov Jun 25, 2023

Choose a reason for hiding this comment

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

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


t = false;

listOfProducts = listOfProducts + product + " " + coast + " \n";
Copy link

@vlad-zotov vlad-zotov Jun 25, 2023

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

Reviewers

1 more reviewer

@vlad-zotov vlad-zotov vlad-zotov left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /