import javax.swing.*;
import java.awt.*;
public class Fruit
{
private String color;
private double weight;
Fruit(){}
Fruit(String color, double weight)
{
this.color=color;
this.weight=weight;
}
public String getcolor()
{
return color;
}
public double getweight()
{
return weight;
}
public interface Edible
{
public abstract void getTaste();
}
class Apple extends Fruit
{
public String getTaste()
{
return null;
}
public class TestApple
{
public void main(String[] args)
{
Apple Apple1 = newApple();
[COLOR="Red"] Apple1.getColor();
Apple1.getWeight();
Apple1.getTaste();
System.out.println();
System.out.println ("Apple Color is: " + Fruit.getColor() );
System.out.println ("Apple Weight is: " + Fruit.getWeight() );
System.out.println ("Apple Taste is: " + Fruit.getTaste() + ".");[/COLOR]
}
}
}
}