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