Computer Science, asked by deadriser250, 8 months ago

Declare the following classes:
The Rectangle class, that extends Shape, describes a simple rectangle.
The Circle class, that extends Shape, describes a simple circle.
The Shape class is given as follows:
public abstract class Shape

{

public abstract double area();

public String toString()

{

return �The area is � + area();

}

}



Check your classes using the following application:



public class Test

{

public static void main(String args[])

{

Shape vec[] = {new Circle(3), new Rectangle(4,5), new Circle(4), new Circle(8)};

for(int index = 0; index < vec.length; index ++)

{

System.out.println(vec[index]);

}

}

}

Answers

Answered by ahmedfahi97
0

Answer:

hmm...

Explanation:

well,

എന്തുകൊണ്ടാണ് ഇത് വളരെ വിചിത്രമായിരിക്കുന്നത്?

വരാനിരിക്കുന്ന പരിശോധനയിൽ മികച്ചത് ചെയ്യുക.

നിങ്ങൾക്ക് ഒരു സ്പൂൺ ഭക്ഷണം നൽകാൻ ഞാൻ അവിടെ ഉണ്ടാവില്ല.

Similar questions