Consider the following code segment and two classes. Mambo m = new Mambo(); Rumba r = new Rumba(); public class Rumba { public Rumba() { System.out.println("Executing the Rumba constructor"); } } public class Mambo { public Mambo() { System.out.println("Executing the Mambo constructor"); } } What is the relationship between class Rumba and class Mambo? Consider the following code segment and two classes. Mambo m = new Mambo(); Rumba r = new Rumba(); public class Rumba { public Rumba() { System.out.println("Executing the Rumba constructor"); } } public class Mambo { public Mambo() { System.out.println("Executing the Mambo constructor"); } } What is the relationship between class Rumba and class Mambo? polymorphism inheritance (is-a) only both inheritance (is-a) and composition (has-a) There is no class relationship between Rumba and Mambo. composition (has-a) only
What is the relationship between class Rumba and class Mambo?
1) polymorphism
2) inheritance (is-a) only
3) both inheritance (is-a) and composition (has-a)
4) There is no class relationship between Rumba and Mambo.
5) composition (has-a) only