Monday, January 6
Tuesday, January 7
Wednesday, January 8
Finish Pokemon
Private vs Public Data Fields
Accessors and Mutators (Getters and Setters)
Classes as Data Fields of Other Classes
Book and Author Classes
Private vs Public Data Fields
Accessors and Mutators (Getters and Setters)
Classes as Data Fields of Other Classes
Book and Author Classes
Thursday, January 9
Changes to Pokemon class required
Sample output for PokemonRunner
- toString method - This method returns a String that shows all of the statistics of the Pokemon.
- levelUp method - This void method will increase the statistics of a Pokemon. maxhealth and health will go up from 1 to 10 points. The defense will go up 1 to 3 and the damage of his PokemonAttack will go up 1 to 5. Be sure to output the gains made in each.
- heal Method - This void method receives an integer value. The Pokemon's health data field is increased by the integer value received. health cannot be greater than maxHealth. Also, if the Pokemon was fainted, he is no longer fainted, and his status should be set back to "healthy". Make sure there are outputs stating how much the pokemon was healed for and if his status changed from fainted to healthy, that should be outputted as well.
- attack Method - This void method receives another Pokemon object. The Pokemon that called the method (attacker) will damage the received Pokemon (defender) object the following amount : attackers damage - defenders defense. However, if the attacker's attack type is the same as the defender's type data field, the damage done is halved. If the attacker's attack is less than the defender's defense, no damage should be taken and an appropriate messages should be outputted. Once damage is calculated, this method should call the takeDamage method (on the defender) and send in this amount of calculated damage.
- takeDamage method - This method is similar to heal, only the integer value received will be subtracted from the Pokemon's health. That amount is subtracted from the defender's health. If the defender's health reaches 0 or less, set his health to 0, output a message stating that he fainted and set that defender's status to "fainted".
Sample output for PokemonRunner
Friday, January 10
Book and Author Assignment
BookRunner code
Cookie Starter Code
CookieRunner Starter Code
static data fields
Peppers Quiz
PokemonRunner Expected Output - 20 Points!
BookRunner code
Cookie Starter Code
CookieRunner Starter Code
static data fields
Peppers Quiz
- Grade MyInteger and MyPoint
- Objects Review
MyInteger, MyPoint Assignments
MyIntegerRunner
MyPointRunner - Submit Pangram to LiveLab
- Inheritance
- Private vs. Public
- get (Accessor) and set (Mutator) Methods
- Polygon, Square and Triangle Lecture
PokemonRunner Expected Output - 20 Points!