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
Tell some latest versions in JAVA related areas?
What is thread safe in java?
What is a container in a gui?
What is multiple inheritance? Is it supported by java?
wHAT IS DEFAULT SPECIFIER IN JAVA wHAT IS DEFAULT CONSTRUCTOR IN JAVA wHAT IS DEFAULT METHOD IN JAVA
Difference between Preemptive scheduling vs. Time slicing?
What steps are taken when the OS shifts from one-thread execution to another?
What are namespaces in java?
What is aggregation?
What is the difference between pass by reference and pass by pointer?
What are the different types of constructor?
Is array size fixed in java?