Codementor Events

Java abstract method

Published Jan 24, 2018

Create a class named shape with abstract method named print
From this class inherit 3 classes- square,triangle,circle
Square will have 4 points with coordinate(X,Y)
Triangle will have 3 points with coordinate(X,Y)
Circle will have a point and a radius(number) with coordinate(X,Y)
implement the print method of shape to print to the console the points/radius of the shape (the properties of specific shape)
have an array of shapes with three instances of each type of shape.
Loop over the array and call print,to print each one of the shapes.
Use console input to input the data to each one of the shapes type.

Please anybody help to solve this

Discover and read more posts from Mark
get started
post commentsBe the first to share your opinion
Nilotpal Sarkar
4 years ago

Hello Mark, This problem statement is staright forward and i can give you the complete Java Based solution to it. Let me know if we should move forward for it?

Regards,
Nilotpal

Show more replies