import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class HomeworkWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class HomeworkWorld extends World
{
private String[] image = {"smiley1", "smiley2","smiley3","smiley4","smiley5"};;
private String[] soundfile = {"hello","happy","crying","ohno","raspberry"};
/**
* Constructor for objects of class HomeworkWorld.
*
*/
public HomeworkWorld()
{
// Create a new world with 400x100 cells with a cell size of 1x1 pixels.
super(400, 100, 1);
for(int i = 0; i<6; i++)
{
while(i<5)
{
addObject(Emoticon.class(("smiley"+ i + ".png",soundfile + ".wav"));
}
}
}
}
- Make the images appear(strings)
- Make each one have it's own sound
- Can't make multiple classes; just one: emoticon

