Question: Question 4 10 pts public class Tree { private double height; private int limbs; private String genus; private String region; public Tree(double height, int limbs,

 Question 4 10 pts public class Tree { private double height;

Question 4 10 pts public class Tree { private double height; private int limbs; private String genus; private String region; public Tree(double height, int limbs, String genus, String region) { this.height = height; this. limbs = limbs; this.genus = genus; this.region = region; public void grow() { height *= 2; limbs += 4; } public Tree seed() { return new Tree(0, 0, genus, region); } } Override the equals method for this class. You may assume that you are working inside the body of the class. Please include any annotations that are appropriate. Two Tree objects should be considered equal if they have the height, same number of limbs, same genus, and the same region

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!