Skip to content

Commit 5a2b36b

Browse files
committed
Reworded
1 parent 1cae9f5 commit 5a2b36b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/cpp1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This file contains an example of using default arguments in C++ functions.
4040

4141
## OOP Examples
4242

43-
The next three videos feature examples of virtual/non-virtual functions, inheritance, and polymorphism. The are included in increasing order of complexity, but if you are new to OOP you may find the first animals.cpp to be easier to understand at first.
43+
The next three videos feature examples of inheritance, virtual/non-virtual functions, and polymorphism. The are included in increasing order of complexity, but if you are new to OOP you may find the first animals.cpp to be easier to understand at first.
4444

4545
VIDEO - [Overview of Inheritance, Polymorphism, & Virtual Functions in C++](https://youtu.be/eVczTPsEMgQ)
4646

@@ -79,4 +79,4 @@ This program contains the following class heirarchy:
7979

8080
In the loop where the paystubs are printed in staff.cpp the StaffMember print method is called since print is not virtual. This is as intended - the only thing that should be printed is the name/address/phone of the employee, not additional things such as SSN. To print that information we would need to use a variable or pointer of the derrived class type.
8181

82-
**NOTE**: Instead of writing the bonus method, I could have overloaded the pay method with a virtual method that took a parameter for the size of the bonus. Also, it probably would have been better to use variables for the 4 StaffMembers to avoid memory allocation.
82+
**NOTE**: Instead of writing the bonus method, I could have overloaded the pay method with a virtual method that took a parameter for the size of the bonus. Also, it probably would have been better to use variables instead of pointers for the 4 StaffMembers to avoid memory allocation.

0 commit comments

Comments
 (0)