From d8190eeea8d15855d3f6e0685f19611c2b399e02 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 11 Apr 2025 05:04:40 -0400 Subject: [PATCH] update test 3 --- lectures/25_inheritance/students/student_test3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/25_inheritance/students/student_test3.cpp b/lectures/25_inheritance/students/student_test3.cpp index 423d3de..37b1094 100644 --- a/lectures/25_inheritance/students/student_test3.cpp +++ b/lectures/25_inheritance/students/student_test3.cpp @@ -24,6 +24,7 @@ class Student : public Human { public: Student(std::string n, int a, int s) : Human(n, a, s) {} + // note that the Student class never defines the name and age variables, but we can use them here, because of inheritance. void introduce() { std::cout << "Hello, I am " << name << ", and I am " << age << " years old. I’m majoring in 'How did I get here?' with a minor in 'It sounded easier when I signed up.'\n"; }