Define an interface IConvertible that indicates that the class can convert a string to C# or VB2005. The interface should have two methods : ConvertToCSharp and ConvertToVB2005 . Each method should take a string, and return a string.
Exercise 13-2
Implement that interface and test it by creating a class ProgramHelper that implements IConvertible . You can use simple string messages to simulate the conversion.
Exercise 13-3
Extend the interface by creating a new interface, IConvertible . The new interface should implement one new method, CodeCheckSyntax , which takes two strings: the string to check, and the language to use. The method should return a bool. Revise the ProgramHelper class from Exercise 13-2 to use the new interface.
Exercise 13-4
Demonstrate the use of is and as . Create a new class, ProgramConverter , that implements IConvertible . ProgramConverter should implement the ConvertToC-Sharp( ) and ConvertToVB( ) methods. Revise ProgramHelper so that it derives from ProgramConverter , and implements ICodeChecker .