repo update

This commit is contained in:
2022-04-04 15:41:31 -05:00
parent 1156c003f9
commit 16003d1715
20 changed files with 13101 additions and 13046 deletions

28
Lecture/Week5/main.cpp Normal file
View File

@@ -0,0 +1,28 @@
#include <iostream>
using namespace std;
class Pet{
public:
string name;
void set_data(int data){}
};
class Cat: public Pet{
public:
int fish;
void set_data(int data){fish = data;}
};
class Bird: public Pet{
public:
int seed;
void set_data(int data){seed = data;}
};
int main(){
Pet* C1 = new Cat;
Pet* C2 = new Cat;
C1->name = "Cat1";
C1->set_data(1);
}