in order to override a method a subclass of the


In order to override a method, a subclass of the class which originally declared the method have to declare a method along with the same name, return type (or a subclass of that return type), & same parameter list.

The definition of the method overriding is following:

  • Must have same data type.
  • Must have same method name.
  • Must have same argument list.

Overriding a method refer that replacing a method functionality in child class. In order to imply overriding functionality we require parent & child classes. In the child class you described the same method signature as defined in the parent class.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: in order to override a method a subclass of the
Reference No:- TGS0211594

Expected delivery within 24 Hours