What would happen if the pay method were not defined as an abstract method in the StaffMember class of the Firm program?

What will be an ideal response?


By defining the pay method in StaffMember, all child classes must implement it (or be abstract themselves). So if pay were not defined in StaffMember, the child classes would not have to implement it and the ability to pay all staff members through a polymorphic reference would not exist. It is only by formally establishing that all children of StaffMember have a pay method that makes it safe to pay them all.

Computer Science & Information Technology

You might also like to view...

Java provides a standard class to make point plotting simple.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Sound card circuitry, called integrated audio, is built into the motherboard.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A(n) ____________________ loop should be used when the iterations should continue until a condition becomes true.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A disaster recovery plan ensures that workstations and file servers can be restored to their original condition in the event of a catastrophe.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology