Villain extends the idea of Humans.
Every villain has a mustache.
Every villain has a hat.
Every villain has a "look".
Every villain will have some level of drunkenness.
Every villain will tie up a certain number of damsels.
For a given Villain,
He will look mean.
He will start out sober.
He will start the day without having any damsels tied up.
drinkWhiskey
drunkedness increases by one
howDrunkAmI
tell them how drunk I am
tieUpDamsel (name)
add one to the number of damsels this villain has tied up.
print "Oh my Gosh! (the specified damsel) has been tied up!"
-------------------------------------------------------------------------------------------------
public class Villains extends Humans
{
String mustacheColor;
String hatColor;
String look;
int drunkenness;
int numberOfDamsels;
Humans damsel;
public Villains()
{
look = "Mean";
drunkenness = 0;
numberOfDamsels = 0;
}
public void drinkWhiskey()
{
drunkenness ++;
}
public int howDrunkAmI()
{
return drunkenness;
}
public void tieUpDamsel (Humans damsel)
{
this.damsel = damsel;
numberOfDamsels++;
System.out.println("The Villain has tied up " + damsel.whatIsYourName());
}
}
|