###SuperHero
- Create a class called
SuperHero
that takes afirstName
andlastName
. Give each superHero asuperPunch
method that returns"WHAM!"
.
###Robot
- Create a class called
Robot
that takesname
andpurpose
. Give each robot agreet
method that returns"beep boop"
###Starship
- Make a
Starship
class that takes amodel
andownerName
.-
Give your
StarShip
asetTopSpeed
method and agetTopSpeedMethod
that let you change and read thetopSpeed
. AssumetopSpeed
is just a number. -
Give your
Starship
anaccelerateTo
method that setscurrentSpeed
to some number, unless that number is greater than itstopSpeed
.
-
###Dice
- Make a
Dice
class that takes anumberOfSides
. Add a method calledroll
that randomly returns a number from1
up to thenumberOfSides
.- Create a
getRolls
method to record that returns (not outputs) a list of arrays containing previous rolls.
- Create a