IDNLearn.com: Your go-to resource for finding precise and accurate answers. Get prompt and accurate answers to your questions from our community of knowledgeable experts.

Ship, CruiseShip, and CargoShip ClassesDesign a Ship class that has the following members:a. a member variable for the name of the ship (a string)b. a member variable for the year that the ship was built (a string)c. A constructor and appropriate accessors and mutatorsd. A virtual print function that displays the ship's name and the year it was built.