/** * Write a description of class LimsaAutomaatti here. * * @author TUOMAS ANTTILA * @version 0.10 */ public class LimsaAutomaatti { // instance variables - replace the example below with your own protected int pullot = 50; protected int eurot = 0; /** * Constructor for objects of class LimsaAutomaatti */ public void lisääEuro() { // initialise instance variables eurot = eurot + 1; System.out.println("Euro kilahtaa koneeseen sisään"); } /** * An example of a method - replace this comment with your own * * @param y a sample parameter for a method * @return the sum of x and y */ public void ostaPullo() { // put your code here eurot = eurot - 1; pullot = pullot - 1; System.out.println("Pullo ilimestyy konneesta ulos."); } public void rahatTakaisin() { System.out.println(eurot + " euroa palautettiin."); eurot = 0; } }