describe overriding methods assume that one day


Describe Overriding Methods ?

Assume that one day you've just finished your Car class. It's been plugged into your traffic simulation that is chugging along merrily simulating traffic. Then your pointy haired boss rolls in the door, and tells you that he requires the Car class to not accelerate past the 70 miles per hour (pointy haired bosses rarely understand the metric system) even if the car's a Ferrari along with a maximum speed in excess of 200 miles per hour.

What are you going to do? Your first reaction may be to change the class in which you already wrote so that it limits the speed of all the cars. Therefore you're using which class elsewhere and things will break if you modify it.

You could forms a fully new class in a different file, either by starting from scratch or through copying and pasting. This would work, but it would mean that if you found a bug in the Car class now you'd have to fix it in two files. And if you needed to add new methods to the Car class, you'd have to add them in two files. Still this is the best you could do if you were writing in C or a few another traditional language.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: describe overriding methods assume that one day
Reference No:- TGS0284635

Expected delivery within 24 Hours