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
What is unicode full form?
When is an object in the mean to garbage collection?
What is the concatenation operator in java?
What is the difference between panel and frame ?
7 Answers HCL, IBM, Raim Techno Solutions,
What is a stream? what are the different types and classes of Streams?
What is mean by exception?
Is c better than java?
How to extract HashMap values?
What is merge sort in java?
Write code to implement bubble sort in java?
What is static variable and static method?
32 Answers Accenture, Prolific, Prolifics, TCS, TNH,
What is constructor in java ?