Discover the answers to your questions at Westonci.ca, where experts share their knowledge and insights with you. Connect with a community of experts ready to help you find accurate solutions to your questions quickly and efficiently. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

Create a parent class called Shape with width and height parameters of type double and a function that returns the area of the shape, which simply returns 0. Then define two subclasses, Rectangle, and Triangle, that override the area function to return the actual area (width*height for Rectangle and 1/2*width*height for Triangle).

The code must be in java