Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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; 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started