A good answer might be:

Yes. Abstract classes are used to organize the "concept" of something that has several different versions in the children. The abstract class can include many abstract methods and non-abstract methods.

Holiday

Here is a class definition for class Holiday. It is a non-abstract child of an abstract parent:

class Holiday extends Card
{
  public Holiday( String r )
  {
    recipient = r;
  }

  public void greeting()
  {
    System.out.println("Dear " + recipient + ",\n");
    System.out.println("Season's Greetings!\n\n");
  }
}

The class Holiday is not an abstract class; objects can be instantiated from it.

  • Holiday inherites the abstract method greeting() from its parent.
  • Holiday must define a greeting() method that includes a method body (statements between braces).
  • The definition of greeting() must match the signature given in the parent.
  • If Holiday did not define greeting(), then Holiday would have to be declared to be an abstract class.

QUESTION 5:

Will each of the classes that inherit from Card have a greeting() method?

Click Here after you have answered the question