Shape Class

Create the Shape class with the following properties :


NOTE:
An abstract method contains only the method declaration, followed by a semicolon (;).
A class should be declared abstract even if it only contains one abstract method

      public abstract class Shape {
      
      ...
      
      public abstract void draw();
      
      ...
      }
      

A method should be declared abstract if the class in which it is declared is too general or abstract for it to have a definition.

A class that is this general isn't something we'd ever want to instantiate as it merely serves as a base class with some possible common behavior or attributes from which to derive more concrete classes.

In fact, you cannot instantiate or create an object that has an abstract method. What would happen if this was possible and you called an abstract method? There would be no definition or code to execute for that call.