Computer Science, asked by sushalsabbella2002, 5 months ago

2. Create an abstract class Area having one data member called name of type String. Create a
constructor for the same to initialize the claus member name. Create an abstract method
findArea() which should retum a double value. Yow, create two subclasses Rectangle and
Circle. Rectangle constructor will take two additional parameters called length and width
Whereas, Circle constructor takes additional parameter called radius. Define the findArea()
method in both the classes where rectangle finds length"width and Circle find: mra. In main
class, create objects for Rectangle & Circle class and call findArea() using two objects and print
the area​

Answers

Answered by chandreshnewton
0

Answer:

create an abstract class area having one data

member called name of type string • create a constructor

Similar questions
Math, 5 months ago