import java.awt.*;
import java.applet.*;
public class Ss extends Applet {
Label a,p;
TextField c,r;
Button b,d;
TextArea m;
public void init() {
p=new Label("Name");
a=new Label("price");
c=new TextField(10);
r=new TextField(10);
b=new Button("ADD");
d=new Button("display");
m=new TextArea("",10,20);
add(a);
add(p);
add©;
add®;
add(b);
add(d);
add(m);
}
}
اريد اكمل هذي الجزئية اذا حد يعرف
The values entered by the user on the text fields are that of two instance variables of a class with name Fruit and the individual object details are to be stored on an array of type Fruit upon the pressing of ADD button. Users are allowed to add 5 object‟s details and while pressing the DISPLAY button, the values of all the five objects are displaying on the Text Area.
Fruit class should be created with two instance variables and a constructor to initialize the values. Use comments to illustrate the various concepts applied / utilized in the solution.
