Repository navigation
Conversation
gusar-off
reviewed
Jan 17, 2023
| @@ -0,0 +1,24 @@ | |||
| import java.util.Scanner; | |||
|
|
|||
| public class peopleCounter { | |||
There was a problem hiding this comment.
Классы по код стилю нужно называть в PascalCase
| default: | ||
| ruble = "рублей"; | ||
|
|
||
| System.out.println(foodList + "\n" + String.format(totalResult, priceSum) + " руб." + "\n" + String.format(personalResult, eachPay) + " " + ruble); |
There was a problem hiding this comment.
В таких случаях для вывода лучше использовать System.out.printf, ему можно передать параметры, которые будут подставлены в строку.
Owner
Author
There was a problem hiding this comment.
почитаю, как это работает
| if (foodPrice < 0) { | ||
| System.out.println("Стоимость блюда не может быть меньше 0, введите верное значение"); | ||
| } else { | ||
| System.out.println("Блюдо " + foodName + " за " + foodPrice + " руб. добавлено." + "\n" + "Добавьте еще одно блюдо или введите 'Завершить', чтобы узнать, сколько вы должны заплатить."); |
| String totalResult = "Общая сумма - %.2f"; | ||
| String personalResult = "Каждый должен заплатить по %.2f"; | ||
| String ruble; | ||
| if ((int) eachPay % 100 >= 10 && (int) eachPay % 100 <= 20) { |
There was a problem hiding this comment.
На самом деле будет достаточно проверить интервал от 11 до 14 включительно
Owner
Author
There was a problem hiding this comment.
боюсь трогать, пусть работает)
Owner
Author
|
критические ошибки исправлены, также исправлена часть некритических |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1-я проектная работа, 1-я итерация