CODE CREATIVE
OBJECTIFICATION
An exercise in objectification
CHALLENGE EXERCISE #1
  1. Read the "17. Classes & Objects: The Basics" and complete the "Exercises".
  2. Read the "18. Classes & Objects: Digging a Little Deeper" and complete the "Exercises".








TASK #1
TASK:
What is RPG?

CHECK UP:
Watch the video below to check that you completed the task.


CHALLENGE EXERCISE #2
  1. Complete all the loose ends in the starter file for RPG.




TASK #2
TASK:
A review of the object-oriented programming model.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #3
TASK:
Create the Hero class.

HINT:
Define the Hero class at the top of your program following the syntax found in Runestone Academy chapter 17 and 18. You will need to think about what data the hero is going to need through his journey and create instance variables for each.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #4
TASK:
Define the update_energy method.

HINT:
The update_energy method will need to have a parameter that will represent the value that the hero's energy should increment or decrement by. Then the body should make that calculation whose result is stored in the energy instance variable.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #5
TASK:
Write the equip method.

HINT:
The equip method should first change the value of the weapon instance variable to the value of the weapon that the hero wants to equip. Once that's in place, you can use the weapon instance variable as the index in the weapon_array and the weapon_damage to figure out how much damage to deal out and what weapon name the hero is carrying at the moment.

CHECK UP:
Watch the video below to check that you completed the task.


CHALLENGE EXERCISE #3
  1. Write the update_gold method.
  2. Use the update_gold method to modify the value of Hero's gold.
  3. Use the hero object and it's associated methods to implement RPG.
  4. Check your program with the rubric.




Congratulations!
You have just objectified a program!