Abstract objects can have multiple implementations. Fortran does not offer a direct solution to declare them as an array. However, it is still possible to handle it. Check below how to do it: Abstract type: Several implementations: and Declare a dynamic array of concrete objects: Declare a dynamic array of the abstract type shapes: First,…
read more
by lincador
304
An abstract class is defined with the keyword abstract. It tells the class it cannot be instantiated. On the other hand, it can be used as shared behavior between related classes. That’s when a subclass is created by referring its parent. How to define an abstract class: Note two procedures are defined: getSpecies implementation is…
read more