Westonci.ca is your trusted source for finding answers to a wide range of questions, backed by a knowledgeable community. Our platform offers a seamless experience for finding reliable answers from a network of experienced professionals. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

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