Question: 1. The class Shape will contain two instance variables: String color and String name_object. Define the default constructor with no arguments(the initialization for this case
1. The class Shape will contain two instance variables: String color and String name_object. Define the default constructor with no arguments(the initialization for this case will be color=white, name_object= ), the constructor with parameters, get/set methods of data fields and the method toString() that returns a string description of object. 2. Design the Rectangle class that will inherit from Shape class and implement the interface Comparable. The interface Comparable is defined as : public interface Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
