public class Underwear{
String color;
int length, width;
public tuna(String color, int length, int width){
this.color = color;
this.length = length;
this.width = width;
}
public void wear(){
System.out.println("You wear the underwear.");
}
public void examine(){
System.out.println("The underwear is " + color + " and the size is " + length + ", " + width);
}
public void hangUp(){
System.out.println("You hang up the underwear.");
}
public String getColor(){
return color;
}
public int getLength(){
return length;
}
public int getWidth(){
return width;
}
}
I just realized that the examine method kind of nullifies the purpose of the getSize method.


Sign In
Create Account


Back to top









