Programming: defining interfaces IShape1 containing area () method; Defines the interface IShape2, including generating () method; Define Circle and Rectangle, both inherited interface IShape1 and IShape2, respectively in the class with area () method to calculate the area, with generating () method to calculate the perimeter, writing applications using Circle and Rectangle, even test,
CodePudding user response:
Implement the problem of interface as well as the method of reference
https://www.jb51.net/article/129462.htm