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
Get step-by-step solutions from verified subject matter experts
