Discover the answers to your questions at Westonci.ca, where experts share their knowledge and insights with you. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

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.

Sagot :

Answer:

def shipvari(ship);

Cruiseship="" #defining a string

YearBuilt= ""

for i in range(ship);

if Cruiseship="";

print(CruiseShip)

Give the rest a try!