VIRTUAL AND ABSTRACT METHODS
Abstract method is a method that does not
have its implementation in the base class, and it should be implemented in the derived class. Abstract method can be declared only in abstract class.
What is the difference between the virtual and the abstract method?
The virtual method can have its implementation in the base class, abstract - no (body is empty);
An abstract method must be implemented in the derived class, the virtual method is not necessary to override.
Announcement of the abstract method:
[модифікатор доступу] abstract [тип] [ім'я методу] ([аргументи]);
The implementation of the abstract method in the derived class occurs in the same way as the override of the method - using the keyword override:
[модифікатор доступу] override [тип] [ім'я методу] ([аргументи])
{
// Реалізація методу
}