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
who was the founder of java
32 Answers CTS, HCL, ProKarma,
Explain the access modifiers for a class, method and variables?
What is boolean in java?
Difference between Array and vector?
Iterator in the HashMap is fail-safe means what?
What is a final class in java?
Can we have multiple public classes in a java source file?
Can you override a private or static method in java?
Explain about core java?
What is the use of object and class classes?
Can you give names of Container classes?
how to make the double-tone class ? as we have singletone class..?