In the world class, add one new instance of this class at world creation using an empty string (" ").
here do you mean to make a new subclass from ChocolateDispenser world, or from Actor?
public int getCredit()
{
return credit;
}