# ============================================================
# HOMEWORK: Introduction to Python Classes
# ============================================================
# Complete this before Lesson 5
# Take your time - run the code as you go!
# Remember, feel free to message me any questions you have
# ============================================================


# ============================================================
# PART 1: What is a Class?
# ============================================================
#
# Think of a CLASS like a blueprint or template.
# Think of an OBJECT like something built from that blueprint.
#
# Example:
#   - "Dog" is a class (the concept of a dog)
#   - "Max" is an object (a specific dog)
#   - "Bella" is another object (another specific dog)
#
# Each dog has the same STRUCTURE (name, age, can bark)
# But different VALUES (Max is 3, Bella is 5)
# ============================================================

# Here's a simple Dog class - READ IT CAREFULLY:

class Dog:
    def __init__(self, name, age):
        # __init__ runs automatically when you create a new Dog
        # self.name means "this dog's name"
        self.name = name
        self.age = age

    def bark(self):
        # self refers to the specific dog calling this method
        print(f"{self.name} says: Woof!")

    def describe(self):
        print(f"{self.name} is {self.age} years old.")


# --- YOUR TASK 1A: Run this code ---
# Uncomment the lines below (remove the #) and run the file

# max_dog = Dog("Max", 3)
# bella_dog = Dog("Bella", 5)

# max_dog.bark()
# bella_dog.bark()

# max_dog.describe()
# bella_dog.describe()


# --- YOUR TASK 1B: Create your own dog ---
# Create a third dog with any name and age you want
# Then call bark() and describe() on it

# YOUR CODE HERE:




# ============================================================
# PART 2: Create Your Own Class - Student
# ============================================================
#
# Now YOU will create a class from scratch.
# Follow the steps below.
# ============================================================

# --- YOUR TASK 2A: Create the Student class ---
#
# Your Student class should have:
#   - __init__ that takes: name, grade (e.g., 11 or 12)
#   - A method called introduce() that prints:
#     "Hi, I'm {name} and I'm in grade {grade}"
#
# Look at the Dog class above for the pattern!

# YOUR CODE HERE (replace 'pass' with your code):

class Student:
    pass  # Delete this line and write your code




# --- YOUR TASK 2B: Test your Student class ---
# Create 2 students and call introduce() on each
# Uncomment and fill in:

# student1 = Student(???, ???)
# student2 = Student(???, ???)

# student1.introduce()
# student2.introduce()




# ============================================================
# PART 3: Methods That Change Things
# ============================================================
#
# Methods can change an object's attributes!
# This is powerful - objects can update themselves.
# ============================================================

# --- YOUR TASK 3: Add a level_up method ---
#
# Go back to your Student class above and ADD a new method:
#
#   def level_up(self):
#       # Increase grade by 1
#       # Print "{name} is now in grade {grade}!"
#
# Then test it below:

# student1.introduce()      # Should show original grade
# student1.level_up()       # Should increase grade
# student1.introduce()      # Should show new grade




# ============================================================
# PART 4: Think About It
# ============================================================
#
# Answer these questions IN YOUR HEAD or write notes below.
# We'll discuss them in Lesson 5!
#
# 1. What do you think 'self' does? Why is it in every method?
#
# 2. Why do we use __init__? What would happen without it?
#
# 3. How is using a class different from just using
#    regular variables and functions?
#
# 4. In the Dog class, max_dog and bella_dog have the same
#    methods (bark, describe) but different results. Why?
#
# ============================================================

# BONUS: If you want, write your thoughts here as comments:
#
# 1. self is...
#
# 2. __init__ is used because...
#
# 3. Classes are different because...
#
# 4. They have different results because...




# ============================================================
# DONE!
# ============================================================
#
# Bring this file to Lesson 5 - we'll review your code
# and dive deeper into classes and OOP!
#
# ============================================================
