r/learnprogramming • • Apr 05 '22

Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them

Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.

Someone else who reads yours and does understand it, try to explain it to them to help them learn

1.6k Upvotes

738 comments sorted by

View all comments

Show parent comments

3

u/Rote515 Apr 05 '22

What language are you using? I’ve never head an interface called a class before. In C# though an Abstract class is a skeleton parent class that outlines how every child class will look. It can also implement functionality, that child classes can use. Beyond that each class can only inherit from a single abstract class.

Interfaces don’t implement functionality, they just define the functionality, you can also have many of them.

2

u/warlaan Apr 06 '22

Welcome to C# 8 where interfaces can have default implementations. Hooray for feature creep. ;-)

1

u/Brafaan Apr 06 '22

Yea lol exactly🤣