CJCoding With Joseph

A Factory That Returns an Interface

Complete the static method ShapeFactory.Create(string kind). When kind is "circle" it returns a new Circle; for anything else it returns a new Square. The return type is the interface IShape. Do NOT write a Main method.

For Create("circle") the program prints:
circle

Expected Output:

circle
Topics:
Interfaces
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.