Draw a UML class diagram for the code fragment given below:
public class StringApplet extends Applet {
private Label sampleString;
private Button showTheString;
private ButtonHandler bHandler;
private FlowLayout layout;
public StringApplet() {
sampleString = new Label(" ");
showTheString = new Button (" Show the String");
bHandler = new ButtonHandler();
layout = new FlowLayout();
showTheString.addActionListener(bHandler);
setLayout(layout);
add(sampleString);
add(showTheString);
}
class ButtonHandler implements ActionListener {
public void actionPerformed(ActionEvent e) {
samplestring.setText("Good Morning");
}
}
}
Note: The methods need not be indicated on the diagram.
No Answer is Posted For this Question
Be the First to Post Answer
Is there a jre for java 11?
Are the equals() and hashCode() protected methods of object class?
What are the different http methods?
Does importing a package imports its sub-packages as well in java?
Which oo concept is achieved by using overloading and overriding?
Is alive method in java?
why java is better then .net?
What is the purpose of the File class?
How many types of constructors are used in java?
How do you do math powers in java?
What is the program compilation process?
What are the advantages of inner classes?