Inheritance and Polymorphism. Upcasting and Downcasting
*Inheritance. Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance the information is made manageable in a hierarchical order. The class which inherits the properties of other is known as subclass (derived class, child class) and the class whose properties are inherited is known as superclass (base class, parent class). extends is the keyword used to inherit the properties of a class. Example: package Main ; public class Car { private Integer speed ; private String color ; private Integer seatCount ; public Integer getSpeed () { return speed ; } public void setSpeed (Integer speed) { this . speed = speed ; } public String getColor () { return color ; } public void setColor (String color) { this . color = color ; } public Integer getSeatCount () { return seatCount ; } public void setSeat...