Create the class hierarchy plant-bush with all fields defined as private or protected according to the source code that uses the classes, where the bush class inherits from the plant class.
The plant class object should contain fields for name and height.
The bush class object should additionally contain fields for color and petal_count as a list of possible petal counts of blossoms for that kind of plant.
The following methods should be implemented for each class: constructor, destructor, and print method.
For the bush class, the method add_petal_count should be implemented.
Code that uses the classes:
```
// name, height in m
plant *p = new plant("oak", 13.5);
p->print(); // oak, 13.5 m high
cout << endl;
// name, height in m, blossom color
plant *m = new bush("lilacs", 2.7, "white");
m->add_petal_count(4);
m->add_petal_count(5);
m->add_petal_count(6);
m->add_petal_count(1); // ignored as less than 2
m->print(); // lilacs, 2.7 m high, white color, petals: 4 5 6
delete m;
delete p;
```
Expected output:
```
oak, 13.5 m high
lilacs, 2.7 m high
white color
possible counts of petals of blossoms: 4 5 6
```
(6 points) basic implementation – as described, field petal_count can be implemented as a vector of int.
(+2) virtual functions correctly applied as if fields were dynamic.
(+2) petal count value checking.
(+2) field petal_count implemented as a dynamic array of int.