Question: JAVA PROGRAMING: Objective: The purpose of this lab is to study about the OOPs concept Polymorphism Algorithm: Start the program. Declare a class Polymorphism with

JAVA PROGRAMING:

Objective: The purpose of this lab is to study about the OOPs concept Polymorphism

Algorithm:

Start the program.

Declare a class Polymorphism with method name as area() taking int, float and double value as parameter as area(int x), area(float x, float y) and area(double x) used to calculate area of square, rectangle and circle respectively

Define the object of child class in main()

Call the method where the values are assigned and Print the area

Stop the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!