[SOLVED] ISM 3255 Assignment 7

20.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)
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.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.