Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract public class SomeZooWeight {
- int addend;
- int multiplier;
- double weight;
- public SomeZooWeight (int addend,int multiplier){
- this.addend = addend;
- this.multiplier = multiplier;
- weight = addend + multiplier * Math.random();
- }
- }
- public class Beast extends SomeZooWeight {
- int zero = 0;
- int one = 1;
- public Beast(int zero, int one){
- super(zero,one);
- // weight = zero + one * Math.random();
- }
- public void voice() {
- System.out.println( "Yell" + " " + "My weight is: " + weight + " gramms");
- }
- public void eat() {
- }
- public void move() {
- }
Advertisement
Add Comment
Please, Sign In to add comment