Question: Consider the following class declarations. public class Plant {public String name; public Plant(String name) {this.name = name;}} public class Vegetable extends Plant {public String colour;

Consider the following class declarations. public class Plant {public String name; public Plant(String name) {this.name = name;}} public class Vegetable extends Plant {public String colour; public double weightInKg; public Vegetable(String name, String colour, double weightInKg) {//////}} Write the body of the Vegetable class constructor as indicated by the comment lines in the answer box below. For example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
