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

Никита Филипенко, Когорта 12, Консольное приложение No1#1

Open
Swart03 wants to merge 6 commits intomain from
dev
Open

Никита Филипенко, Когорта 12, Консольное приложение No1 #1
Swart03 wants to merge 6 commits intomain from
dev

Conversation

@Swart03
Copy link
Owner

@Swart03 Swart03 commented Aug 30, 2023

No description provided.

Copy link

@ArturNurtdinov ArturNurtdinov left a comment

Choose a reason for hiding this comment

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

Хорошая работа!

}

void printProductList(int people) {
String roundedPrice = PriceFormat.roundPrice(productListPrice / people);
Copy link

@ArturNurtdinov ArturNurtdinov Aug 30, 2023

Choose a reason for hiding this comment

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

Лучше добавить проверку параметра people, чтобы случайно не поделить на 0, если в будушем эту функцию будет кто-то переиспользовать

void printProductList(int people) {
String roundedPrice = PriceFormat.roundPrice(productListPrice / people);
System.out.println(productList.toString());
System.out.println("С каждого человека " + roundedPrice+ " " + PriceFormat.rubInflection(productListPrice / people));
Copy link

@ArturNurtdinov ArturNurtdinov Aug 30, 2023

Choose a reason for hiding this comment

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

productListPrice / people можно посчитать 1 раз, записать результат в переменную и ей пользоваться

@@ -0,0 +1,24 @@
import java.util.Scanner;

public class PeopleAmount {
Copy link

@ArturNurtdinov ArturNurtdinov Aug 30, 2023

Choose a reason for hiding this comment

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

Я бы назвал класс PeopleAmountReader, так будет понятнее, за что он отвечает

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@ArturNurtdinov ArturNurtdinov ArturNurtdinov 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 によって変換されたページ (->オリジナル) /