Lecture overview -- Keyboard shortcut: 'u'  Previous page: Abstract Classes -- Keyboard shortcut: 'p'  Next page: Abstract Properties -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 7 : 37
Object-oriented Programming in C#
Abstract classes, Interfaces, and Patterns
Abstract classes and abstract methods in C#

An abstract Stack without data representation, but with some implemented operations

/user/normark/oop-csharp-1/sources/c-sharp/stack/abstract-stack/without-exceptions/stack.csAn abstract class Stack - without data representation - with a non-abstract ToggleTop method.


  • Detailed rules - some are surprising

    • Abstract classes

      • can be derived from a non-abstract class

      • do not need not to have abstract members

      • can have constructors

    • Abstract methods

      • are implicitly virtual

Go to exerciseA specialization of Stack
Go to exerciseCourse and Project classes