Demonstration of inheritance and virtual functions in C#
- Install Mono
- Clone:
git clone [email protected]:artem-russkikh/inheritance-virtual-functions.git cd inheritance-virtual-functions
- Start app by running bash script:
./bin/run
Bash script ./bin/run will compile and run code of project
Class ierarchy, virtual functions:
Republic, Monarchy, Kingdom, State;
State -> Monarchy -> Kingdom
State -> Republic
Object initialization and performing queries:
- Names of all states, that age is smaller than 1000
- Kingdoms count
- Average age all states
- Name of oldest state
Interfaces
- Required: interface and abstract class
- Create an array of interface elements and place the various instances of the class hierarchy.
- Implement sorting array elements using standard interfaces and methods of the Array class.
- Implement a search element in the array, using standard interfaces and methods of the Array class.
- Implement in one of the classes of objects cloning method. Show cloning of objects.