Challenge: Advancing the Shapes Analysis
This lesson brings you a challenge to solve.
We'll cover the following
Problem statement
Expand the same program given below, define a type Triangle
, and let it implement
AreaInterface
. Test this by calculating the area of a specific triangle.
Area of a triangle =
Then, define a new interface PeriInterface
, which defines a method Perimeter()
. Let the type Square
implement this interface and test it with our square value.
Try to solve the challenge below. Good Luck!
Get hands-on with 1400+ tech skills courses.