Question: Draw a UML Class Diagram that represents the code shown below. for java. public class Driver { public static void main(String[] args) { ... }

Draw a UML Class Diagram that represents the code shown below.

for java.

public class Driver { public static void main(String[] args) { ... } } public interface A { int m1( String s ); } public class B implements A { protected C myC; protected B( C c ) { myC = c; myC.m3(); } public int m1(String s){ return 3; } } public abstract class C { protected void m2(){System.out.println("hi");} public abstract void m3(); } public class D extends C { public void m3() { System.out.println("yes"); } } public class E extends C { private ArrayList subs = new ArrayList(); public void m3() { for( C c : subs ) c.m2(); } public void addSub(C c ) { subs.add(c); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!