Use the GemotricObject class and its
subclassess Cirlce and Rectangle to do the following:
1.Override Object’s toString() method in Circle class to
returnthe status of Circle object.
2.Override Object’s toString() method in Rectangle class to
return the status of Rectangle object.
3.Overide Object’s equals() method to compare two circle
objects.
4.Overide Object’s equals() method to compare two Rectangle
objects.
5.Test the above statements in the main method.
Use the GemotricObject class and its subclassess Cirlce and Rectangle to do the following: 1.Override Object’s toString(
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am