From 38587de9ab5a268b5bcb2f95916b0f78f85dcaa7 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 1 Dec 2023 01:24:06 -0500 Subject: [PATCH] line breaks --- lectures/26_inheritance/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lectures/26_inheritance/README.md b/lectures/26_inheritance/README.md index 5f05805..1dfb3f3 100644 --- a/lectures/26_inheritance/README.md +++ b/lectures/26_inheritance/README.md @@ -129,7 +129,10 @@ virtual for this chain of calls to happen. ## 26.6 Public, Private and Protected Inheritance -- Notice the line class Savings_Account : public Account { +- Notice the line +```cpp +class Savings_Account : public Account { +``` This specifies that the member functions and variables from Account do not change their public, protected or private status in SavingsAccount. This is called public inheritance. - protected and private inheritance are other options: @@ -163,8 +166,7 @@ public: ## 26.8 Is-A, Has-A, As-A Relationships Among Classes -- When trying to determine the relationship between (hypothetical) classes C1 and C2, try to think of a logical -relationship between them that can be written: +- When trying to determine the relationship between (hypothetical) classes C1 and C2, try to think of a logical relationship between them that can be written: – C1 is a C2, – C1 has a C2, or – C1 is implemented as a C2