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

Спринт 2, консольное приложение 1#1

Open
FantasmasDev wants to merge 4 commits intomain from
dev
Open

Спринт 2, консольное приложение 1 #1
FantasmasDev wants to merge 4 commits intomain from
dev

Conversation

@FantasmasDev
Copy link
Owner

@FantasmasDev FantasmasDev commented May 29, 2023

No description provided.


public class Calc {
String listOfGoods ="";
Double totalCoast = 0.00;
Copy link

@vlad-zotov vlad-zotov May 30, 2023

Choose a reason for hiding this comment

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

можно использовать примитивный тип double вместо Double. Не критично.

public void askItem() {
Double itemCoast;
do {
Scanner sc = new Scanner(System.in);
Copy link

@vlad-zotov vlad-zotov May 30, 2023

Choose a reason for hiding this comment

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

здесь у тебя кажется лишний сканер, можно его убрать

System.out.println("Извините, но вы ввели не число, перезапустите программу");
break;
}
if (persons == 1) {
Copy link

@vlad-zotov vlad-zotov May 30, 2023

Choose a reason for hiding this comment

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

эту проверку удобно будет реализовать через оператор switch

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