/** * Write a description of class Throwses here. * * @author (your name) * @version (a version number or a date) */ public class Throwses implements Stretchable { // instance variables - replace the example below with your own private boolean stretched = false; /** * Vracit retezec popisujici objekt. * @return "Throwses: dressed/not dressed" */ public String toString(){ return "Throwses:" + (stretched?"dressed":"not dressed"); } public boolean putOn() { boolean canIPutOn = false; if (!stretched) { canIPutOn = true; stretched = true; } return canIPutOn; } public boolean putOff() { boolean canIPutOff = false; if (stretched) { canIPutOff = true; stretched = false; } return canIPutOff; } }