OOP Assignment
Description
This project demonstrates Object-Oriented Programming (OOP) concepts in Python, focusing on class and polymorphism.
Instructions
Assignment 1: Design Your Own Class! ποΈ
Create a class representing anything you like (a Smartphone, Book, or even a Superhero!).
Add attributes and methods to bring the class to life!
Use constructors to initialize each object with unique values.
Add an inheritance layer to explore polymorphism or encapsulation.
Activity 2: Polymorphism Challenge! π
Create a program that includes animals or vehicles with the same action (like move()). However, make each class define move() differently (for example, Car.move() prints "Driving" π, while Plane.move() prints "Flying"
Concepts Covered
Classes & Objects β Creating custom data types.
Inheritance β Subclasses (Car, Plane, Boat) inherit from a base class (Vehicle).
Polymorphism β Each subclass defines its own version of the move() method.
Method Overriding β Subclasses replace the parent class's move() method with their own.
Files
pet.py β Demonstrates Designing Your Own Class adding attributing and methods.
animals.py β Demonstrates polymorphism with different types of animals.
README.md β Project description and instructions.