ProgLab3
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package food;
|
||||
|
||||
public class Garlic extends Vegetable{
|
||||
public Garlic() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "чеснок";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void peel() {
|
||||
this.changeTaste(Math.random()*0.2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user