Discover a wealth of knowledge at Westonci.ca, where experts provide answers to your most pressing questions. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

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!