Based on question 4, imagine that you had a class called Vehicle and an object called myVehicle that could be either Car, Motorcycle, or Boat. Imagine that you wrote the following: [myVehicle prep];...

Based on question 4, imagine that you had a class called Vehicle and an object called myVehicle that could be either Car, Motorcycle, or Boat. Imagine that you wrote the following: [myVehicle prep]; [myVehicle getGas]; [myVehicle service]; Do you see any advantages of being able to apply an action to an object that could be from one of several classes?



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here