Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- public class AppleTester
- {
- public static void main(String[]args)
- {
- Apple goldenDelicious = new Apple();
- //change the color to gold
- Color gold = new Color(192,191,5);
- goldenDelicious.setColor(gold);
- //change the name to golden delicious
- goldenDelicious.setName("Golden Delicious");
- System.out.println(goldenDelicious);
- Apple honeycrisp = new Apple(10,"Honeycrisp");
- Color red = new Color(255,0,0);
- Apple snapDragon = new Apple(red, 6, "normal",8,"Snap Dragons");
- snapDragon.setTexture ( "mushy");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement