BIT401 ยท 2080 ยท 10 marks
Why do we need interface? Define an interface named shape with area ( ) method. Create a class named Rectangle with length and breadth circle with radius that implements shape interface. Now create the object of both classes and display their area.
Why do we need interface? Define an interface named shape with area ( ) method. Create a class named Rectangle with length and breadth circle with radius that implements shape interface. Now create the object of both classes and display their area.[10]
Advanced Java ProgrammingChapter 1: Object-Oriented Programming FundamentalsInterface design and implementation