Polymorphism
Polymorphism is an important implementation in the inheritance. It is achieved through having several subclass that inherits the characteristics of the parent class while having the different functionalities. Giving this nature of polymorphism, the program is able to have specialised subclasses that perform different tasks without having to rewrite the whole program.
The main method for achieving polymorphism are overriding and overloading. Overriding implements the subclass methods and improve or specialise them upon the parent class methods. This is hugely useful in GUI, since we need to make sure the consistency in our graphical design, while we need to have each window to perform different functions. Therefore, we can design a basic parent class that has the general structure, and then have a great range of subclasses to implement different functionalities.
As for overloading, we can design different methods that have the same name while be inputed with different fields and perform different tasks with given types and number of input. This can make sure that users can input a great variety and get valid result for each of their input.

Though their names can be easily confused, the pictures easily differentiate them: the overloading shows different methods (methods with different names); overriding shows an arrow being changed by an another one.
Abstract classes and methods
Abstract classes are classes that contain at least one abstract method. An abstract method is a method that is declared, but contains no implementation. Abstract classes and methods must be declared abstract, for example “public abstract class Racer.”
\
In the example, Racer is an abstract class, containing abstract method draw ();

The method is declared abstract so that it can have different implementations in subclasses Hare and Tortoise. They draw different animals.
Programming Activity 2

In fact the places that we need to code are not much. We only need to add the objects to the array list and then draw each elements in the array lists if the condition is met. This, again, reveals the convenience of abstraction; it does not require the rewriting and in-depth examine of previous code to improve and work on a code.
