Skip to content

Commit 46fda63

Browse files
authored
Merge pull request #159 from UCL/mm_updates2025
[ToC] doesn't work :(
2 parents 4cae3a3 + e129eaa commit 46fda63

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

04cpp3/sec01Inheritance.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Inheritance
33
---
44

5-
[ToC]
6-
75
# Creating Sub-types with Inheritance
86

97
Inheritance is one of the most important concepts in object oriented design, which brings a great deal of flexibility to us as programmers. A class defines a type of object, and a class which inherits from it defines a sub-type of that type. For example, we might have a class which represents shapes, and sub-classes which represent squares, circles, and triangles. Each of these are shapes, and so should be able to be used in any context that simply requires a shape, but each will have slightly different data needed to define it and different implementations of functions to calculate its perimeter or area.

0 commit comments

Comments
 (0)