- Create methods sunRise(), sunSet() for make animation for the following scenarios
Code:
/*** Sun
*
* @author (MZ)
* @version (1.0)
*/
public class Sun
{
private Circle sun;
/**
* Constructor for objects of class Sun
*/
public Sun()
{
sun = new Circle();
sun.makeVisible();
sun.changeColor("yellow");
sun.changeSize(50);
sun.moveHorizontal(220);
}
public void sunSet(){
sun.slowMoveVertical(300);
}
public void sunRise(){
sun.slowMoveVertical(-300);
}
}
Không có nhận xét nào:
Đăng nhận xét