Write a class Plant
with a method grow()
. Implement child classes Tree
and Flower
that override the grow()
method to print their respective growth patterns.
Example 1:
Input: Tree
Output: "The tree is growing tall"
Example 2:
Input: Flower
Output: "The flower is blooming"