07-17-2014, 06:15 PM
Solution Guidelines:
In Load () function of Transport class, a message should be displayed “Goods are loaded successfully”.
In Unload () function of Transport class, a message should be displayed “Goods are unloaded successfully”.
Ship() function of each class should display a message representing each class. Each class will display their own message when this function call will be made. For example, against Ship () function of Land_Transport class, message “In land transport, shipping is done via Truck" should be displayed and against Ship () function of Air_Transport class, message “In air transport, shipping is done via air cargo" should be displayed.
Behavior of ship () function must be implemented using polymorphism.
In Load () function of Transport class, a message should be displayed “Goods are loaded successfully”.
In Unload () function of Transport class, a message should be displayed “Goods are unloaded successfully”.
Ship() function of each class should display a message representing each class. Each class will display their own message when this function call will be made. For example, against Ship () function of Land_Transport class, message “In land transport, shipping is done via Truck" should be displayed and against Ship () function of Air_Transport class, message “In air transport, shipping is done via air cargo" should be displayed.
Behavior of ship () function must be implemented using polymorphism.
