Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.Date;
- public class ChristmasTree extends Tree {
- protected int height;
- protected int starheight;
- public ChristmasTree(int height,int starheight) {
- super.height = height;
- this.starheight = starheight;
- }
- public Color getExpectedColor(Date date) {
- return Color.GREEN;
- }
- @Override
- public String toString() {
- return super.toString() + height + starheight + "meters high";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement