Question: Need help with this Strings/Methods question! N class Dinosaur( private int height; // The height of a dinosaur in feet private int weight; // The

Need help with this Strings/Methods question!

Need help with this Strings/Methods question! N class Dinosaur( private int height;N

// The height of a dinosaur in feet private int weight; //

class Dinosaur( private int height; // The height of a dinosaur in feet private int weight; // The weight of a dinosaur in pounds private String color; //The color of the dinosaur public Dinosaur (int height, int weight, String color)( this.height - height; this.weight - weight; this.color - color; public Dinosaur (String color)( this. color = color; this.height - 0; this.weight - 0; public void eat(int mass) if(isNegative(mass)) return; this.weight +- mass; public void grow(int amount)H if (isNegative(amount)) return; this.height +- amount; private boolean isNegative(int value)I if (value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!