16 lines
493 B
Java
16 lines
493 B
Java
|
package com.iluwatar;
|
||
|
|
||
|
public class ImmutableStew {
|
||
|
|
||
|
private StewData data;
|
||
|
|
||
|
public ImmutableStew(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
|
||
|
data = new StewData(numPotatoes, numCarrots, numMeat, numPeppers);
|
||
|
}
|
||
|
|
||
|
public void mix() {
|
||
|
System.out.println(String.format("Mixing the immutable stew we find: %d potatoes, %d carrots, %d meat and %d peppers",
|
||
|
data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()));
|
||
|
}
|
||
|
}
|