Files

24 lines
559 B
Java

public class Cheese extends FridgeItem {
/**
* Creates a new cheese with the weight, name and color.
*
* @param weight The weight.
* @param name The name.
* @param color The color.
*/
public Cheese(double weight, String name, String color) {
super(weight, name, color);
}
/**
* Returns a string representation of the cheese.
*
* @return A string representation of the cheese.
*/
@Override
public String toString() {
return "Cheese: " + super.toString();
}
}