Note Constructor Derived Class Call Base Class S Setunits Function Also Need Virtual Destr Q37024633

Container + units: string + getVolume): double +toString0: string +getUnits(): string + setUnits(units: string): void Cylinde

Note that the constructor for each derived class should call thebase class’s setUnits function. Also, you will need a virtualdestructor for Container. Test these classes thoroughly in the mainsource file by creating objects of all the derived classes on theheap and storing them in a vector as unique pointers to Containers.Test that you have overloaded == properly to allow programmers toprevent duplicates. Also test that you have overloaded the properoperator to allow the sort algorithm to sort all types ofcontainers by

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.