All pastes #455504 Raw Edit

Tumassi

public text v1 · immutable
·published 2007-04-24 06:58 UTC
rendered paste body

/**
 * 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;
    }
    
}