Explain why the set location method need not be overridden


Problem

1. Every BMW is a vehicle. Should a class BMW inherit from the class Vehicle? BMW is a vehicle manufacturer. Does that mean that the class BMW should inherit from the class Vehicle Manufacturer?

2. Some books on object-oriented programming recommend using inheritance so that the class Circle extends the class java.awt.Point. Then the Circle class inherits the set Location method from the Point superclass. Explain why the set Location method need not be overridden in the subclass. Why is it nevertheless not a good idea to have Circle inherit from Point? Conversely, would inheriting Point from Circle fulfill the is-a rule? Would it be a good idea?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Explain why the set location method need not be overridden
Reference No:- TGS02636485

Expected delivery within 24 Hours