2012-11-20 08.05.5211.jpg
import java.util.Scanner; class Fruitt { private String name; private String country; private boolean edible; private double price; public static void main(String args[]) { Scanner input=new Scanner(System.in); String name; String country; boolean edible; double price; System.out.println("Fruit Name:"); name=input.nextLine(); System.out.println("Fruit Country"); country=input.nextLine(); System.out.println("Edible:True/False"); edible=input.nextBoolean(); System.out.println("price:"); price=input.nextDouble(); } public String getName () { return name; } public void setName (String newName) { name=newName; } public String getCountry () { return country; } public void setCountry (String newCountry) { country=newCountry; } public boolean getEdible () { return edible; } public void setEdible (boolean newEdible) { edible=newEdible; if ( edible == false) { price=0; } else { getPrice(); } } public double getPrice () { return price; } public void setPrice (double newPrice) { price=newPrice; } public void readInput() { } public void display(String name,String country, boolean edible, double price ) { } }