Assignment 2: Object-Oriented Programming
### Task 1: Creating a Base Class
- Define a base class 'Animal' with a method 'speak' that prints 'Animal makes a sound'.
### Task 2: Inheritance and Method Overriding
- Create a derived class 'Dog' that inherits from 'Animal' and overrides 'speak' to print 'Woof!'.
### Task 3: Multiple Inheritance
- Implement a second parent class 'Pet' with an additional method.
- Have 'Dog' inherit from both 'Animal' and 'Pet'.
### Task 4: Encapsulation
- Create a class 'BankAccount' with private attributes for balance and methods to deposit and
withdraw money.
### Task 5: Polymorphism
- Create multiple classes (e.g., Dog, Cat) that implement a common method 'speak' differently.
Assignment 2: Object-Oriented Programming
### Task 1: Creating a Base Class
- Define a base class 'Animal' with a method 'speak' that prints 'Animal makes a sound'.
### Task 2: Inheritance and Method Overriding
- Create a derived class 'Dog' that inherits from 'Animal' and overrides 'speak' to print 'Woof!'.
### Task 3: Multiple Inheritance
- Implement a second parent class 'Pet' with an additional method.
- Have 'Dog' inherit from both 'Animal' and 'Pet'.
### Task 4: Encapsulation
- Create a class 'BankAccount' with private attributes for balance and methods to deposit and
withdraw money.
### Task 5: Polymorphism
- Create multiple classes (e.g., Dog, Cat) that implement a common method 'speak' differently.
Assignment 2: Object-Oriented Programming
### Task 1: Creating a Base Class
- Define a base class 'Animal' with a method 'speak' that prints 'Animal makes a sound'.
### Task 2: Inheritance and Method Overriding
- Create a derived class 'Dog' that inherits from 'Animal' and overrides 'speak' to print 'Woof!'.
### Task 3: Multiple Inheritance
- Implement a second parent class 'Pet' with an additional method.
- Have 'Dog' inherit from both 'Animal' and 'Pet'.
### Task 4: Encapsulation
- Create a class 'BankAccount' with private attributes for balance and methods to deposit and
withdraw money.
### Task 5: Polymorphism
- Create multiple classes (e.g., Dog, Cat) that implement a common method 'speak' differently.
Assignment 2: Object-Oriented Programming
### Task 1: Creating a Base Class
- Define a base class 'Animal' with a method 'speak' that prints 'Animal makes a sound'.
### Task 2: Inheritance and Method Overriding
- Create a derived class 'Dog' that inherits from 'Animal' and overrides 'speak' to print 'Woof!'.
### Task 3: Multiple Inheritance
- Implement a second parent class 'Pet' with an additional method.
- Have 'Dog' inherit from both 'Animal' and 'Pet'.
### Task 4: Encapsulation
- Create a class 'BankAccount' with private attributes for balance and methods to deposit and
withdraw money.
### Task 5: Polymorphism
- Create multiple classes (e.g., Dog, Cat) that implement a common method 'speak' differently.
Assignment 2: Object-Oriented Programming
### Task 1: Creating a Base Class
- Define a base class 'Animal' with a method 'speak' that prints 'Animal makes a sound'.
### Task 2: Inheritance and Method Overriding
- Create a derived class 'Dog' that inherits from 'Animal' and overrides 'speak' to print 'Woof!'.
### Task 3: Multiple Inheritance
- Implement a second parent class 'Pet' with an additional method.
- Have 'Dog' inherit from both 'Animal' and 'Pet'.
### Task 4: Encapsulation
- Create a class 'BankAccount' with private attributes for balance and methods to deposit and
withdraw money.
### Task 5: Polymorphism
- Create multiple classes (e.g., Dog, Cat) that implement a common method 'speak' differently.