Skip to content

Conversation

@kostylevv
Copy link

No description provided.

@kostylevv kostylevv changed the title Stage #2: Count needed resources Stage #6 Processing coffee machine states Oct 4, 2018
Copy link
Contributor

@swsms swsms left a comment

Choose a reason for hiding this comment

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

Good solution, congratulations!

System.out.printf("%d ml of milk %n", cups*MILK);
System.out.printf("%d g of coffee beans %n", cups*BEANS);

CoffeeMachine machine = new CoffeeMachine.Builder(WATER_CONSUMPTION,
Copy link
Contributor

Choose a reason for hiding this comment

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

It is an interesting idea to apply Builder in this project!

int capacity = machine.getBrewCapacity();

if (capacity > cups) {
System.out.printf("Yes, I can make that amount of coffee (and even %d more than that) %n", capacity-cups);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here are only two new spaces before the line

} catch (Exception e) {
System.out.println(e.getMessage());
}
}//eof while
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it important to add a comment with eof of a construction? It will be not good in production Java projects. If you want to know about eof after a '}' you may install a plugin for your IDE. Not all members of your team may need to see it.

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.

2 participants