Abstract Class

noun

say it: “AB-strakt klas” /ˈæbstrækt klæs/

A C# class marked abstract that can't be created on its own and is only inherited from, often with methods left to fill in.

What is an Abstract Class?

An abstract class is a class that you cannot create an instance of. It is a class that you must extend in order to use it. An abstract class does not yet have enough details to be useful.

Abstract classes define some data and functionality that all child classes have in common.

Abstract classes are one way to introduce polymorphism into your project.

public abstract class Building
{
    // variables and functions here
}

In a sentence

  • “Shape is an abstract class, so we create circles and squares, never a plain shape.”

Level: Journeyman · More OOP terms at this level

Updated