Skip to content

commit#3

Open
BogdanovaDiana wants to merge 3 commits into
hyperskill:masterfrom
BogdanovaDiana:master
Open

commit#3
BogdanovaDiana wants to merge 3 commits into
hyperskill:masterfrom
BogdanovaDiana:master

Conversation

@BogdanovaDiana

Copy link
Copy Markdown

No description provided.

Comment thread src/coffeeMachine/Main.java Outdated
int coffee = cups * 15;
System.out.print("Write how many cups of coffee you will need: ");
System.out.println(cups);
System.out.print ("For ");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not think that it is good to use an additional space after print (before parentheses).
It is better to write System.out.print("For ");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is better to give more descriptive names of your commits rather than commit and again.

@BogdanovaDiana

Copy link
Copy Markdown
Author

Check if there are enough resources

if( min==cups) {
System.out.println("Yes, I can make that amount of coffee");
}
if( min<cups) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe is it better to use if-else construction here?

int coffee = scanner.nextInt();
System.out.println ("Write how many cups of coffee you will need: ");
int cups = scanner.nextInt();
int amount_w = water/200;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In Java, it is better to add one space between an operator and operands like water / 200;

@BogdanovaDiana

BogdanovaDiana commented Oct 21, 2018 via email

Copy link
Copy Markdown
Author

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.

3 participants