ISM 3255 Assignment 7 Solved
Read the code given to you carefully and make sure you understand every line of it. Pay attention to:
1- How class Car and Plane inherit from Vehicle using “:” symbol
2- Find Keywords “base”, “virtual”, and “override” and make sure you understand them.
This assignment can be done by removing 1 line and adding 6 lines of code!
1- Modify the code for the method “Move” in the classes Vehicle, Car, and Plane to customize the moving as follows:
a. If the vehicle is a Plane, the method should print “Flying Plane <Vehicle ID> to <Destination Country>”
b. If the vehicle is a car, the method should print “Driving Car <Vehicle ID> to <Destination Country>” only if the destination continent is the same as the current continent
c. If the vehicle is a car, the method should print “Car <Vehicle ID> can’t drive to <Destination Country>” only if the destination continent is different than the current continent
Here is the correct output for the sample input given in your Program class.
Instructions for Submission
1. Your code should start with these two lines:
a. //Group Number: <your group number>
b. //PRESENT Members <members working on this assignment>
2. Save your program as A7_yourGroupNumber.cs.
3. Submit the .cs file as an attachment using the E-Learning Assignment tool.
Not following the instruction will result in losing some of your assignment points