Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
public class A : ComparableObject { ... }; public class B : ComparableObject { ... }; ComparableObject a = new A(); ComparableObject b = new B();Give the sequence of methods called in order to evaluate a comparison such as ``a < b''. Is the result of the comparison true or false? Explain.
ComparableObject i = 5; ComparableObject j = 7; bool result = i < j;
Console.WriteLine(c);prints the contents of the container on the console.
ComparableObject a = new Association(3, 4); ComparableObject b = new Association(3);Give the sequence of methods called in order to evaluate a comparison such as ``a == b''. Is the result of the comparison true or false? Explain.