daily pastebin goal
43%
SHARE
TWEET

Lab11pt2

scaawt Oct 15th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * written by Tariq Scott
  3.  */
  4. import java.util.Scanner;
  5. public class AppleTester {
  6.  
  7.   public static void main(String[] args) {
  8.     Scanner keyboard = new Scanner(System.in);
  9.    
  10.     System.out.println("Welcome to the Apple Tester");
  11.     System.out.println("Would you like the first, second, third, or fourth apple?");
  12.    
  13.     String userInput = keyboard.nextLine();
  14.    
  15.     Apple first = new Apple("Red Delicious", 2.0, 4.00);
  16.     Apple second = new Apple ("Gala", .75, 0.89);
  17.     Apple third = new Apple ("Golden Delicious", 1.0, 3.00);
  18.     Apple fourth = new Apple ("Granny Smith", 0.5, 2.50);  
  19.    
  20.     System.out.println("Name: " + first + "Weight: "+ this.weight + "Price: " + this.price);
  21.    
  22.   }
  23.  
  24.  
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top