Advertisement
MrsMcLead

AppleTester

Feb 8th, 2016
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. import java.awt.Color;
  2.  
  3. public class AppleTester
  4. {
  5.  
  6.   public static void main(String[]args)
  7.   {
  8.    
  9.    Apple goldenDelicious = new Apple();
  10.    
  11.    
  12.    //change the color to gold
  13.    Color gold = new Color(192,191,5);
  14.    goldenDelicious.setColor(gold);
  15.    
  16.    
  17.    //change the name to golden delicious
  18.    goldenDelicious.setName("Golden Delicious");
  19.    
  20.    
  21.     System.out.println(goldenDelicious);
  22.    
  23.    
  24.     Apple honeycrisp = new Apple(10,"Honeycrisp");
  25.    
  26.    
  27.    Color red = new Color(255,0,0);
  28.    
  29.     Apple snapDragon = new Apple(red, 6, "normal",8,"Snap Dragons");
  30.    
  31.     snapDragon.setTexture ( "mushy");
  32.    
  33.   }
  34.  
  35.  
  36.  
  37.  
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement