2 Write Program Create Class Named Shape Two Sub Classes Two Dimensional Three Dimensional Q37072068

Language : Java (Polymorphism)

2. Write a program to create a class named shape, which have two sub classes two dimensional and three dimensional shapes. Th

2. Write a program to create a class named shape, which have two sub classes two dimensional and three dimensional shapes. The two dimensional shape have three sub classes: circle, triangle and square, and contain calArea() method to calculate the area. While the three dimensional shape have two sub classes: cube and sphere and have calArea) and calVolume() methods to calculate the surface area and volume, respectively. Create a program that implements

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.